Skip to content

Commit

Permalink
lammps.py_initial_commit
Browse files Browse the repository at this point in the history
  • Loading branch information
nataliyah123 committed Feb 15, 2024
1 parent e189a90 commit 70f9cbb
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions package/MDAnalysis/coordinates/LAMMPS.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,36 @@
:class:`~MDAnalysis.topology.LAMMPSParser.DATAParser`) together with a
LAMMPS DCD with "*real*" provide the keyword *format="LAMMPS*"::
..testsetup::
import MDAnalysis
..doctest::
>>> u = MDAnalysis.Universe("lammps.data", "lammps_real.dcd", format="LAMMPS")
If the trajectory uses *units nano* then use ::
.. testsetup::
import MDAnalysis
.. doctest::
>>> u = MDAnalysis.Universe("lammps.data", "lammps_nano.dcd", format="LAMMPS",
... lengthunit="nm", timeunit="ns")
To scan through a trajectory to find a desirable frame and write to a LAMMPS
data file,
.. testsetup::
import MDAnalysis
.. doctest::
>>> u = MDAnalysis.Universe("lammps.data", "lammps_nano.dcd", format="LAMMPS",
... lengthunit="nm", timeunit="ns")
>>> for ts in u.trajectory:
... # analyze frame
... if take_this_frame == True:
Expand Down

0 comments on commit 70f9cbb

Please sign in to comment.