3 Commits

Author SHA1 Message Date
João Morado
eaf56f96bc Update AMOEBA XML, .prm files, and parsing of Tinker files (#5086)
* Correct AmoebaAngleTorsion in test_Amoeba18Nucleic of TestForceField

* Update processTinkerForceField to handle latest .prm Tinker files

* Update amoeba2018 XML files

* Update amoeba2013 XML files

* Update amoeba2009 XML files

* Adapt addTorTor to new format in the .prm files

* Fix TorsionTorsion

* Also update the total energy in test_Amoeba18Nucleic

* Update amoebabio18.prm

* Fix nucleic acid test energies

* Correct AmoebaAngleTorsionForce params

* Add new addTorTor to TinkerFiles

* Revert unit fix

* Change to .pdb file which Tinker likes

* Update test_Amoeba18BPTI

* Remove trailing zeros from XML files

* Leave trailing zeros only on 2018 ff

* New element names in 2018

* More digits for surfaceAreaFactor

* More digits for surfaceAreaFactor

* More digits

* Remove debugging print

* Add support to 2009 and 2013 AMOEBA ffs to processTinkerForceField.py

* Add FF specific residues XML files

* Delete old residuesFinal.xml

* Update AMOEBA XML ffs

* Update FFs

* Fix some formatting issues

* Fix "." in scientific notation

* Remove old assertions
2025-10-14 12:55:21 -07:00
João Morado
489e2c46a2 Cleanup TinkerReader, ForceField, and amoebaforces (#5080)
* Fresh branch refactoring the new AMOEBA code

* Finish cleaning up AmoebaAngleForce and AmoebaInPlaneAngleForce

* Cleanup AmoebaTorsionTorsionForce

* Cleanup AmoebaOutOfPlaneBend

* Cleanup AmoebaMultipoleForce

* Remove unnecessary gkForce

* Simplify usage of atomClasses in ForceField

* Formatting

* Fix type of class on WCA

* Simplify angle forces

* Add parsing of units to PiTorsion and StretchBond, and misc. formatting adjustments

* Update code per review feedback

* Clearly defined API for TorsionTorsion,  and correct matching for UB,

* Unindent break statements

* Raise ValueError if classes and types are mixed in a Urey-Bradley term definition
2025-10-14 08:59:01 -07:00
João Morado
939e0af545 Reader of Tinker files (#4769)
* Add basic version of TinkerFiles

* Refactor TinkerFiles

* Update docstring, type hints, and fix bug when setting box vectors

* Small fixes

* Add unit tests for the TinkerFiles class

* Fixes and updates to TinkerFiles

* Add simuteTinker example

* Update Modeller to work with AMOEBA force fields

* Small fixes

* Relax type hinting

* Fix indices in modeller

* Fix modeller indices

* Fix type hints and usage of Quantity

* Remove numpy protector

* Add reader of .seq files

* Add topology parsing of some protein residues, waters, ions, and generic molecules.

* Miscellaneous improvements

* Update amino acids and nucleotides list

* Various fixes to XML writing, and separate XML writing into a new class

* Comments/warnings

* Add nucleic topological definitions

* Improved handling of peptide residues

* Fix for CYX (disulfide bonds)

* Refactor the topology creation methods

* General improvements, and add support for nucleic-like residues

* No need to handle MP, DP, TP

* Minor improvements

* General refactoring, add automatic determination of topology

* Add TinkerAtomType dataclass, and remove references to biotypes as they are not needed

* Re-add missing parsing of forces and scalars

* Updates to createSystem()

* Add AMOEBA forces

* Add angle-related forces to createSystem

* Add placeholders for missing forces

* Beginning of support for AmoebaMultipoleForce

* Finished support for AmoebaMultipoleForce

* Support for AmoebaVdwForce

* TinkerFiles supports vdw

* Misc updates, and add AmoebaTorsionTorsion, AmoebaWcaDispersion, and AmoebaGeneralizedKirkwood

* Remove XML writer

* Fixes

* Fix wrong indentation in _findBitorsions

* Remove pdb debugging

* Documentation and fixes

* Remove files

* Revert checks in AmoebaVdwForceBuilder and ## @private  markers

* Remove duplicated static methods _getChiralAtomIndex

* Fix GK force

* Fix WcaDispersion force

* Fix WcaDisp

* Fixes and updates

* Cleanup and removing duplicated code

* Bug fixes

* A few more unit conversions

* Minor cleanup

* Misc fixes and updates

* Fix Add AmoebaStretchBendForce

* Simplify force builders

* Update ForceField

* Fix AmoebaPiTorsionForce

* Only add AmoebaWcaDispersionForce if using implicitSolvent

* Simplify amoebaforces

* Stretch torsion and angle torsion

* Misc. fixes

* Improve tests

* Fix cap group identification

* Add/improve tests

* Remove whitespaces from residue names

* Improve tests

* Consistent use of atomClasses list

* Fix match condition in AmoebaOutOfPlaneBendForceBuilder

* Fix AmoebaStretchBendForce

* Final fix for AmoebaStretchBendForce

* Fix AmoebaAngleForce

* Small fixes and improvements

* Update assertion tolerances

* Simplify torsion-torsion force creation

* Small fixes in the tests

* Review comments, type hints, docs for tinkerfiles.py

* Only use standard PDB for AA

* Type hint and docs for amoebaforces

* Reduce tolerances for failing tests

* Fixed error with ZOnly axis type when x particle is not specified

---------

Co-authored-by: peastman <peastman@stanford.edu>
2025-09-18 18:00:59 -07:00