14 Commits

Author SHA1 Message Date
Christian Clauss
82703dff73 Fix typos discovered by codespell in Python files (#5173) 2025-12-30 12:21:00 -08:00
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
Peter Eastman
2f20fbe2ad Fixed error using AMOEBA 2018 with RNA (#3313) 2021-11-04 20:41:04 -07:00
Peter Eastman
edee11b601 Fix errors with AMOEBA 2018 (#3311) 2021-11-02 18:33:47 -07:00
Peter Eastman
06767dde49 Added AMOEBA 2018 force field (#3299)
* Adding support for new AMOEBA features

* Support modern method of specifying in-plane angles

* Implemented stretch-torsions

* Implemented angle-torsions

* More AMOEBA fixes

* Bug fix

* Converted AMOEBA 2018 force field

* Added documentation for AMOEBA 2018

* Added a missing file for tests
2021-10-26 09:20:13 -07:00
Rasmus Wriedt Larsen
c87b96fbd4 Minor Python tweaks (#2616)
* Use list-comprehension in Python code

A minor change, but slighly easier to understand the initialization of
`parent_exclude_list` in my opinion.

* Implement __ne__ in Python classes that has __eq__

In Python 3, `__ne__` is automatically implemented as `not __eq__`.

However, in Python 2 it seems to be implemented as `not is` (so based on object
identity).

Based on setup.py [0] which says that "OpenMM requires Python 2.7 or better", it
should be useful to have better support for Python 2 :)

This was already done in 4 of the 12 classes that implements `__eq__`

```
>>> class WildCard(object):
...     def __eq__(self, other): return True

>>> w = WildCard()

>>> w == 42
True

>>> w != 42
True

>>> w != w
False
```

[0]: 5cef29ce8d/wrappers/python/setup.py (L237)

* Use umambiguous floor division for index calculations in Python

This makes the code work as intended if run as Python 3

```
$ python2 -c 'print(3/2, 3//2)'
(1, 1)
$ python3 -c 'print(3/2, 3//2)'
1.5 1
```

* Use `with` for file handling in Python

* Use `is None` instead of `== None` in Python

This is recommended in PEP8:

> Comparisons to singletons like None should always be done with is or is not, never the equality operators.
> - https://www.python.org/dev/peps/pep-0008/#programming-recommendations
2020-03-29 09:32:07 -07:00
Andreas Krämer
b0dacea009 Changed forcefield to not use dispersion corrections for CHARMM 2019-08-08 19:45:24 -04:00
peastman
69d7dc4fa5 Hopefully finished with supporting nucleotides in AMOEBA 2015-11-19 13:19:48 -08:00
Peter Eastman
fd473eeaff Merge branch 'master' into nucleic 2015-10-29 13:54:00 -07:00
Jason Swails
f7e4653a34 Add a test for AmoebaTorsionTorsionForce that fails because stripUnits doesn't
work for the input variable type.
2015-09-29 00:40:18 -04:00
Rafal P. Wiewiora
e060e7c4e2 modify processAmberForceField.py to resolve the sigma = 0 problems 2015-09-11 18:34:31 -04:00
peastman
0a751b5bd4 Updating scripts to support nucleic acids with AMOEBA 2015-08-18 10:54:45 -07:00
peastman
9f5a02cd44 Regenerated AMOEBA2013 based on Tinker 7.0.1 2015-02-19 16:52:47 -08:00
peastman
2781f51864 Added scripts for generating force field XML files 2014-09-02 16:31:03 -07:00