PyLammps so far has been saving a history for every executed command. This was
originally added to allow writing out the commands of interactive PyLammps
sessions as regular input scripts.
This commit disables this history by default, which avoids the small, but
rising memory consumption over time. It can be enabled and disabled with the
enable_cmd_history property. There is also now a method to clear the history
at any time.
- update lammps python package to use setuptools
- refactor MLIAP classes into lammps python package
lammps.mliap package
- change TorchWrapper to use dtype and device as arguments
- turn activation of mliappy into functions (was a class)
- add a check to see if python interpreter is compatible
with python lib calls internal to lammps
mliap_model_python_couple.pyx:
- load models ending in '.pt' or '.pth' with pytorch rather than pickle
- Moves lammps.py into its own package
- Imports entire module in __init__.py
- Changes both how legacy and CMake build systems install
- Added traditional setup.py for Python-only installation
Note: the CMake install target runs setup.py build and install
in a way that produces files in CMAKE_BINARY_DIR/python instead
of python/build. This is to maintain out-of-source compilation
support.
This moves the lammps.get_neighlist() method to lammps.numpy.get_neighlist().
lammps.get_neighlist() now returns a NeighList object, while the NumPy variants
returns a NumPyNeighList object. The main difference between the two is that while
the ctypes variant returns neighlist elements as
atom idx (int), numneighs (int), neighbors (POINTER(c_int))
the NumPy variant returns
atom idx (int), neighbors (numpy.array)
LammpsNumpyWrapper was a class that was defined inside of the
lammps.numpy property when it was first accessed. This made it hard
to document the methods of this class.
This commit extracts this utility class into the lammps module and
renames it to 'numpy_wrapper'.