Next: Building solvent around a
Up: Creating PSF Structure Files
Previous: Ordinary Usage
Contents
Index
Subsections
To actually run this demo requires
- the program
psfgen
from any NAMD distribution,
- the CHARMM topology and parameter files
top_all22_prot.inp
and
par_all22_prot.inp
from
http://mackerell.umaryland.edu/charmm_ff.shtml, and
- the BPTI PDB file
6PTI.pdb
available from the Protein Data Bank at
http://www.pdb.org/ by searching for 6PTI
and downloading
the complete structure file in PDB format.
In this demo, we create the files bpti.psf
and bpti.pdb
in the output directory which can then be used for a simple NAMD
simulation.
# File: bpti_example.tcl
# Requirements: topology file top_all22_prot.inp in directory toppar
# PDB file 6PTI.pdb in current directory
# Create working directory; remove old output files
mkdir -p output
rm -f output/6PTI_protein.pdb output/6PTI_water.pdb
# (1) Split input PDB file into segments}
grep -v '^HETATM' 6PTI.pdb > output/6PTI_protein.pdb
grep 'HOH' 6PTI.pdb > output/6PTI_water.pdb
# (2) Embed the psfgen commands in this script
psfgen << ENDMOL
# (3) Read topology file
topology toppar/top_all22_prot.inp
# (4) Build protein segment
segment BPTI {
pdb output/6PTI_protein.pdb
}
# (5) Patch protein segment
patch DISU BPTI:5 BPTI:55
patch DISU BPTI:14 BPTI:38
patch DISU BPTI:30 BPTI:51
# (6) Read protein coordinates from PDB file
pdbalias atom ILE CD1 CD ; # formerly "alias atom ..."
coordpdb output/6PTI_protein.pdb BPTI
# (7) Build water segment
pdbalias residue HOH TIP3 ; # formerly "alias residue ..."
segment SOLV {
auto none
pdb output/6PTI_water.pdb
}
# (8) Read water coordinaes from PDB file
pdbalias atom HOH O OH2 ; # formerly "alias atom ..."
coordpdb output/6PTI_water.pdb SOLV
# (9) Guess missing coordinates
guesscoord
# (10) Write structure and coordinate files
writepsf output/bpti.psf
writepdb output/bpti.pdb
# End of psfgen commands
ENDMOL
Step-by-step explanation of the script:
6PTI.pdb is the original file from the Protein Data Bank. It contains
a single chain of protein and some PO4 and H2O HETATM records. Since
each segment must have a separate input file, we remove all non-protein
atom records using grep. If there were multiple chains we would have
to split the file by hand. Create a second file containing only waters.
Run the psfgen program, taking everything until ``ENDMOL'' as input.
You may run psfgen interactively as well. Since psfgen is built on
a Tcl interpreter, you may use loops, variables, etc., but you must
use $$
for variables when inside a shell script. If you
want, run psfgen and enter the following commands manually.
Read in the topology definitions for the residues we will create.
This must match the parameter file used for the simulation as well.
Multiple topology files may be read in since psfgen and NAMD use atom
type names rather than numbers in psf files.
Actually build a segment, calling it BPTI and reading the sequence
of residues from the stripped pdb file created above. In addition to
the pdb command, we could specify residues explicitly. Both angles
and dihedrals are generated automatically unless ``auto none'' is added
(which is required to build residues of water). The commands ``first''
and ``last'' may be used to change the default patches for the ends of
the chain. The structure is built when the closing } is encountered,
and some errors regarding the first and last residue are normal.
Some patch residues (those not used to begin or end a chain) are
applied after the segment is built. These contain all angle and
dihedral terms explicitly since they were already generated. In this
case we apply the patch for a disulfide link three separate times.
The same file used to generate the sequence is now read to extract
coordinates. In the residue ILE, the atom CD is called CD1 in the
pdb file, so we use ``pdbalias atom'' to define the correct name. If the
segment names in the pdb file match the name we gave in the segment
statement, then we don't need to specify it again; in this case we
do specify the segment, so that all atoms in the pdb file must belong
to the segment.
Build a segment for the crystal waters. The residue type for water
depends on the model, so here we alias HOH to TIP3. Because CHARMM
uses an additional H-H bond we must disable generation of angles and
dihedrals for segments containing water. Then read the pdb file.
Alias the atom type for water oxygen as well and read coordinates from
the file to the segment SOLV. Hydrogen doesn't show up in crystal
structures so it is missing from this pdb file.
The tolopogy file contains default internal coordinates which can be
used to guess the locations of many atoms, hydrogens in particular.
In the output pdb file, the occupancy field of guessed atoms will be
set to 0, atoms which are known are set to 1, and atoms which could
not be guessed are set to -1. Some atoms are ``poorly guessed'' if
needed bond lengths and angles were missing from the topology file.
Similarly, waters with missing hydrogen coordinates are given a
default orientation.
Now that all of the atoms and bonds have been created, we can write
out the psf structure file for the system.
We also create the matching coordinate pdb file. The psf and pdb files
are a matched set with identical atom ordering as needed by NAMD.
The files bpti.pdb and bpti.psf can now be used with NAMD, but the
initial coordinates require minimization first.
The following is an example NAMD configuration file for the BPTI example.
# NAMD configuration file for BPTI
# molecular system
structure output/bpti.psf
# force field
paratypecharmm on
parameters toppar/par_all22_prot.inp
exclude scaled1-4
1-4scaling 1.0
# approximations
switching on
switchdist 8
cutoff 12
pairlistdist 13.5
margin 0
stepspercycle 20
#integrator
timestep 1.0
#output
outputenergies 10
outputtiming 100
binaryoutput no
# molecular system
coordinates output/bpti.pdb
#output
outputname output/bpti
dcdfreq 1000
#protocol
temperature 0
reassignFreq 1000
reassignTemp 25
reassignIncr 25
reassignHold 300
#script
minimize 1000
run 20000
Next: Building solvent around a
Up: Creating PSF Structure Files
Previous: Ordinary Usage
Contents
Index
http://www.ks.uiuc.edu/Research/namd/