Commit Graph

84 Commits

Author SHA1 Message Date
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
sjplimp 79e142b2ca git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@13511 f3b2605a-c512-4ea7-a41b-209d697bcdaa 2015-07-02 19:09:11 +00:00
sjplimp fb2a894e03 git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@13236 f3b2605a-c512-4ea7-a41b-209d697bcdaa 2015-03-17 16:02:06 +00:00
sjplimp 6f706543fe git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@13233 f3b2605a-c512-4ea7-a41b-209d697bcdaa 2015-03-13 22:06:20 +00:00
sjplimp 3b9563910e git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@12173 f3b2605a-c512-4ea7-a41b-209d697bcdaa 2014-07-07 19:19:55 +00:00
sjplimp 87d0ff963b git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@12098 f3b2605a-c512-4ea7-a41b-209d697bcdaa 2014-06-06 23:44:49 +00:00
sjplimp d5a5342355 git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@12097 f3b2605a-c512-4ea7-a41b-209d697bcdaa 2014-06-06 23:41:42 +00:00
sjplimp f4a776d4c3 git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@11247 f3b2605a-c512-4ea7-a41b-209d697bcdaa 2014-01-17 16:11:02 +00:00
sjplimp 44917aeac7 git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@10064 f3b2605a-c512-4ea7-a41b-209d697bcdaa 2013-06-10 15:01:35 +00:00
sjplimp d91cbdf923 git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@10063 f3b2605a-c512-4ea7-a41b-209d697bcdaa 2013-06-10 15:01:13 +00:00
sjplimp 3ba07ca1e6 git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@9641 f3b2605a-c512-4ea7-a41b-209d697bcdaa 2013-03-11 21:37:15 +00:00
sjplimp ed53c9d2d5 git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@9036 f3b2605a-c512-4ea7-a41b-209d697bcdaa 2012-11-07 15:59:05 +00:00
sjplimp 8663c92293 git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@9012 f3b2605a-c512-4ea7-a41b-209d697bcdaa 2012-10-25 16:36:45 +00:00