From: Wolbach, Jeffrey P \(WOLBACH\) (WOLBACH_at_juniata.edu)
Date: Wed Feb 16 2005 - 07:30:41 CST
VMD (and a tcl script) can be used to extract the coordinates of the
ligand and any desired amino acids from each frame of the dcd file.
These can be written back out to a new dcd file, and NAMD can be run to
calculate the energy of each frame of the new dcd file.
Here is some tcl code that extracts a solute from a solvated system. It
should be easily generalizable, the only command specific to the solute
is the set sel [ atomselect ... ]. Each command is documented in the
VMD manual, and I believe this script originally came from the VMD
website.
# Initially, load the solvated system psf and dcd files.
mol load psf ../Tetramer/ThreeStack_Capture.psf dcd
Tetramer_Comp_ReCent.dcd
# Find the number of frames.
set nf [molinfo top get numframes]
# Loop over each frame, extracting the solute from the solvated system.
# The exact syntax for the atomselect command will vary on a
system-by-system basis.
for {set i 0 } {$i < $nf } {incr i } {
set sel [atomselect top "fragment 1 or fragment 2 or fragment 3"
frame $i]
$sel writepdb $i.pdb
}
# One enters the path to the solute psf file. This psf file should be
for the solute alone,
# not the solvated system!
mol load psf PHK_Trimer.psf
for {set i 0 } {$i < $nf } {incr i } {
animate read pdb $i.pdb }
# One has to create a unique name for the extracted solute dcd file.
animate write dcd {Tetramer_ReCent_Trio.dcd} waitfor all top
for {set i 0 } {$i < $nf } {incr i } {
puts "Removing file $i.pdb"
rm $i.pdb}
exit
Exit
And now the relevant parts of the NAMD conf file to calculate energies
for each frame
#############################################################
## ADJUSTABLE PARAMETERS ##
#############################################################
# This section should contain the structure of the solutes of
# interest. It should not contain the solvated structure.
structure ../PHK_Monomer.psf
coordinates ../PHK_Monomer.pdb
set temperature 300
... < Periodic boundary conditions, P-control, T-control > ...
#############################################################
## EXECUTION SCRIPT ##
#############################################################
# runs 0 time steps for each frame in the dcd
# opens the dcd file to read the coordinates
coorfile open dcd TriFinal_Monomer.dcd
# runs 0 time steps for each frame in the dcd
set i 4000
while { ![coorfile read] } {
incr i 1 ;# This is just for labeling purposes. Each frame in the dcd
file is read sequentially,
firsttimestep $i ;# no matching of "i" to framenumber is occurring.
run 0
}
coorfile close
... < End conf > ...
JPW
-----Original Message-----
From: owner-namd-l_at_ks.uiuc.edu [mailto:owner-namd-l_at_ks.uiuc.edu] On
Behalf Of Shirley Hui
Sent: Tuesday, February 15, 2005 3:25 PM
To: Leandro Martinez; namd-l_at_ks.uiuc.edu
Subject: Re: namd-l: using namd to compute energies
I don't know if this will do what you want, but you can use mdenergy to
calculate energies of structures in DCD. I don't know if you can compute
the energy of just the ligand with one amino acid though - I've never
used it in that way before. I think the tool can be used from VMD as
well.
http://www.ks.uiuc.edu/Development/MDTools/mdenergy/
The energy calculation is the same as what NAMDs uses to compute
energies (minus rounding errors).
shirley
----- Original Message -----
From: "Leandro Martinez" <leandromartinez98_at_gmail.com>
To: <namd-l_at_ks.uiuc.edu>
Sent: Tuesday, February 15, 2005 2:24 PM
Subject: namd-l: using namd to compute energies
> I ran a simulation with namd and now I got my dcd file with
> the trajectory. The system is composed of a protein and a ligand.
> Now, I would like to compute the interaction energy
(vdw+electrostatic) of
> the ligand with one of the amino acids of the protein, at every step
> of my dcd file. Is there any simple way to use namd for performing
> this task? Could a tcl script do that either on namd or vmd? VMD
> is able to read the force field?
> Thanks in advance,
> Leandro Martinez.
>
> ----------------------------------
> Leandro Martinez
> Department of Physical Chemistry
> Institute of Chemistry
> State University of Campinas
> http://limes.iqm.unicamp.br/packmol2
> ----------------------------------
>
This archive was generated by hypermail 2.1.6 : Wed Feb 29 2012 - 15:40:31 CST