51 Commits

Author SHA1 Message Date
Peter Eastman
10b23bf067 Specify extras_require on all platforms (#5207) 2026-02-11 07:29:28 -08:00
Evan Pretti
8664eb15ed Update CHARMM36 2024 with fixes and add updated water models 2025-07-02 09:41:30 -07:00
Evan Pretti
a4f8921d2d Add amber19-all, update documentation and tests 2025-05-02 15:24:34 -07:00
Peter Eastman
ba9113fb1d Allow adding a suffix to the version number (#4701) 2024-10-22 17:39:37 -07:00
Peter Eastman
edb74aec35 Changes for PyPI packaging (#4662) 2024-09-18 10:36:46 -07:00
Peter Eastman
76be194cbd Replace distutils with setuptools (#4245)
* Replace distutils with setuptools

* Replace more uses of distutils
2023-09-27 16:24:27 -07:00
Raul
eda091f264 Adding an XTC reporter (#4001)
* Preliminary work on XTC reporter
1. Move and adapt xtc writer/reader from moleculekit (explicit permission
granted by the authors to do so)
2. Create XTCTrajectoryFile
3. Create XTCReporter

* Add licence and attribution to c++ xtc library
Apply clang-format to it
Remove some unused functions and document the rest

* Add attribution and licence to cython wrappers for the xtc library
Remove some unused functions

* Change XTCTrajectoryFile to XTCFile
Simplify the interface and document the class

* Add test for the xtc file parser

* Update XTC reporter with new parser name

* Fix incorrect function name in XTCReporter

* XTCFile:
	* Add function to get number of frames
	* Add function to read a group of frames from a file
	* Add tests for the above

* Ensure data is passed as float32 in XTC file

* Add XTCReporter and tests

* Add more tests to XTCReporter

* Remove unnecessary pdb reporter in XTC tests

* Copy test xtc file in python/tests/systems to build directory for testing

* Remove XTC file reading from the interface
Make XTCFile mimic DCDFile more closely

* Use xtc_read to test the correctness of the XTC reporter

* Add a test for reporting triclinic boxes

* Make XTC library compatible with triclinic boxes.
Adapt XTCFile to triclinic boxes

* Change XTCFile to take a file as argument instead of a filename

* Match DCDFile handling of the box

* Fix comment

* Revert "Change XTCFile to take a file as argument instead of a filename"

This reverts commit 9815d4790b.

* Fix dangling file name issue

* Remove index file functionality from XTC parser.
Remove unused define switch PLATFORM_Linux

* Fix formatting

* Remove inconsistent variable naming in xtcfile.py

* Change file argument name to match other reporters

* Do not turn off error checking in cython wrappers

* Fix leftover fileName in reporter

* Rewrite wrapper to xtclib in C++

* Small changes to wrapper code

* Small changes to wrapper code

* Small changes to wrapper code

* XTCFile: Get number of atoms directly from topology

* DCDFile: Get number of atoms directly from topology

* Change constexpr to const

* Check precision in XTC file matches the written one

* Add a write function to XTCFrame.
Make write check for errors C++ side.

* Rewrite large trajectory files without loading the whole file to memory

* Remove unused code in XTC test

* Avoid spurious copy of the positions array when calling xtc_write_frame

* Pass box as reference

* Remove unnecessary imports and definitions

* Fix formatting

* Use std::string instead of char*

* Use .c_str()  instead of .data()

* Fix crash in Mac by correctly checking precision

* Use TemporaryDirectory for tests instead of NamedTemporaryFile (Fixes windows ci)

* Remove unnecessary file creation

* Propagate exceptions via cython

* Switch to TemporaryDirectory in xtcfile.py

* Remove unnecessary include

* Update some comments and document functions

* Add XTC reporter to the docs
2023-04-22 16:26:19 -07:00
Peter Eastman
654c6c9c37 Implicit solvent for modern force fields (#3214)
* Created OBC2 that works with current force fields

* Created HCT, OBC1, GBn, and GBn2 that works with current force fields

* Added documentation for GB models

* Updates to documentation and tests based on comments

* Added formula for screening parameter
2021-09-08 10:10:47 -07:00
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
Isuru Fernando
a99a4e94c5 Initial fixes for Apple silicon (#2978)
* Initial fixes for Apple silicon

Doesn't work yet

* assume vec4 is supported on apple

* Trust the user with env variables

* Fix macos-version-min logic
2021-01-11 12:09:12 -08:00
peastman
a43634546a Fixed deprecated option in setup.py (#2973) 2021-01-04 13:02:53 -08: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
Andy Simmonett
5cef29ce8d Small fix for travis, make NHC public and add serialization code 2019-11-04 15:56:51 -05:00
Andy Simmonett
6307eb0dc9 Nose-Hoover working on CUDA 2019-10-24 08:04:19 -04:00
peastman
2a6a5edcfd Optimizations to Python code 2018-10-08 10:17:28 -07:00
peastman
9d9a3f4fa0 Added new Amber and CHARMM force fields 2017-11-28 13:37:03 -08:00
peastman
7c0bee4f8f Improved performance of Python State objects 2017-02-22 09:50:47 -08:00
Jason Swails
829792ef30 - Add a class to make what are intended to be Singletons really Singletons
- Make Python 2.7 a minimum requirement per pandegroup/openmm#1656
- Make the bond classes as well as other forcefield.py singletons inherit from
  Singleton to make them pickleable
- Make class Bond inherit from namedtuple instead of tuple
2016-11-10 21:59:41 -05:00
Jason Swails
9570ab9cf5 Fix very irritating behavior on some Mac systems.
Hard-code CC and CXX to clang for Macs, since gcc/g++ will *not* work with
Anaconda, despite the fact that distutils will try to use them.  System Python,
homebrew, and MacPorts on Macs will always use clang, so this hack should always
work and fix issues with users that have GCC installed from MacPorts or homebrew
*and* Anaconda.
2015-09-30 12:00:04 -04:00
peastman
b7088b7401 Python 2/3 compatibility in single code base, plus python 3 testing on travis. 2015-08-27 16:26:03 -07:00
Robert McGibbon
1ebe88ba70 merge 2015-07-24 15:09:22 -07:00
John Chodera (MSKCC)
fbfb8097ac Modified __version__ in setup.py to automatically pick up appropriate version numbers. 2015-07-14 13:18:58 -04:00
John Chodera (MSKCC)
d3b4044e13 Updated setup.py __version__ to 6.3 2015-07-13 14:01:11 -04:00
John Chodera (MSKCC)
3be0bf11d9 Changes for OpenMM 6.3beta2 2015-07-11 14:34:53 -04:00
Robert McGibbon
532f2bd6fb Update some docstrings 2015-07-07 22:25:02 -07:00
Robert T. McGibbon
e28c0da8c9 Update setup.py 2015-05-12 00:22:29 -07:00
peastman
497221582c Bug fix 2014-11-05 16:02:52 -08:00
peastman
2504cf1ac4 Initial support for reading PDBx/mmCIF files 2014-11-04 16:54:39 -08:00
peastman
a55a84c764 Fixed compilation errors on Windows 2014-08-01 15:58:16 -07:00
Jason Swails
64803f2eee Move charmm package to internal. 2014-04-10 08:56:38 -04:00
Jason Swails
f5b8e0c36f Add new package to setup.py 2014-04-09 15:25:21 -04:00
peastman
588a4c9da9 Merged changes from main branch 2013-12-10 14:03:07 -08:00
peastman
0cb269f5e3 Still more fixes for problems on OS X 10.9 2013-12-09 16:04:29 -08:00
peastman
537912e44f Include serialization classes directly in main library 2013-11-26 10:13:44 -08:00
peastman
a402cf17d7 Python records where OpenMM is installed, so it doesn't need to be specified with environment variables at runtime 2013-10-02 14:10:44 -07:00
peastman
54ef6b4c0d Get the version number from the CMake script 2013-08-02 14:48:31 -07:00
Robert McGibbon
509373c6e3 create a simtk.openmm.version module that contains the git revision 2013-08-01 16:14:04 -07:00
Peter Eastman
a9f16906e1 Created Python wrapper for Drude plugin 2013-05-17 19:39:25 +00:00
Peter Eastman
456b8a0538 Updated version number to 5.1. 2013-04-16 00:22:15 +00:00
Peter Eastman
e6220a0126 Updated Python version number to 5.0. 2012-12-18 23:39:27 +00:00
Peter Eastman
dabb49a7de Removed references to free energy plugin 2012-11-21 19:45:42 +00:00
Peter Eastman
b3fe05e966 Tolerate errors uninstalling previous versions 2012-04-12 00:20:41 +00:00
Peter Eastman
6f92b9bea6 Fixed capitalization of library name 2012-03-22 22:31:23 +00:00
Peter Eastman
a57facb4d1 Generate Python wrapper for RPMDIntegrator 2012-03-21 23:40:40 +00:00
Peter Eastman
15c272fdb0 Implemented addSolvent() 2012-02-08 18:32:05 +00:00
Peter Eastman
d648613ba6 Changes to support Python 3 2012-01-23 21:24:33 +00:00
Peter Eastman
d5a7dd89d6 Updated version number to 4.0 in two files 2011-11-18 23:52:50 +00:00
Peter Eastman
ccc0ba85e2 Moved OpenMM app into the main OpenMM project 2011-11-07 23:55:22 +00:00
Peter Eastman
3f47b9619e Removed inappropriate -m32 compilation flag 2011-05-24 18:17:41 +00:00
Peter Eastman
e49bc83f9f Renamed simtk.chem.openmm to simtk.openmm 2011-02-28 21:35:33 +00:00