Skip to Tutorial Content

Click Start Over at the left bottom to start Back to Contents


2.1 Generate structures

package require psfgen

resetpsf

topology /home/zig/MD/toppar/top_all36_prot.rtf

# topology /home/kuangz/WRK/FY20/PeptideDesign/toppar/toppar_water_ions.str

pdbalias atom ILE CD1 CD

pdbalias residue HOH TIP3

pdbalias residue HIS HSD

segment A {

# first ACE

first NTER

pdb modelA.pdb

last CTER

# last CT3

}

# patch CTER A:1273

# patch NTER A:1

patch DISU A:131 A:166

patch DISU A:291 A:301

patch DISU A:336 A:361

patch DISU A:379 A:432

patch DISU A:391 A:525

patch DISU A:538 A:590

patch DISU A:617 A:649

patch DISU A:662 A:671

patch DISU A:738 A:760

patch DISU A:743 A:749

patch DISU A:1032 A:1043

patch DISU A:1082 A:1126

patch DISU A:840 A:851

patch DISU A:1243 A:1247

coordpdb modelA.pdb A

guesscoord

regenerate angles dihedrals

writepdb chainA.pdb

writepsf chainA.psf

exit

2.2 Merge structures

package require psfgen

resetpsf

readpsf chainA.psf

readpsf chainB.psf

readpsf chainC.psf

coordpdb chainA.pdb

coordpdb chainB.pdb

coordpdb chainC.pdb

writepdb com.pdb

writepsf com.psf

exit

2.3 Delete molecules

cd /home/kuangz/WRK/FY21/SProtein/efield

set newpsf “com.psf”

set newfile “prod.coor”

#mol new $newpsf type psf waitfor all

#mol addfile $newfile type pdb waitfor all

mol load psf $newpsf pdb min1/$newfile

set all [atomselect top all]

$all writepdb all.pdb

set badwater [atomselect top “water or ions”]

set seglist [$badwater get segid]

set reslist [$badwater get resid]

mol delete all

package require psfgen

resetpsf

readpsf $newpsf

coordpdb all.pdb

foreach segid $seglist resid $reslist {

delatom $segid $resid

}

writepsf membprt.psf

writepdb membprt.pdb

exit

2.4 Mutate residues

package require psfgen

topology /home/kuangz/MD/toppar/top_all36_prot.rtf

resetpsf

pdbalias atom ILE CD1 CD

pdbalias residue HOH TIP3

pdbalias residue HIS HSD

segment PROA {

pdb chainA.pdb

mutate 986 LYS

mutate 987 VAL

}

coordpdb chainA.pdb

guesscoord

regenerate angles dihedrals

writepsf newA.psf

writepdb newA.pdb

exit

2.5 Fit and replace coordinates

set WrkDir “/home/kuangz/WRK/FY21/thermal/ZGI6”

set chain {“A” “B” “C”}

cd $WrkDir

set j 0

set CHN [lindex $chain $j]

set cryoPDB chain${CHN}.pdb

set refPDB npt29${CHN}.pdb

# load molecule

mol load pdb $cryoPDB

mol load pdb ../$refPDB

# select cryo

set cryoAll [atomselect 0 all]

set cryoCA [atomselect 0 “name CA”]

set cryoResid [$cryoCA get resid]

set cryoResname [$cryoCA get resname]

set fileName ${CHN}Resid.dat

set fileID [open $fileName w]

puts $fileID “$cryoResid”

puts $fileID “$cryoResname”

close $fileID

# select ref

set refCA [atomselect 1 “(name CA) and (resid $cryoResid)”]

set refResid [$refCA get resid]

set refResname [$refCA get resname]

set fileName ${CHN}ResidRef.dat

set fileID [open $fileName w]

puts $fileID “$refResid”

puts $fileID “$refResname”

close $fileID

if {[llength $refResid] != [llength $cryoResid]} {

puts “Number of residues are not equal.”

exit;

}

# fit cryo to ref

$cryoAll move [measure fit $cryoCA $refCA]

puts “RMSD: [measure rmsd $cryoCA $refCA]”

# replace ref coordinates

set newCoor [$cryoCA get {x y z}]

$refCA set {x y z} $newCoor

set refAll [atomselect 1 all]

$refAll set beta 0

$refAll set occupancy 0

$refCA set beta 1

$refCA set occupancy 3

$refAll writepdb ref${CHN}.pdb

puts “RMSD: [measure rmsd $cryoCA $refCA]”

exit

2 Build structure using VMD