Commit Graph

284 Commits

Author SHA1 Message Date
903433d9dd use datetime module to convert string date to numeric date 2021-02-09 14:22:37 -05:00
62a152e4a2 get version number from package version instead of rewriting the __init__.py file 2021-02-09 14:13:18 -05:00
653c296246 document __version__ module member and version check 2021-02-09 12:29:14 -05:00
b53b993c68 recover in-place usage by defaulting to version 0 and changing it back after installation 2021-02-09 02:12:37 -05:00
7826b58f73 add check to lammps python module to check consistent versions between module and shared library 2021-02-09 00:38:17 -05:00
0e2b528351 add additional heuristics to prevent python unit tests from failing on MacOS 2021-01-29 18:40:24 -05:00
6e43ccf32b Fixed bug in get_thermo_data where columns is set to None instead of an empty list 2021-01-27 19:41:24 -05:00
1cdce9233e identify offloading to Xeon Phi accelerator coprocessors 2021-01-16 01:07:44 -05:00
a647c236d0 make categories contain lists instead of strings as we may have multiple supported settings 2021-01-16 00:56:27 -05:00
a644375afa make code python2/3 compatible 2021-01-16 00:23:44 -05:00
22bf810b63 recover current package names. this will become simpler once #2525 is implemented 2021-01-12 20:23:57 -05:00
3d3590f02d add c-library interface and export to python 2021-01-12 20:10:47 -05:00
427d037747 Merge pull request #2508 from athomps/mliappy3
Add support for Python based models to the MLIAP package
2020-12-29 09:59:43 -05:00
5dc868ec30 whitespace 2020-12-28 09:37:13 -05:00
cf3ae8cdd2 switch setuptools back to distutils 2020-12-22 09:59:50 -07:00
e7fa0a6bac Changes to MLIAP python
- 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
2020-12-21 11:51:10 -07:00
4c7f71bef3 Merge branch 'master' into mliappy3 2020-12-18 09:16:44 -05:00
de94e28c8b correct path to find liblammps.dll with Windows installer package 2020-12-17 21:48:04 -05:00
511a1a5395 Update comments mentioning lammps.py 2020-12-17 12:13:06 -05:00
ac203b3683 Keep numpy imports inside of functions 2020-12-15 18:50:38 -05:00
33f9a29639 Split core.py into more files 2020-12-15 16:33:21 -05:00
9e188a3818 Clean up imports 2020-12-15 16:19:23 -05:00
b390c1e3d3 Split lammps.py into core.py and pylammps.py 2020-12-15 16:15:16 -05:00
aca2eefce5 Transform LAMMPS Python module into package
- 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.
2020-12-15 15:11:21 -05:00
3eb22e2406 cleanup and compilation for python off 2020-12-07 17:47:21 -05:00
664ed0f850 Merge remote-tracking branch 'origin/mliappy2' into mliappy3 2020-12-03 17:37:26 -07:00
35f2c9bdf2 Several improvements to capabilities and build.
- cmake fixed, no longer needs numpy headers.
- models can be loaded from an external interepreter.
2020-11-26 12:40:28 -07:00
875057538f Fix docstring of extract_variable 2020-11-23 12:45:37 -05:00
08d892d0d9 whitespace 2020-10-15 19:56:31 -04:00
99f9a16a25 Update Python docs 2020-10-15 18:19:57 -04:00
8c5da70823 handle the case where the variable type is invalid and thus a null pointer is returned 2020-10-12 06:16:28 -04:00
bafba4235c include versionadded tags 2020-10-09 07:26:01 -04:00
471acb2ef8 add unit tests for added APIs 2020-10-09 07:16:34 -04:00
90d511bc86 add wrappers for new library functions 2020-10-08 22:32:33 -04:00
80a054471d Merge branch 'progguide-updates' into progguide-richard 2020-10-05 19:31:03 -04:00
22cca93603 Add tests for neighbor list API 2020-10-05 17:34:08 -04:00
02b10380bc Create ctypes only neighbor list API variant
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)
2020-10-05 16:21:37 -04:00
4f1ed775e9 Add missing docstrings 2020-10-05 14:03:19 -04:00
d91d8de76d Refactor LammpsNumpyWrapper to numpy_wrapper
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'.
2020-10-02 17:28:25 -04:00
0089a35d95 Remove dead code 2020-10-02 17:27:08 -04:00
7355977819 Add missing exception handling for functions that could cause errors 2020-10-02 17:26:14 -04:00
d9cbb354d2 Move lammps exception code into its own property 2020-10-02 17:22:01 -04:00
fb33a71720 look for liblammps.dll in windows binary dir only if that directory exists 2020-10-01 00:34:03 -04:00
555fba1e4b add special case for windows installer package where the .dll file is in the bin folder 2020-09-29 18:46:32 -04:00
5ce6259632 correct reference to function 2020-09-18 22:35:56 -04:00
897a7d0ed4 only try to broadcast if we have a proper communicator 2020-09-18 21:17:31 -04:00
33a2857b33 Fix whitespace 2020-09-18 17:56:12 -04:00
635b7c04a5 Update docs and docstrings 2020-09-18 14:49:25 -04:00
1afb355d09 Limit int types to LAMMPS_INT and LAMMPS_INT64
Keep LAMMPS_TAGINT and LAMMPS_BIGINT internal to LAMMPS.
An external caller now only needs to distinguish between 32 and 64bit
integers, doubles and C strings.
2020-09-18 12:05:37 -04:00
42aca25a58 Update docs, fix typos 2020-09-17 18:10:08 -04:00