Commit Graph

96 Commits

Author SHA1 Message Date
Richard Berger 9a027a01da Add Python 3 compatibility to PYTHON package 2017-04-11 20:24:42 -04:00
Richard Berger cda8213892 Added Python matplotlib plot example 2017-03-16 01:41:28 -04:00
Richard Berger ef940d226c Improve Python 3 compatibility of pizza tools and simplify read_snapshot code 2017-03-16 01:38:05 -04:00
Richard Berger 36da9223ec Fix dump cfg in vizplotgui_atomeye.py example 2017-03-15 22:55:51 -04:00
Richard Berger eb29ef32b1 Fix space/tab error in pizza/gl.py 2017-03-15 22:43:00 -04:00
Richard Berger 29550d472d Fix dump cfg in viz_atomeye.py example 2017-03-15 22:31:14 -04:00
Richard Berger 79cae51156 Document property 'uses_exceptions' of Python interface 2017-03-15 22:20:30 -04:00
Richard Berger a210867025 Fixes lammps_create_atoms library function and its Python interface variant
The interface of that function has changed and includes two additional
parameters, which haven't been added to the Python interface either.
This showed up by trying to run the simple.py example.
2017-03-15 22:13:06 -04:00
Richard Berger 0262a54ecf Fix Python 3 compatibility by encoding strings passed as c_char_p 2017-03-15 22:00:43 -04:00
Richard Berger 359af419a7 Fix typo in python README 2017-03-07 00:58:35 -05:00
Richard Berger d6800405a5 Fix more typos in examples 2017-03-07 00:57:23 -05:00
Richard Berger e261bef7bb Spelling fixes in source files 2017-03-05 18:30:39 -05:00
Richard Berger 2383c31f15 Created PyLammps documentation
Based on material presented during MD Workshop at Temple University in
August 2016.
2016-11-18 23:58:57 -07:00
Steve Plimpton d9891abdf4 new library functions 2016-10-27 09:34:04 -06:00
Steve Plimpton 2106dce2b3 new fix halt command, other sundry small bug fixes 2016-10-18 13:11:40 -06:00
Axel Kohlmeyer 0b426dadc1 do not require the LAMMPS shared library when loading the python wrapper from inside LAMMPS
Thanks to Giacomo Fiorin for figuring this out with NAMD/Colvars.
This requires linking with -Xlinker -export-dynamic or equivalent,
which is the default when using python-config to provide linker flags.
We will fall back to loading the DSO in case the initial load fails.
2016-10-12 18:36:38 -04:00
Richard Berger e2caf5c105 Fix code path which allows passing a C++ ptr to PyLammps 2016-10-04 13:57:21 -04:00
Richard Berger 91be47a0d0 Revert type checking commit from July
0aebb2eabe
2016-10-04 11:43:12 -04:00
Richard Berger c87f9aeb9f Merge remote-tracking branch 'akohlmey/integration' into ipython-update-and-cleanup 2016-09-26 11:59:30 -04:00
Richard Berger d3406df6a0 Updated instructions in IPython notebooks
Make.py is now used to enable exceptions support
2016-09-21 12:07:59 -04:00
Richard Berger a4c8c9b1f9 Strip IPython notebooks of output 2016-09-21 11:35:00 -04:00
Richard Berger f1183cb97c Remove old copies of IPython notebooks 2016-09-21 11:28:15 -04:00
Richard Berger 04eadb6341 Merge remote-tracking branch 'akohlmey/integration' into library_interface_abort 2016-09-20 16:41:36 -04:00
Richard Berger f4263e3849 Simplify MPI abort code path, make C++ exceptions optional 2016-09-20 16:16:36 -04:00
Axel Kohlmeyer aa9fe38c5c consolidate ignoring python bytecompiled cache files 2016-09-17 09:50:49 -04:00
Richard Berger 8db7ef4364 Merge remote-tracking branch 'akohlmey/integration' into library_interface_abort 2016-09-16 18:46:43 -04:00
Richard Berger 76d876f861 Allow detection of MPI_Abort condition in library call
The return value of `lammps_get_last_error_message` now encodes if the last
error was recoverable or should cause an `MPI_Abort`. The driving code is
responsible of reacting to the error and calling `MPI_Abort` on the
communicator it passed to the LAMMPS instance.
2016-09-15 22:11:58 -04:00
Richard Berger 5cdc48dd0c Update ipython example to show interface usage 2016-09-14 16:26:19 -04:00
Richard Berger 0ec8fa02e0 Make thermo output accessable through PyLammps
Thermo data of the last run is now accessable through the `last_run.thermo`
property. This is a dictionary containing the data columns of thermo output.
All run data is kept as list and can be found in the `runs` property.
See issue #144
2016-09-14 16:14:41 -04:00
Richard Berger 6e3705f380 Allow writing input script from Python session
This implements the requested feature in issue #145. The `write_script`
method now gives you a way of dumping out all used commands into a
LAMMPS input script file.

Note: this also dumps all commands which are indirectly issued by PyLammps
2016-09-14 14:24:19 -04:00
sjplimp 1c3302d1db Merge pull request #15 from rbberger/pylammps-improvements
PyLammps improvements
2016-08-31 16:34:59 -06:00
Richard Berger 6cbdad7a97 Add utility function to IPyLammps for embedding videos 2016-08-30 11:34:16 -04:00
Richard Berger a08cf7a4b6 Add verbose option in PyLammps methods
This option allows forcing LAMMPS output to be printed to the console.
2016-08-30 11:34:16 -04:00
Richard Berger 691de01b33 Allow setting the position of atoms 2016-08-30 11:34:16 -04:00
Richard Berger 33a87a470a Return 2D vectors in 2D cases 2016-08-30 11:34:15 -04:00
Richard Berger 59dc83eadb Fix resource leak 2016-08-30 11:34:15 -04:00
Richard Berger e5c37bc7cb Implemented optional C++ exceptions in Error class
These can be activated using the -DLAMMPS_EXCEPTIONS compiler flag.
It has no effect for regular execution. However, while using
it as a library, any issued command will capture the exception
and save its error message. This can be queried using the
lammps_has_error() and lammps_get_last_error_message() methods.

The Python wrapper checks these in order to rethrow these errors
as Python exceptions. See issue #146.

(cherry picked from commit 6c154bb0b67a13d38968bc42d31013b97f87db75)
2016-08-24 15:31:30 -04:00
sjplimp 7dc6873c51 git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@15360 f3b2605a-c512-4ea7-a41b-209d697bcdaa 2016-07-22 22:59:39 +00:00
sjplimp 952a0d1fb7 git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@15359 f3b2605a-c512-4ea7-a41b-209d697bcdaa 2016-07-22 22:58:42 +00:00
sjplimp 778f4d338c git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@15358 f3b2605a-c512-4ea7-a41b-209d697bcdaa 2016-07-22 22:57:54 +00:00
sjplimp 80fce623ec git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@15326 f3b2605a-c512-4ea7-a41b-209d697bcdaa 2016-07-15 22:59:07 +00:00
sjplimp 194a512168 git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@15087 f3b2605a-c512-4ea7-a41b-209d697bcdaa 2016-05-31 16:45:20 +00:00
sjplimp c3a95c782b git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@15039 f3b2605a-c512-4ea7-a41b-209d697bcdaa 2016-05-12 13:53:40 +00:00
sjplimp a70623ee43 git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@14592 f3b2605a-c512-4ea7-a41b-209d697bcdaa 2016-02-15 15:30:15 +00:00
sjplimp 87a47d8b99 git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@14330 f3b2605a-c512-4ea7-a41b-209d697bcdaa 2015-12-09 21:33:03 +00:00
sjplimp 900a3aaf9d git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@14328 f3b2605a-c512-4ea7-a41b-209d697bcdaa 2015-12-09 21:10:06 +00:00
sjplimp 6eed163c7b git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@14327 f3b2605a-c512-4ea7-a41b-209d697bcdaa 2015-12-09 21:09:58 +00:00
sjplimp e000e4a04f git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@14326 f3b2605a-c512-4ea7-a41b-209d697bcdaa 2015-12-09 21:09:50 +00:00
sjplimp b10ae0abaf git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@14270 f3b2605a-c512-4ea7-a41b-209d697bcdaa 2015-11-21 00:35:23 +00:00
sjplimp ae980d6fd1 git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@13986 f3b2605a-c512-4ea7-a41b-209d697bcdaa 2015-09-02 20:41:38 +00:00