Convert a trajectory to DCD format — MMTK User Guide 2.7.7 documentation

### Navigation

- index
- modules |
- MMTK User Guide 2.7.7 documentation »

# Convert a trajectory to DCD format

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    # Conversion of an MMTK trajectory to DCD format (CHARMM/XPlor).
    # A PDB file with the same atom order is created at the same time,
    # because otherwise it would be impossible to interpret the data
    # in the DCD file.
    #
    # Note: In order to create the trajectory file "rotation.nc" which is
    #       read by this example, you must run the example snapshot.py.
    #

    from MMTK import *
    from MMTK.Trajectory import Trajectory
    from MMTK.DCD import writeDCDPDB

    trajectory = Trajectory(None, "rotation.nc")
    universe = trajectory.universe

    writeDCDPDB(trajectory.configuration, 'rotation.dcd', 'rotation.pdb')

### Navigation

- index
- modules |
- MMTK User Guide 2.7.7 documentation »