Commit Graph

51 Commits

Author SHA1 Message Date
728b4801fd Use other example for thermo_style multi test 2021-03-08 18:15:43 -05:00
f92089298d Fix bug in AvgChunkReader and add docs 2021-02-25 16:56:19 -05:00
977ba9ff66 Add LogFile and AvgChunkFile readers
Implements changes proposed in #144
2021-02-25 15:32:53 -05:00
0c34810518 lmp.mpi4py will always be false if LAMMPS has been compiled without MPI support 2021-02-17 15:29:33 -05:00
01a05b88b4 avoid memory leak in unit test fixture 2021-02-08 10:43:18 -05:00
95b445a25a must initialized has_exceptions to avoid false positives in unit tests 2021-01-29 18:38:33 -05:00
a2d7d47cac add unittest for python interface of accelerator config introspection 2021-01-16 17:12:29 -05:00
fec52f6a48 make CMake script formatting more consistent 2020-12-29 10:40:39 -05:00
79833f9b83 Merge pull request #2521 from rbberger/python_package
Turn LAMMPS Python module into Python package
2020-12-17 17:06:03 -05:00
162d34d168 Update Python coverage tests 2020-12-15 17:58:41 -05:00
2a763d1713 PythonCommands test fails without exceptions enabled 2020-12-15 15:00:31 -05:00
91f21fcd9e Merge pull request #2487 from akohlmey/collected-small-changes
Collected small changes and fixes
2020-11-30 11:36:23 -05:00
569a000e6b reformat unittest sources with clang-format 2020-11-25 16:51:41 -05:00
7aa45ea816 Add numpy variants of extract_variable tests 2020-11-23 14:14:29 -05:00
ebf3c180c2 Add unit test for extract_global (LAMMPS_DOUBLE) 2020-11-23 13:43:15 -05:00
2ce10cc435 Add unit test for get_thermo 2020-11-23 13:35:17 -05:00
3ddc1e680c Add unit test for extract_variable (atomstyle) 2020-11-23 13:14:15 -05:00
5ff0c3d4f0 Add unit test for extract_variable (equalstyle) 2020-11-23 13:07:00 -05:00
d5169a9dc2 Add Python unit tests for extract_box and reset_box 2020-11-12 12:29:13 -05:00
adf74b3a22 use https://lammps.sandia.gov based URLs consistently 2020-10-21 16:45:30 -04:00
8ab5f3c71a adjust recently added/expanded tests so they skip tests when packages are missing 2020-10-13 15:42:21 -04:00
24cec51e85 add tests for using python invoke and python style variables 2020-10-12 06:17:16 -04:00
6cda1e16ae add test program template for testing the PYTHON package 2020-10-12 02:40:02 -04:00
471acb2ef8 add unit tests for added APIs 2020-10-09 07:16:34 -04:00
22cca93603 Add tests for neighbor list API 2020-10-05 17:34:08 -04:00
b57c8f6b77 Add tests for LAMMPS exceptions in Python 2020-10-02 16:53:41 -04:00
7d07d04989 Use correct library for unit test if LAMMPS_MACHINE_NAME is set 2020-09-20 17:52:24 -04:00
61ce73273b Add missing -u flag for unbuffered PyLammps tests
Addresses issue #2380
2020-09-19 23:07:13 -04:00
6dda562501 skip over uninitialized and internal variables. correctly identify all kinds of boolean values 2020-09-18 23:40:31 -04:00
ab6b69d6bd Add documentation and better autodetect 2020-09-17 16:39:19 -04:00
b81ad54baa Simplify extract_atom and extract_global in Python interface
Both extract methods now can auto-detect the datatype of both global
and per-atom properties. Callers can still enforce different types
if needed by specifying the now optional dtype argument.

The numpy wrapper now has a new extract_atom function method, which
replace the extract_atom_darray and extract_atom_iarray method and
autodetects both type and size. All parameters can still be forced
to use different values if needed.
2020-09-17 16:16:27 -04:00
9fa43b8b12 Skip Numpy tests if not installed 2020-09-17 12:03:36 -04:00
5dacfc47ca Change return type of lammps.get_natoms to int
Closes PR #2370
2020-09-17 10:57:49 -04:00
12582edfb7 Add numpy.extract_atom_darray test 2020-09-16 18:04:45 -04:00
ccc743e13e Add test for thermo data 2020-09-16 15:14:05 -04:00
8ccd3c03fa Correct test name 2020-09-16 12:54:36 -04:00
2270d8f4ec Add PyLammps.atoms test and fix bug with -echo screen/both 2020-09-16 12:48:20 -04:00
9cdd35e625 Make sure Python tests run unbuffered so PyLammps works 2020-09-16 11:28:38 -04:00
ca24806f4c Add tests 2020-09-16 10:11:00 -04:00
e5e449795a Add tests for has_style and available_styles 2020-09-15 15:16:19 -04:00
77d475d121 Add more tests 2020-09-11 15:48:23 -04:00
58833ce11e Add API tests 2020-09-11 15:21:36 -04:00
1855f92694 Use include and omit 2020-09-11 12:44:41 -04:00
377163d940 Add target to generate Python coverage XML 2020-09-11 11:36:22 -04:00
96db122377 Add Python coverage collection if enabled 2020-09-04 17:15:51 -04:00
02ea7af1f7 let dummy tests pass 2020-08-28 18:49:39 -04:00
cb09844182 Add placeholders for future tests 2020-08-28 17:52:15 -04:00
6bcc263b41 Ensure LAMMPS pointer is of type c_void_p
Fixes segfaults caused by API change. The API change in
lammps_open and lammps_open_no_mpi makes them return the LAMMPS pointer
via their return value. However due to how ctypes operates, even
if restype is specified to be c_void_p, the function returns an integer.

Without the proper type of the pointer, calling functions without arglists would default
to using 32bit integers to pass an argument, which cuts away parts of the 64bit pointer.
Subsequently, resolving the truncated pointer in the library causes segfaults.

This commit fixes the root cause. But it also highlights the need of specifying
the arglists of all library functions.
2020-08-28 14:21:03 -04:00
167f12a4a4 Add python test for extract_compute of peratom vector 2020-08-28 13:53:36 -04:00
d7e2be1c81 Start Python interface tests for numpy extensions 2020-08-27 17:47:49 -04:00