www.ks.uiuc.edu/Research/vmd .
TopoTools by Axel Kohlmeyer.
Gramicidin modelling, minimization and equilibration by VMD and NAMD.
Useful VMD scripts:
#Script for calculating number of water molecules near active site during MD simulation
mol new *.psf
mol addfile *.dcd
set frames [molinfo top get numframes]
set fp [open "waters.txt" w]
set ligand "resname MRV"
for {set i 0} {$i < $frames} {incr i} {
puts "Frame: $i"
set a [atomselect top "(water within 3 of ($ligand) and oxygen)" frame $i]
set num [$a num]
puts $fp "$i $num"
$a delete
}
close $fp
#Script for generating index file in order to modify DCD file
mol new *.psf
mol addfile *.dcd
set sel [atomselect top "not water"]
# Write index file:
set ch [open "nowater_ind.dat" w]
puts $ch [$sel get index]
close $ch
# Cut water away:
catdcd -o output.dcd -otype dcd -i nowater_ind.dat input.dcd
#Script for calculating RMSF from MD trajectories
set outfile [open rmsf.dat w]
set sel [atomselect top "name CA"]
set rmsf "[measure rmsf $sel first 0 last -1 step 1]"
for {set i 0} {$i < [$sel num]} {incr i} {
puts $outfile "[expr {$i+1}] [lindex $rmsf $i]"
}
close $outfile
#Script for calculating evaluation of radius of gyration from MD trajectories
set mol [molinfo top]
set out [open HB.dat w]
set sel [atomselect top " (protein and resid 149) and backbone "]
# set sel [atomselect top " (same residue as within 4 of resname 18F) and backbone "]
set frames [molinfo $mol get numframes]
for {set i 0} {$i < $frames} {incr i} {
$sel frame $i
$sel update
puts $out "$i [measure rgyr $sel]"
}
$sel delete
# Per residues H-bond calculation
set nf [molinfo top get numframes]
set all [atomselect top all]
set resids [lsort -unique [$all get resid]]
foreach startres $resids {
set aa [atomselect top "(mass 14.01 16 32.06) and (resid $startres)"]
set prot [atomselect top "(mass 14.01 16 32.06) and (all not resid $startres)"]
set outfile [open res$startres-hbond.dat w]
for {set i 0} {$i < $nf} {incr i} {
$aa frame $i
$prot frame $i
$aa update
$prot update
set nhb1 [llength [lindex [measure hbonds 3.5 60 $aa $prot] 0]]
set nhb2 [llength [lindex [measure hbonds 3.5 60 $prot $aa] 0]]
puts $outfile "$i $nhb1 $nhb2"
}
$aa delete
$prot delete
close $outfile
}
-----------------------------------------------------------------------------------------------------------
#Multi uploading of PDB files into the VMD.
mol load pdb 1.pdb
for {set i 1} {$i <=100} {incr i 1} {
mol addfile $i.pdb
}
---------------------------------------------------------------------------------------------------------------------------------