Skip to content

Instantly share code, notes, and snippets.

@leelasd
Last active April 12, 2018 21:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leelasd/5c2f446322a6a0e1ab51fcc35ac987a8 to your computer and use it in GitHub Desktop.
Save leelasd/5c2f446322a6a0e1ab51fcc35ac987a8 to your computer and use it in GitHub Desktop.
TCL script for creating PSF and PDB files from Chimera generated protein ligand files
## Written by Leela S. Dodda, leela.dodda@yale.edu
##COMMAND TO RUN THE CODE
##VMD -dispdev text -e CreatePSF.tcl
mol load pdb protein_clean.pdb
## Change the pdb file name to one of your choice
set protein [atomselect top protein]
set chains [lsort -unique [$protein get pfrag]]
foreach chain $chains {
set sel [atomselect top "pfrag $chain"]
$sel writepdb myfile_frag${chain}.pdb
}
### Split the PDB file into segments and then create a over all psf/pdb file
package require psfgen
topology top_opls_aam.inp
topology UNK.rtf
pdbalias residue HIS HSE
pdbalias residue HID HSD
pdbalias residue HIP HSP
segment PROA {
pdb myfile_frag0.pdb
}
coordpdb myfile_frag0.pdb PROA
segment PROB {
pdb myfile_frag1.pdb
}
coordpdb myfile_frag1.pdb PROB
segment LIGA {
first none
last none
pdb UNK.pdb
}
coordpdb UNK.pdb LIGA
guesscoord
writepsf complex.psf
writepdb complex.pdb
package require solvate
solvate complex.psf complex.pdb -t 12 -o complex_wb
package require autoionize
autoionize -psf complex_wb.psf -pdb complex_wb.pdb -neutralize -o ionized
exit
@leelasd
Copy link
Author

leelasd commented Mar 15, 2018

VMD -e CreatePSF.tcl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment