TinkerTools / tinker

Tinker: Software Tools for Molecular Design
https://dasher.wustl.edu/tinker/
Other
130 stars 61 forks source link

angle unit change #89

Closed pren closed 3 years ago

pren commented 3 years ago

Jay, Do your changes to angle & torsion unit from degree to radian affect the parameter files? The restraint constants are apparently inconsistent now between latest and older tinker.

zjing7 commented 3 years ago

I compared it with the older version, only restraints are affected. "angle" force constant unit has been using radian; "torsion" force constant unit is the same as energy.

jayponder commented 3 years ago

I believe all the code and parameter files in the current Tinker distribution are correct-- I was very careful in making this change for obvious reasons. I thought I had notified you guys, J-P and Louis, the Qubit folks, etc. The changes apply to Tinker8 and Tinker9. And I personally made the corresponding changes in Tinker-HP. There are many internal changes in the energy routines, and changes to some of the "XXXunit" variables that scale force field energy/gradient values.

The Tinker code now has radians in the force constants for any term that uses linear/harmonic/etc.-based force constants. These would include angle and torsion restraints, and many force field potential terms including: angle, angle-angle, stretch-bend, angle-torsion, improper (CHARMM) torsion, and charge flux angle components. All of these now use radians internally. Radians are also used in the actual force constant values in parameter and key files, unless the force field developer (Allinger, CHARMM, etc.) uses other units in their published parameters. In the latter case, Tinker uses the XXXunit variables to convert to radians internally.

There were several reasons for making this change: (1) the previous versions of Tinker used degrees in some force constants and radians in others with no logical pattern, (2) the conversion to radians puts the force constant values on a similar level for distances (via Angstroms) and angles (via radians) since Angstroms and radians are similarly large units, and (3) most of the rest of the world and other modeling packages have tended to converge on using radians.

In particular, you will need to be careful with force constants for angle restraints such as the "Boresch restraint" stuff, for torsion restraints you may be using in POLTYPE torsion fitting, and for the charge flux angle component in AMOEBA+.