Converting a trajectory to a sequence of PDB files — MMTK User Guide 2.7.7 documentation

### Navigation

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

# Converting a trajectory to a sequence of PDB files

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    # Conversion of an MMTK trajectory into a sequence of PDB files.
    #
    # 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

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

    for i, conf in enumerate(trajectory.configuration):
        universe.writeToFile("conf%d.pdb" % i, conf)

### Navigation

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