Commit Graph

191 Commits

Author SHA1 Message Date
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
b4a1c9c24c Update examples 2020-09-17 17:08:13 -04:00
cf1ae7afa6 Use wrapper lammps.extract_atom_datatype 2020-09-17 17:04:40 -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
d88810f13a Add datatype introspection methods to library
Adds lammps_extract_atom_datatype and lammps_extract_global_datatype functions
to allow extracting type information of properties.
2020-09-17 13:43:43 -04:00
5dacfc47ca Change return type of lammps.get_natoms to int
Closes PR #2370
2020-09-17 10:57:49 -04:00
e6703019bc Update examples to use Python API constants 2020-09-16 16:10:43 -04:00
2270d8f4ec Add PyLammps.atoms test and fix bug with -echo screen/both 2020-09-16 12:48:20 -04:00
ca24806f4c Add tests 2020-09-16 10:11:00 -04:00
38f0a2e24c Fix doc build errors 2020-09-15 19:50:28 -04:00
7611efeea2 Update python docs 2020-09-15 18:03:26 -04:00
60712e3f90 Add docstrings 2020-09-15 16:22:43 -04:00
556dc67fdc Correct filename of generated image 2020-09-15 15:20:38 -04:00
6cfad41be4 Add background_color argument to IPyLammps.image 2020-09-15 15:19:39 -04:00
9490370eb0 Use consistent naming in PyLAMMPS classes 2020-09-15 12:22:36 -04:00
2c30de65d2 Fix typos in docstring 2020-09-15 12:16:47 -04:00
b20b234ebe Merge remote-tracking branch 'origin/master' into python_interface_guide 2020-09-15 10:45:28 -04:00
7b869e8ee8 Start with more detailed description of PyLammps 2020-09-11 17:09:38 -04:00
bd72ef7996 add API to library/python interface to extract the MPI communicator 2020-09-09 22:03:11 -04:00
0541996919 Merge branch 'master' into master 2020-09-01 10:59:03 +02:00
d601acd0ca merge 2020-09-01 10:57:43 +02:00
2eb6a8a8a4 update python interface 2020-09-01 10:55:45 +02:00
db9de111be updated python interface 2020-09-01 10:54:18 +02:00
17ec3a4fe8 Fix typo 2020-08-28 15:15:01 -04:00
9412d6f6fc Add missing argtypes declarations in lammps.py 2020-08-28 15:12:36 -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
caeb0af0d1 Add missing argtypes for lammps_extract_global 2020-08-28 13:54:06 -04:00
9c84fe8830 Add missing lammps_extract_compute.argtypes 2020-08-27 17:47:49 -04:00
0b8136a38b Add extract_compute, extract_fix, and extract_variable to lammps.numpy 2020-08-27 17:47:49 -04:00
26d09ea648 Use datatype constants instead of magic numbers 2020-08-27 17:47:49 -04:00
0d8baff7a9 Rename LAMMPS_DBLE2D to LAMMPS_DOUBLE2D 2020-08-27 14:03:17 -04:00
977a89e537 add separators 2020-08-27 12:33:03 -04:00
48d2a48a1f import updated python module from progguide branch 2020-08-26 09:01:59 -04:00
6f775f6592 fix typo 2020-07-11 13:06:43 -04:00
40e59b27a7 add prototypes for exception handling functions 2020-07-11 13:06:05 -04:00
758c812306 Allow query of available styles from lib interface
Adds the following new library functions:
- lammps_has_style()
- lammps_style_count()
- lammps_stlye_name()

The Info class now also has the following member functions:

- Info::has_style()
- Info::get_available_styles()
2020-03-26 22:45:18 -04:00
ca1e1e2dff Convert British spelling to American 2020-03-18 23:09:23 +09:00
649a8cc01a Fix typo 2020-03-14 13:57:48 +09:00
475b7dc4f4 provide access to number of local data rows for fixes 2020-03-07 10:58:35 -05:00
943540b015 bugfix for extracting length of local data through python interface 2020-03-07 10:19:03 -05:00
33c846cd5e guard converting thermo output from other output to the screen and do not crash
fixes #1844
2020-01-17 09:48:07 -05:00
28a9dc40cb Add docstring to new lammps.py methods 2019-11-13 15:53:25 -05:00
78d5bc3d12 Merge branch 'master' into library_interface_update 2019-11-12 15:17:32 -05:00