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)
This includes an example of how to implement fix NVE in Python.
The library interface was extended to provide direct access to atom data using
numpy arrays. No data copies are made and numpy operations directly manipulate
memory of the native code.
To keep this numpy dependency optional, all functions are wrapped into the
lammps.numpy sub-object which is only loaded when accessed.
- make all python potential classes derived from LAMMPSPairPotential
which contains shared functionality. We currently don't check
for supported atom types. may want to add that again later.
- keep track of skipped atom types in the C++ code.
- add test against units setting. must set self.units='...' in constructor
- make compute_force method consistent with Pair::single() in LAMMPS and return force/r instead of force.
- rename potentials.py to py_pot.py
- update test runs. some small tweaks.
with the single function, python pair styles can be massively
sped up and made compatible to accelerators, as one can translate
the analytic force and energy functions through LAMMPS into suitable
tables and then simply use the on-the-fly tables for production runs
Implements a class loader which takes a fully qualified Python class
name, loads the module and creates an object instance.
To add flexibility, the current working directory and the
directory specified by the LAMMPS_POTENTIALS environment variable are
added to the module search path.