@@ -68,12 +68,12 @@ def test_pairwise_force_field_two(build_nlist):
6868 pwff = PairwiseForceField (lj , rcut , build_nlist = build_nlist )
6969
7070 # Compute and check against manual result
71- energy , forces , mech_press = pwff (atpos , cell_length )
71+ energy , forces , frc_press = pwff (atpos , cell_length )
7272 d = np .linalg .norm (atpos [0 ] - atpos [1 ])
7373 e , g = lj (d )
7474 assert energy == pytest .approx (e )
7575 assert forces == pytest .approx (np .array ([[g , 0.0 , 0.0 ], [- g , 0.0 , 0.0 ]]))
76- assert mech_press == pytest .approx (- g * d / (3 * cell_length ** 3 ))
76+ assert frc_press == pytest .approx (- g * d / (3 * cell_length ** 3 ))
7777
7878
7979@pytest .mark .parametrize ("build_nlist" , [build_nlist_linked_cell , build_nlist_simple ])
@@ -87,8 +87,8 @@ def test_pairwise_force_field_three(build_nlist):
8787 lj = CutOffWrapper (LennardJones (2.5 , 1.3 ), rcut )
8888 pwff = PairwiseForceField (lj , rcut , build_nlist = build_nlist )
8989
90- # Compute the energy, the forces and the mechanical pressure.
91- energy1 , forces1 , mech_press1 = pwff (atpos , cell_length )
90+ # Compute the energy, the forces and the force contribution pressure.
91+ energy1 , forces1 , frc_press1 = pwff (atpos , cell_length )
9292
9393 # Compute the energy manually and compare.
9494 dists = [
@@ -110,8 +110,8 @@ def energy_volume(volume):
110110 scale = my_cell_length / cell_length
111111 return pwff (atpos * scale , my_cell_length )[0 ]
112112
113- mech_press2 = - nd .Derivative (energy_volume )(cell_length ** 3 )
114- assert mech_press1 == pytest .approx (mech_press2 )
113+ frc_press2 = - nd .Derivative (energy_volume )(cell_length ** 3 )
114+ assert frc_press1 == pytest .approx (frc_press2 )
115115
116116
117117@pytest .mark .parametrize ("build_nlist" , [build_nlist_linked_cell , build_nlist_simple ])
@@ -143,8 +143,8 @@ def test_pairwise_force_field_fifteen(build_nlist):
143143 lj = CutOffWrapper (LennardJones (2.5 , 1.3 ), rcut )
144144 pwff = PairwiseForceField (lj , rcut , build_nlist = build_nlist )
145145
146- # Compute the energy, the forces and the mechanical pressure.
147- energy , forces1 , mech_press1 = pwff (atpos , cell_length )
146+ # Compute the energy, the forces and the force contribution to the pressure.
147+ energy , forces1 , frc_press1 = pwff (atpos , cell_length )
148148 assert energy < 0
149149
150150 # Test forces with numdifftool
@@ -158,8 +158,8 @@ def energy_volume(volume):
158158 scale = my_cell_length / cell_length
159159 return pwff (atpos * scale , my_cell_length )[0 ]
160160
161- mech_press2 = - nd .Derivative (energy_volume )(cell_length ** 3 )
162- assert mech_press1 == pytest .approx (mech_press2 )
161+ frc_press2 = - nd .Derivative (energy_volume )(cell_length ** 3 )
162+ assert frc_press1 == pytest .approx (frc_press2 )
163163
164164
165165@pytest .mark .parametrize ("build_nlist" , [build_nlist_linked_cell , build_nlist_simple ])
0 commit comments