Skip to main content
. Author manuscript; available in PMC: 2016 Jan 1.
Published in final edited form as: Methods Mol Biol. 2015;1215:253–287. doi: 10.1007/978-1-4939-1465-4_12
# Load package
package require psfgen
# Load starting structures
resetpsf
readpsf membrane.psf
coordpdb membrane.pdb
readpsf leut_autopsf.psf
coordpdb leut_autopsf.pdb
# Output a combined structure
writepsf leut_mem.psf
writepdb leut_mem.pdb
# Load combined structure
mol load psf leut_mem.psf pdb leut_mem.pdb
# Delete lipid and water molecules within 1.2 A of protein
# Get segids to check
set check_sel [atomselect top “resname POPE or water”]
set check_sel_segs [lsort -unique [$check_ sel get segid]]
foreach list_seg $check_sel_segs {
# find atoms
set current_atom [atomselect top “segid $list_seg and within 1.2 of protein”]
# delete residues
set current_res [lsort -unique [$current_ atom get resid]]
foreach res $current_res {
   delatom $list_seg $res
}
}
# Output modified structure
writepsf leut_mem_no_overlap.psf
writepdb leut_mem_no_overlap.pdb
# Load modified structure for viewing
mol load psf leut_mem_no_overlap.psf pdb leut_mem_no_overlap.pdb