1030 Commits

Author SHA1 Message Date
Peter Eastman
e53bdc5eab Top level Python module is now "openmm" (#3000)
* Top level Python module is now "openmm"

* Updated module names in examples

* Updated module names in documentation

* Updated module in CI scripts

* Added deprecation warning
2021-02-01 09:40:37 -08:00
Peter Eastman
c8a73c914d Made ordering of impropers more deterministic (#2992)
* Made ordering of impropers more deterministic

* Fixed typo
2021-01-25 09:44:15 -08:00
Peter Eastman
9008050c9e Reduce numerical error in computing conversion factors between units (#2968) 2021-01-14 16:31:40 -08:00
peastman
05e0c4f9d8 Do not alter mass of hydrogens in rigid water (#2975)
* Do not alter mass of hydrogens in rigid water

* Do not alter mass of hydrogens in rigid water
2021-01-05 13:18:20 -08:00
peastman
a43634546a Fixed deprecated option in setup.py (#2973) 2021-01-04 13:02:53 -08:00
peastman
6a5cc4f254 Fixed documentation and units for minimizeEnergy() (#2972) 2021-01-02 15:43:26 -08:00
qiuzy
698769b901 fix Charmm NBThole calculation bug and Improper dihedral parameter match issue (#2952)
* nbthole

* Update charmmpsffile.py

* Update charmmpsffile.py

* Update charmmparameterset.py

fix multiple dihedral with the same periodicity and add a warning reminder for improper dihedral

* add test example for NBTHole

add system files of CYT-GUA-CYT DNA segment for testing NBThole

* Update TestCharmmFiles.py
2020-12-20 15:44:26 -08:00
peastman
7b4927cfd0 Fixed bug in addMembrane() (#2932) 2020-11-23 20:30:38 -08:00
peastman
6ca6873005 Fixed warnings about string comparisons (#2859) 2020-09-24 13:12:02 -07:00
peastman
96ef252cd2 Fixed incorrect step calculation in metadynamics (#2855) 2020-09-23 15:45:19 -07:00
peastman
54cc89e5aa Fixed error in parsing PSF files (#2844) 2020-09-16 13:26:48 -07:00
peastman
b4543a4633 Updated to latest values for physical constants (#2802)
* Updated to latest values for physical constants

* Updated documentation on physical constants

* Updated Python unit definitions

* Fixed constants in test case

* Added a comment
2020-08-18 10:53:24 -07:00
Dann239
240a1fa727 Fixed typo in forcefield.py: 2DFunction -> 3DFunction 2020-08-09 00:54:05 +03:00
peastman
694c393062 States can save integrator parameters 2020-07-28 13:17:10 -07:00
peastman
015bef316d Merge pull request #2765 from peastman/amoeba
Added new features to AmoebaVdwForce
2020-07-22 13:08:33 -07:00
Peter Eastman
fddfeecbf2 Updated Python API for AmoebaVdwForce 2020-07-01 16:17:59 -07:00
Charlles Abreu
691aa78c3c Bug fix 2020-06-25 23:24:55 -03:00
Charlles Abreu
5270f8585e resolved PR #2611 merge conflicts 2020-06-25 23:04:51 -03:00
Charlles Abreu
697ab72ecb Fixed TestMetadynamics 2020-06-25 22:03:31 -03:00
Charlles Abreu
4fa7e25de8 Safer periodic attribute reading in ForceField 2020-06-25 19:59:01 -03:00
Charlles Abreu
77b488b828 Metadynamic with periodic 2D/3D tabulated functions 2020-06-24 20:02:17 -03:00
Charlles Abreu
1f6f23ceb0 ForceField prepared for specification of continuous tabulated functions 2020-06-24 18:35:27 -03:00
peastman
5c83e4233b Added 2019 CHARMM polarizable force field 2020-06-11 15:20:10 -07:00
peastman
ff4c490e45 Default extra particle identifier is the same for reading and writing 2020-06-04 14:42:13 -07:00
peastman
30cac99287 Don't mark Drude particles as deuterium 2020-06-04 11:58:08 -07:00
peastman
23ff308e5a Fixed an error using virtual sites with patches 2020-06-03 14:52:22 -07:00
peastman
20185acc09 Use integration force groups for reporters 2020-05-28 10:51:25 -07:00
Charlles Abreu
bff7086a56 Checking out unnecessarily changed files from master 2020-05-27 13:19:05 -03:00
Charlles Abreu
8a41f6df5b Better data encapsulation 2020-05-27 13:05:41 -03:00
Charlles Abreu
0b5d58d712 Conflict resolution in TestSplineFilter.cpp 2020-05-27 12:03:55 -03:00
peastman
2abfbb43e7 Created MTSLangevinIntegrator 2020-05-22 13:55:40 -07:00
peastman
26532ffa62 C++ exceptions get translated to Python OpenMMException class (#2672) 2020-05-06 15:43:47 -07:00
peastman
fde2ca6d99 Merge pull request #2615 from YevChern/master
Fix for CharmmPsfFile parser constrains with CHARMM TIP3 water topology
2020-04-20 13:10:02 -07:00
YevChern
250e8699c5 Make CharmmPsfFile ignore H-H water bond that is required for rigid water with original CHARMM implementation of constrains. 2020-04-18 08:45:53 -06:00
peastman
954b7fc68e Improved counting of degrees of freedom 2020-04-10 10:22:12 -07:00
Charlles Abreu
9026dbe707 Bug fix in ForceField 2020-04-05 20:01:03 -03:00
Charlles Abreu
e9912aacd7 Continuous1D functions with periodic option in ForceField 2020-04-05 18:47:19 -03:00
Charlles Abreu
9dd496144c Tested changes moved from WellTemperedMetadynamics to Metadynamics
- temporary class WellTemperedMetadynamics deleted
2020-04-03 11:49:40 -03:00
peastman
66b697f424 Increased default mass for Drude particles 2020-03-31 17:09:29 -07:00
peastman
2ca67c5c85 Added drudeMass argument for setting mass of Drude particles 2020-03-31 15:54:50 -07:00
peastman
3ef272df78 Merge pull request #2623 from peastman/patches
Changes to support CHARMM polarizable force field
2020-03-31 12:39:02 -07:00
peastman
ac6f8942f0 Patches can define virtual sites 2020-03-31 11:05:50 -07:00
peastman
a8bc6f6576 Fixed errors in adding extra particles with patches 2020-03-30 10:20:44 -07:00
Rasmus Wriedt Larsen
c8bd639278 Prefer not self == other when defining __ne__ in Python
Apparently it is the slightly more correct way of doing thigns, as explained in
https://stackoverflow.com/a/30676267/538973
2020-03-30 10:45:23 +02:00
Rasmus Wriedt Larsen
635e7914fd Fix 'too many arguments' bug in #2616 2020-03-30 10:45:17 +02:00
Charlles Abreu
0960036544 Bug fix in grid expansion 2020-03-29 20:29:46 -03:00
Charlles Abreu
7132e1d3f6 BiasVariable allows arguments with units of measurement 2020-03-29 19:21:07 -03:00
Charlles Abreu
1f4451ecc4 Metadynamics force assigned to available force group with largest index 2020-03-29 18:55:32 -03: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
Charlles Abreu
be9c2e256a Metadynamics: grid expansion for periodic variables in 2D/3D cases 2020-03-28 22:02:37 -03:00