Next: Example of a Session
Up: Creating PSF Structure Files
Previous: Building solvent around a
- topology
list
file name
Purpose: Read in molecular topology definitions from file.
Arguments:
file name
: CHARMM format topology file.
list: Lists all currently specified topology files.
residues: Return a list of the known residue topologies.
patches: Return a list of the known residue patches.
Context: Beginning of script, before segment. May call multiple times.
- topology alias
alternate residue name
existing residue name
Purpose: Provide alternate names for residues found in topology file.
An alternate name used to generate a residue will be used on output.
Compare to ``pdbalias residue'' below, in which the real name
is used on output.
Arguments:
alternate residue name
: Desired residue name.
existing residue name
: Residue name found in topology file.
Context: Before reading sequence with pdb. May call multiple times.
- pdbalias residue
alternate name
real name
Purpose: Provide translations from residues found in PDB files to proper
residue names read in from topology definition files. Proper names
from topology files will be used in generated PSF and PDB files.
Compare to ``topology alias'' above, in which the alias is
is used as the residue name in generated files.
This command also exists under the deprecated name alias.
Arguments:
alternate name
: Residue name found in PDB file.
real name
: Residue name found in topology file or aliases.
Context: Before reading sequence with pdb. May call multiple times.
- segment
segids
resids
residue
first
last
segment ID
resid
atom name
{
commands
}
Purpose: Build a segment of the molecule. A segment is typically a single
chain of protein or DNA, with default patches applied to the termini.
Segments may also contain pure solvent or lipid. Options
segids
resids
residue
first
last
are used to query
information about the specified segment.
Arguments: segids: Return a list of segids for the molecule in the current context.
resids: Return a list of resids for the given segment in the current context.
residue: Return the residue name of the residue in the given segment with the given resid.
atoms: Return a list of atoms for the given segment with the given resid.
coordinates: Return x, y, z coordinates for the given atom.
velocities: Return x, y, z velocities for the given atom.
mass: Return the mass of the given atom.
charge: Return the charge of the given atom.
atomid: Return the one-based atomid of the given atom. These are only assigned/updated when writing a file. Therefore writepsf, writepdb, or writemol must be called to avoid returning old atomid values or zero.
first: Returns the name of the patch that was applied
to the beginning of the specified segment.
last: Returns the name of the patch that was applied
to the end of the specified segment.
segment ID
: Unique name for segment, 1-4 characters.
commands
: Sequence of commands in Tcl syntax to build the primary
structure of the segment, including auto, first, last, residue, pdb, etc.
Context: After topology definitions and residue aliases. May call multiple times.
Structure information is generated at the end of every segment command.
- auto
angles
dihedrals
none
Purpose: Override default settings from topology file for automatic generation of
angles and dihedrals for the current segment.
Arguments: angles: Enable generation of angles from bonds.
dihedrals: Enable generation of dihedrals from angles.
none: Disable generation of angles and dihedrals.
Context: Anywhere within segment, does not affect later segments.
- first
patch name
Purpose: Override default patch applied to first residue in segment.
Default is read from topology file and may be residue-specific.
Arguments:
patch name
: Single-target patch residue name or none.
Context: Anywhere within segment, does not affect later segments.
- last
patch name
Purpose: Override default patch applied to last residue in segment.
Default is read from topology file and may be residue-specific.
Arguments:
patch name
: Single-target patch residue name or none.
Context: Anywhere within segment, does not affect later segments.
- residue
resid
resname
chain
Purpose: Add a single residue to the end of the current segment.
Arguments:
resid
: Unique name for residue, 1-5 characters, usually numeric.
resname
: Residue type name from topology file.
chain
: Single-character chain identifier.
Context: Anywhere within segment.
- pdb
file name
Purpose: Extract sequence information from PDB file when building segment.
Residue IDs will be preserved, residue names must match entries in
the topology file or should be aliased before pdb is called.
Arguments:
file name
: PDB file containing known or aliased residues.
Context: Anywhere within segment.
- mutate
resid
resname
Purpose: Change the type of a single residue in the current segment.
Arguments:
resid
: Unique name for residue, 1-5 characters, usually numeric.
resname
: New residue type name from topology file.
Context: Within segment, after target residue has been created.
- patch
list
patch residue name
segid:resid
...
Purpose: Apply a patch to one or more residues. Patches make small modifications to
the structure of residues such as converting one to a terminus, changing the
protonation state, or creating disulphide bonds between a pair of residues.
Arguments: list: Lists all patches applied explicitey using the command 'patch'.
listall: Lists all currently applied patches including default patches.
patch residue name
: Name of patch residue from topology definition file.
segid:resid
: List of segment and residue pairs to which patch should be applied.
Context: After one or more segments have been built.
- regenerate
angles
dihedrals
Purpose: Remove all angles and/or dihedrals and completely regenerate them using
the segment automatic generation algorithms. This is only needed if
patches were applied that do not correct angles and bonds. Segment and
file defaults are ignored, and angles/dihedrals for the entire molecule
are regenerated from scratch.
Arguments: angles: Enable generation of angles from bonds.
dihedrals: Enable generation of dihedrals from angles.
Context: After one or more segments have been built.
- regenerate
resids
Purpose: Remove insertion codes and minimally modify resids to retain uniqueness.
No modifications will be made in segments that have monotonically increasing resids
and do not contain insertion codes.
Within a segment, no modifications will be made to residues preceeding the
first non-increasing resid or residue with an insertion code.
Arguments: resids: Enable regeneration of resids to remove insertion codes.
Context: After one or more segments have been built.
- multiply
factor
segid
:resid
:atomname
...
Purpose: Create multiple images of a set of atoms for use in locally enhanced sampling. The beta column of the output pdb file is set to 1...
factor
for each image. Multiple copies of bonds, angles, etc. are created. Atom, residue or segment names are not altered; images are distinguished only by beta value. This is not a normal molecular structure and may confuse other tools.
Arguments:
factor
:
segid:resid:atomname
: segment, residue, or atom to be multiplied. If :resid is omitted the entire segment is multiplied; if :atomname is omitted the entire residue is multiplied. May be repeated as many times as necessary to include all atoms.
Context: After one or more segments have been built, all patches applied, and coordinates guessed. The effects of this command may confuse other commands.
- delatom
segid
resid
atomname
Purpose: Delete one or more atoms. If only segid is specified, all atoms from
that segment will be removed from the structure. If both segid and
resid are specified, all atoms from just that residue will be removed.
If segid, resid, and atomname are all specified, just a
single atom will be removed.
Arguments:
segid
: Segment ID of target atom.
resid
: Residue ID of target atom (optional).
atomname
: Name of target atom (optional).
Context: After one or more segments have been built.
- resetpsf
Purpose: Delete all segments in the structure. The topology definitions and
aliases are left intact. If you want to clear the topology and aliases
as well, use psfcontext reset instead.
Arguments:
Context: After one or more segments have been built.
- psfcontext
context
new
delete
Purpose: Switches between complete contexts, including structure, topology definitions,
and aliases. If no arguments are provided, the current context is returned.
If
context
or new is specified, a new context is entered and
the old context is returned. If delete is also specified, the old
context is destroyed and ``deleted
old context
'' is returned. An error
is returned if the specified context does not exist or if delete was
specified and the current context would still be in use.
It may be possible to write robust, error-tolerant code with this
interface, but it would not be easy. Please employ the following revised
psfcontext usage instead.
Arguments:
context
: Context ID returned by psfcontext.
Context: At any time.
- psfcontext mixedcase
Purpose: Make context case sensitive by preserving case of all segment, residue,
atom, and patch names on input.
Arguments:
Context: Before reading files requiring case sensitive behavior,
normally as the first command.
- psfcontext allcaps
Purpose: Make context case insensitive by converting all segment, residue, atom,
and patch names to upper case characters on input. This is the default
behavior and should match the behavior of versions prior to 1.5.0.
Arguments:
Context: Before reading files requiring case insensitive behavior,
not needed in normal use.
- psfcontext reset
Purpose: Clears the structure, topology definitions, and aliases, creating
clean environment just like a new context.
Arguments:
Context: At any time.
- psfcontext create
Purpose: Creates a new context and returns its ID, but does not switch to it.
This is different from psfcontext new above, which switches to
the newly created context and returns the current context's ID.
Arguments:
Context: At any time.
- psfcontext delete
context
Purpose: Deletes the specified context. An error is returned if the
specified context does not exist or would still be in use.
This is different from psfcontext
context
delete above,
which switches to the specified context and deletes the current one.
Arguments:
context
: Context ID returned by psfcontext.
Context: At any time.
- psfcontext eval
context
{
commands
}
Purpose: Evaluates
commands
in the specified context, returning to the current
context on exit. This should be totally robust, returning to the orignal
context in case of errors and preventing its deletion when nested.
Arguments:
context
: Context ID returned by psfcontext create.
commands
: Script to be executed in the specified context.
Context: At any time.
- psfcontext stats
Purpose: Returns the total numbers of contexts that have been created and destroyed.
This is useful for checking if a script is leaking contexts.
Arguments:
Context: At any time.
- writepsf
charmm
x-plor
cmap
nocmap
nopatches
file name
Purpose: Write out structure information as PSF file. A simplified session log is listed in the REMARKS
section of the PSF file.
Arguments: charmm: Use CHARMM format (numbers for atom types).
x-plor: Use X-PLOR format (names for atom types), the default format required by NAMD.
cmap: Write cross-term entries to PSF file if present, the default.
nocmap: Do not write cross-term entries to PSF file, even if present.
nopatches: Do not write list of applied patches to PSF file header.
file name
: PSF file to be generated.
Context: After all segments have been built and patched.
- readpsf
file name
pdb
pdb file name
namdbin
namdbin file name
velnamdbin
velocity file name
Purpose: Read in structure information from PSF file and add it to the structure.
Optionally also read coordinates and insertion codes from a PDB file,
assuming that the atom order is the same in both files.
Optionally also read coordinates a NAMD binary file,
assuming that the atom order is the same as the psf file.
It is an error if any segments in the PSF file already exist.
Arguments:
file name
: PSF file in X-PLOR format (names for atom types).
pdb: Read coordinates and insertion codes from PDB file.
pdb file name
: PDB file with atoms in same order as PSF file.
namdbin: Read coordinates from NAMD binary file.
namdbin file name
: NAMD binary file with atoms in same order as PSF file.
velnamdbin: Read velocities from NAMD binary file.
velocity file name
: NAMD binary velocity file with atoms in same order as PSF file.
Context: Anywhere but within segment.
- pdbalias atom
residue name
alternate name
real name
Purpose: Provide translations from atom names found in PDB files to proper
atom names read in from topology definition files. Proper names
from topology files will be used in generated PSF and PDB files.
This command also exists under the deprecated name alias.
Arguments:
residue name
: Proper or aliased residue name.
alternate name
: Atom name found in PDB file.
real name
: Atom name found in topology file.
Context: Before reading coordinates with coordpdb. May call multiple times.
- coordpdb
file name
segid
namdbin
namdbin file name
Purpose: Read coordinates from PDB file, matching segment, residue and atom names.
Arguments:
file name
: PDB file containing known or aliased residues and atoms.
segid
: If specified override segment IDs in PDB file.
namdbin: Read coordinates from NAMD binary file.
namdbin file name
: NAMD binary file with atoms in same order as PDB file.
Context: After segment has been generated and atom aliases defined.
- guesscoord
Purpose: Guesses coordinates of atoms for which they were not explicitly set.
Calculation is based on internal coordinate hints contained in toplogy
definition files. When these are insufficient, wild guesses are attempted
based on bond lengths of 1 Å and angles of 109
.
Arguments: None.
Context: After stucture has been generated and known coordinates read in.
- coord
segid
resid
atomname
{ x y z }
Purpose: WILL BE DEPRECATED AFTER VERSON 1.6 (use psfset coord instead) Set coordinates for a single atom.
Arguments:
segid
: Segment ID of target atom.
resid
: Residue ID of target atom.
atomname
: Name of target atom.
{ x y z }
: Coordinates to be assigned.
Context: After structure has been generated.
- psfset
attribute
segid
resid
atomname
value
Purpose: Set an attribute for a given segment, residue, or atom.
Arguments:
attribute
:
Segment attributes:
segid: the name of the segment
Residue attributes:
resname: the name of the residue
Atom attributes:
name: the name of the atom,
mass: the mass of the atom,
charge: the charge of the atom,
beta: the PDB bfactor of the atom,
coord: the coordinates of the atom as {x y z},
vel: the velocity of the atom as {vx vy vz}
segid
: Segment ID of target segment, residue, or atom.
resid
: Residue ID of target residue or atom.
atomname
: Name of target atom.
value
: Value to be assigned.
Context: After structure has been generated or read from file.
- writepdb
file name
Purpose: Writes PDB file containing coordinates. Atom order is identical to
PSF file generated by writepsf (unless structure has been changed).
The O field is set to 1 for atoms with known coordinates, 0 for atoms
with guessed coordinates, and -1 for atoms with no coordinate data
available (coordinates are set to 0 for these atoms).
Arguments:
file name
: PDB file to be written.
Context: After structure and coordinates are complete.
- writenamdbin
file name
velnamdbin
velocity file name
Purpose: Writes NAMD binary file containing coordinates. Atom order is identical to
PSF file generated by writepsf (unless structure has been changed).
Coordinates are set to 0 for atoms with no coordinate data.
Arguments:
file name
: NAMD binary file to be written.
velnamdbin: Also write velocities to NAMD binary file.
velocity file name
: NAMD binary velocity file to be written.
Context: After structure and coordinates are complete.
Next: Example of a Session
Up: Creating PSF Structure Files
Previous: Building solvent around a
http://www.ks.uiuc.edu/Research/namd/