Skip to content

Commit

Permalink
Merge pull request #49 from WangXinyan940/wangxy/xmlholder
Browse files Browse the repository at this point in the history
fix(unittest): fix classical UTs and remove double check of cutoff distance in potential calculation.
  • Loading branch information
WangXinyan940 authored Jul 5, 2022
2 parents 28642bb + e75620e commit cfa4eac
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions dmff/classical/inter.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,6 @@ def get_rf_energy(dr_vec, chrgprod, box):
if self.ifPBC:
dr_vec = v_pbc_shift(dr_vec, box, jnp.linalg.inv(box))
dr_norm = jnp.linalg.norm(dr_vec, axis=1)
chrgprod = chrgprod[dr_norm <= self.r_cut]
dr_norm = dr_norm[dr_norm <= self.r_cut]

dr_inv = 1.0 / dr_norm
E = (
Expand Down
2 changes: 1 addition & 1 deletion tests/data/impr1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<Bond atomName1="N1" atomName2="N4"/>
</Residue>
</Residues>
<PeriodicTorsionForce>
<PeriodicTorsionForce ordering="amber">
<Improper type1="n1" type2="n2" type3="n3" type4="n4" periodicity1="1" phase1="0.0" k1="2.092"/>
</PeriodicTorsionForce>
</ForceField>
2 changes: 1 addition & 1 deletion tests/data/wild1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<Bond atomName1="N3" atomName2="N4"/>
</Residue>
</Residues>
<PeriodicTorsionForce>
<PeriodicTorsionForce ordering="amber">
<Proper type1="" type2="n2" type3="n3" type4="" periodicity1="1" phase1="0.0" k1="2.092" periodicity2="2" phase2="0.0" k2="2.092" periodicity3="3" phase3="0.0" k3="2.092" periodicity4="4" phase4="0.0" k4="2.092"/>
</PeriodicTorsionForce>
</ForceField>
2 changes: 1 addition & 1 deletion tests/data/wild2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<Bond atomName1="N1" atomName2="N4"/>
</Residue>
</Residues>
<PeriodicTorsionForce>
<PeriodicTorsionForce ordering="amber">
<Improper type1="n1" type2="" type3="" type4="n4" periodicity1="1" phase1="0.0" k1="2.092"/>
</PeriodicTorsionForce>
</ForceField>

0 comments on commit cfa4eac

Please sign in to comment.