Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
The VTF trajectory/structure/coordinate format was designed for people using their own hand-written simulation codes and coarse-grained simulations that want to visualize their simulations using VMD. In VTF, VSF and VCF files, it is possible to specify all properties that are used by the VMD viewer.
The format is used by the coarse-grained simulation package ESPResSo.
An example VTF file can be found here.
Table of Contents
- The basic unit of a file is a line.
- A block consists of an arbitrary number of lines, up to a line starting a new block.
- Files consist of structure blocks and timestep/coordinate blocks.
- VSF (VTF Structure Format) files only contain a structure block.
- VCF (VTF Coordinate Format) files only contain timestep/coordinate blocks.
- VTF (VTF Trajectory Format) files start with a structure block and contain an arbitrary number of timestep blocks afterwards.
- Lines ending with the character `\` are continuation lines, i.e. the line is concatenated with the next line to form a single line.
- Comment lines starting with `#` and lines containing only whitespace characters are ignored.
- Leading whitespace characters in a line are ignored.
Structure blocks describe the structure of a simulated system, i.e. the characteristics of the atoms, the bonds, and the unitcell size. Structure blocks consist of Atom lines, Bond lines and Unitcell lines. The type of each line is identified by the first non-whitespace character.
Atom lines define atoms and their properties.
# Specify 4 coarse-grained lipids with 7 beads each atom 0,7,14,21 name HEAD resname LIPID radius 1.1 atom 1:2,8:13,15:20,22:27 name TAIL resname LIPID radius 1.0 atom 0:6 resid 0 segid UPPER atom 7:13 resid 1 segid UPPER # in fact, 'a' is enough to identify an atom line a 14:20 resid 2 segid LOWER # or even no keyword at all 21:27 resid 3 segid LOWER
[a[tom]] <aid-specifier>[, <aid-specifier>...] [<options>...]
n[ame] <char>: atom name
t[ype] <char>: atom type
resid <int>: residue id
res[name] <char>: residue name
r[adius] <float>: VDW radius
s[egid] <char>: segment id
c[hain] <char>: chain id
charge|q <float>: charge
a[tomicnumber] <int>: atomic number
altloc <char>: PDB alternative location
i[nsertion] <char>: PDB insertion
o[ccupancy] <float>: occupancy
b[factor] <float>: b-factor
m[ass] <float>: mass
- The line starts with an aid-specifier or the keyword
- An aid-specifier specifies, which atoms the line refers to:
defaultrefers to the default atom that is used as a template for new atoms.
- A single atom id specifies a single atom.
- A range specifier
<from>:<to>denotes a range of atoms.
- Whenever an atom id is used that is greater than the greatest atom id so far, all atoms up to this new greatest id are made copies of the default atom.
- The options can be used to specify the different properties of the atoms.
- You can have more than a single atom line to define the properties of an atom. The final properties of an atom are a combination of the properties given on all atom lines.
Bond lines define bonds between atoms. They can occur in a structure block in the VTF format.
# Specify a ring of 6 atoms bond 0::5,5:0
b[ond] <bond-specifier>[, <bond-specifier>...]
- The line starts with the keyword
- A bond-specifier defines one or more bonds:
<from>:<to>defines a bond between atoms from and to
<from>::<to>defines, that the atoms between from and to are a chain with bonds between two adjacent atoms.
Unitcell lines define the size of the unitcell (or periodic boundary conditions) of the system.
unitcell 10.0 10.0 10.0 90 90 90
p[bc]|u[nitcell] <a> <b> <c> [<alpha> <beta> <gamma>]
- The line starts with one of the keywords
- a, b, and c define the dimensions of the unitcell in x,y and z directions.
- alpha, beta and gamma define the angles (in degrees) of the unitcell as defined in the VMD user's guide.
- If the angles are omitted, the unitcell is assumed to be rectangular (i.e. alpha=beta=gamma=90).
Timestep/coordinate blocks describe the positions of the atoms in a simulated system, as well as the size of the unitcell in a given timestep in a simulation where the unitcell size changes. A timestep/coordinate block starts with a Timestep line. The following lines are either Unitcell lines (as in the structure block) or Coordinate definition lines in ordered or indexed format. If the unitcell data or the coordinates of some of the atoms are not specified in a timestep, they are taken from the previous timestep, if accessible.
A timestep line defines the beginning of a new timestep block in the VTF format, and it defines the format of the coordinate definition lines in the block.
- The line starts with one of the keywords
- The keyword
o[rdered]specifies that the following coordinate definition lines are in ordered format.
- The keyword
i[ndexed]specifies that the following coordinate definition lines are in indexed format.
- If no corresponding keyword is found, the following coordinate definition lines are assumed to be in ordered format.
# several variants timestep coordinates timestep indexed ordered # very short t i
Coordinate definition lines define the coordinates of a single atom in the system.
timestep indexed 0 5.0 7.0 5.0
<x> <y> <z>
<aid> <x> <y> <z>
- In ordered format, the lines are associated with ascending atom ids.
- In indexed format, the coordinates x, y and z are associated to the atom id aid.
- The first timestep in a multi-timestep file should be an ordered timestep, so that all atoms are defined.
- The timestep in a single-timestep file should be an ordered timestep, so that all atoms are defined.
- The rest of the line that does not specify the coordinates and aid will be ignored.