I am new to using the colvars package/fix.
I would like to apply two constraints to a pair of atoms.
First, I would like to apply a harmonic potential between the two atoms, based on their distance from one another. This seems to work fine.
I would also like to apply a constraint to keep the two particles parallel to a single axis.
The relevant block for defining this angle in the .colvars file is below:
atomnumbers 1 9022
refpositions (0, 0, 0) (10, 0, 0)
This block produces output that makes sense most of the time, but intermittently has values that are wrong. The output from the .traj file is below:
step one fa_one angle E_h_pot x0_one W_h_pot
0 2.63443126732797e+01 4.96706198016085e+00 7.10991472947676e+00 4.11195078579324e+00 2.80000000000000e+01 -2.15239352473637e+00
1 2.63445235947703e+01 4.96642921568898e+00 7.10980348107483e+00 4.11090319240818e+00 2.80000000000000e+01 -4.30451285153493e+00
2 2.63447172415882e+01 4.96584827523553e+00 7.10970573171377e+00 4.10994151544328e+00 2.80000000000000e+01 -6.45638043747032e+00
3 2.63448937414113e+01 4.96531877576597e+00 7.10962199287174e+00 4.10906509082901e+00 2.80000000000000e+01 -8.60801857363558e+00
4 2.63450534150514e+01 4.96483975484581e+00 7.10955270220001e+00 4.10827229854957e+00 2.80000000000000e+01 -1.07594491340688e+01
5 2.63451967319910e+01 4.96440980402706e+00 7.10949824538948e+00 4.10756078371999e+00 2.80000000000000e+01 -1.29106933824805e+01
6 2.63453243392690e+01 4.96402698219292e+00 1.79979388626225e+02 4.10692731332322e+00 2.80000000000000e+01 -1.50617717414308e+01
7 2.63454369997417e+01 4.96368900077495e+00 7.10943484838600e+00 4.10636808273571e+00 2.80000000000000e+01 -1.72127036417666e+01
8 2.63455356106389e+01 4.96339316808321e+00 7.10942624765969e+00 4.10587862349585e+00 2.80000000000000e+01 -1.93635073479360e+01
9 2.63456211470618e+01 4.96313655881467e+00 7.10943305980519e+00 4.10545408357378e+00 2.80000000000000e+01 -2.15141998567556e+01
10 2.63456946650961e+01 4.96291600471174e+00 7.10984839588891e+00 4.10508921163732e+00 2.80000000000000e+01 -2.36647967921307e+01
11 2.63457572996944e+01 4.96272810091666e+00 1.79304379628549e+02 4.10477836727131e+00 2.80000000000000e+01 -2.58153123025279e+01
12 2.63458102315154e+01 4.96256930545368e+00 7.10954396489181e+00 4.10451568523850e+00 2.80000000000000e+01 -2.79657590015579e+01
The value of 7.1 for the angle is correct, based on the positions of the particles, but at random times the value jumps to ~ 180 as it does at steps # 6 and 11. This produces warning messages:
colvars: Warning: one molecular orientation has changed by more than 0.01: discontinuous rotation ?
It seems this could be because I’ve done something incorrectly, but then the correct values confuse me. Is this a bug or have I done something wrong?
The problem seems consistent between LAMMPS versions 9 Dec 2014 and 14 Jun 2014.