- 18 Aug, 2020 1 commit
-
-
peastman authored
* Updated to latest values for physical constants * Updated documentation on physical constants * Updated Python unit definitions * Fixed constants in test case * Added a comment
-
- 30 Mar, 2020 1 commit
-
-
Rasmus Wriedt Larsen authored
Apparently it is the slightly more correct way of doing thigns, as explained in https://stackoverflow.com/a/30676267/538973
-
- 07 Oct, 2019 2 commits
-
-
David Dotson authored
From @peastman: > Test cases are failing. I believe it's because the parent for a ScaledUnit needs to be a Unit, not another ScaledUnit. So in the line > > ``` > hartree_base_unit = ScaledUnit(4.3597447222071e-18, joule_base_unit, "hartree", "Ha") > ``` > > replace joule_base_unit with joule.
-
David Dotson authored
This is of immediate need to QCEngine, in particular MolSSI/QCEngine#151
-
- 04 Dec, 2017 1 commit
-
-
Andrea Rizzi authored
-
- 02 Nov, 2016 1 commit
-
-
Robert T. McGibbon authored
Change bohr unit to value from CODATA (http://physics.nist.gov/cgi-bin/cuu/Value?bohrrada0)
-
- 01 Nov, 2016 1 commit
-
-
Robert T. McGibbon authored
-
- 03 Nov, 2015 1 commit
-
-
Robert McGibbon authored
Swigged python docstrings now include documented return values and type information or their arguments. They are generated in numpydoc format. Furthermore, all of the Python app layer docstrings have been changed to numpydoc format. The filterPythonFiles.py script which helps to generate the Doxygen Python API docs has been updated to reflect these changes.
-
- 27 Aug, 2015 1 commit
-
-
peastman authored
-
- 23 Jun, 2015 3 commits
-
-
Jason Swails authored
-
Jason Swails authored
-
Jason Swails authored
-
- 19 Jun, 2015 2 commits
-
-
Jason Swails authored
This should be *lower* than that of Unit (and ScaledUnit/BaseUnit), since we still want Units to take priority over Quantities (but Quantity to take precedence over regular ndarrays) for reasons like this: >>> a = np.array([1]) * u.angstroms >>> b = a * u.angstroms # should be np.array([1])*u.angstroms**2 >>> np.arange(10) * a # utilize broadcasting [1 2 3 4 5 6 7 8 9 10] A**2
-
Jason Swails authored
The main thing that's done here is that numpy arrays can be given units via the * operator, rather than relying on the Quantity constructor e.g., >>> import numpy as np >>> np.zeros(10) * u.angstroms Quantity(value=array([ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]), unit=angstrom) yay!
-
- 08 Dec, 2014 1 commit
-
-
Jason Swails authored
are NOT numpy arrays.
-
- 06 Dec, 2014 1 commit
-
-
Jason Swails authored
-
- 04 Nov, 2014 2 commits
-
-
Jason Swails authored
Add a test for the various numpy attributes (and the arguments they take) for the unit module.
-
Jason Swails authored
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.
-
- 03 Nov, 2014 2 commits
-
-
Jason Swails authored
underlying numpy array. This function would be used in instances where, for instance, a certain API would send a flattened array of coordinates or velocities with units attached, and you wanted to reshape the array into (natom, 3) to be consistent with OpenMM's Context object.
-
Jason Swails authored
arguments and pass them to the numpy function if applicable. That way, users get the full flexibility of the numpy API on those particular methods AND get the added benefit that the result has the correct units (and it all runs fast).
-
- 15 Oct, 2014 1 commit
-
-
Peter Eastman authored
-
- 06 Oct, 2014 4 commits
-
-
Jason Swails authored
-
Jason Swails authored
it. Not only that, I got this FutureWarning: /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/simtk/unit/quantity.py:170: FutureWarning: comparison to `None` will result in an elementwise object comparison in the future. if value == None:
-
Jason Swails authored
-
Jason Swails authored
sqrt of the variance), and average, returning a Quantity with the proper units. This should be reasonably efficient, as it takes advantage of numpy-accelerated methods if they're present.
-
- 16 Jul, 2014 1 commit
-
-
peastman authored
-
- 09 Dec, 2013 1 commit
-
-
peastman authored
-
- 06 Dec, 2013 1 commit
-
-
Patrick Grinaway authored
-
- 05 Dec, 2013 1 commit
-
-
Patrick Grinaway authored
-
- 12 Jul, 2013 1 commit
-
-
Justin MacCallum authored
-
- 20 May, 2012 1 commit
-
-
Lee-Ping Wang authored
-
- 07 May, 2012 1 commit
-
-
Peter Eastman authored
-
- 27 Mar, 2012 1 commit
-
-
Peter Eastman authored
-
- 13 Mar, 2012 1 commit
-
-
Peter Eastman authored
-
- 11 Feb, 2012 1 commit
-
-
Peter Eastman authored
-
- 08 Feb, 2012 1 commit
-
-
Peter Eastman authored
-
- 23 Jan, 2012 2 commits
-
-
Peter Eastman authored
-
Peter Eastman authored
-
- 15 Nov, 2011 1 commit
-
-
Peter Eastman authored
-
- 18 May, 2011 1 commit
-
-
Peter Eastman authored
-