"openmmapi/vscode:/vscode.git/clone" did not exist on "908340c179c8607107bc862635fea8aea5ed9a8e"
- 29 Mar, 2020 1 commit
-
-
Rasmus Wriedt Larsen authored
* 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]: https://github.com/openmm/openmm/blob/5cef29ce8d4e17b6d0f9fd8a3c6cc1669ca0ba2b/wrappers/python/setup.py#L237 * Use umambiguous floor division for index calculations in Python This makes the code work as intended if run...
-
- 08 Aug, 2019 1 commit
-
-
Andreas Krämer authored
-
- 02 Sep, 2014 1 commit
-
-
peastman authored
-