10 Commits

Author SHA1 Message Date
Peter Eastman
e62bdf6adb API improvements (#4437)
* Can use getPlatform() instead of getPlatformByName()

* More concise arguments for getState()
2024-02-13 15:29:55 -08: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
peastman
e23dc9272a Fixed errors passing Numpy int64 values for int arguments (#2961) 2020-12-24 21:27:41 -08:00
Jason Swails
4eb893cf52 Improve vec3 (#2230)
* Improve vec3

* Added a ``__neg__`` operator overload so that -Vec3(1, 2, 3) returns
  the same thing as Vec3(-1, -2, -3)
* Derived Vec3 from namedtuple instead of tuple. This allows you to
  access the 3 elements of the vector by name. i.e., vec.x, vec.y, vec.z

* Make sure we use floating point division all the time.
2018-12-20 11:21:39 -08:00
peastman
7c0bee4f8f Improved performance of Python State objects 2017-02-22 09:50:47 -08:00
Robert McGibbon
23143e8241 Eliminate extra warning about overriding the warning level
Clean up

Fix OpenCL platform on low-end devices

Close file before deleting in TestAmberPrmtopFile.py

Close PDBx file before deleting to fix windows test failure in TestPDbxFile.py

Fix test checkpoint reporter close file before repoening

Add bytes typemap

Update appveyor.yml

Fix exit status

Supress 4305 and 4244 warnings

Print the last failed tests output

Make numpy optional in test

Improve scipy skip too

Refactor TestCheckpointReporter.py to not require numpy

test on the proper file

Remove annoying -V
2015-08-12 23:08:17 -07:00
Robert McGibbon
b0baa00d77 Support modern swig, strip units on the C++ side of the swig wrappers. 2015-08-04 17:41:00 -07:00
Jason Swails
5b4abbb5d3 Oops... Forgot unit on the reshape command.
Add a test for the various numpy attributes (and the arguments they take) for
the unit module.
2014-11-04 11:41:01 -05:00
Jason Swails
a5c00fa550 Fix another small bug for unit handling with numpy arrays. Fixes the exception:
Traceback (most recent call last):
  File ".../python/tests/TestNumpyCompatibility.py", line 87, in testNumpyAttributes
    d = self.data.reshape((100, 3))
  File ".../simtk/unit/quantity.py", line 575, in reshape
    return Quantity(self._value.reshape(shape, order=order))
  File ".../simtk/unit/quantity.py", line 142, in __init__
    if value == first_item:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

Also add a test for new unit numpy capabilities.
2014-11-04 11:17:13 -05:00
peastman
d1d7400807 Moved Python app layer tests into the main source tree 2013-08-01 16:48:25 -07:00