secondary structure presentation in VMD
Hi, Phenix users, This may be a little off-topic. I have posted this in VMD users mail list. I want to try here too to see if anyone experienced similar issue. VMD and pymol gave different presentation on the secondary structure of a protein. During phenix.refinement, I added secondary structure restraints and correctly labelled all helices and sheets. However, VMD does not correctly present the secondary structure in cartoon/new-cartoon presentation. A little more detail. In VMD-1.9.4a12, after I loaded the pdb, I chose new cartoon to present the secondary structure. All chains are presented as random coil, the same as tube representation. However, pymol correctly shows the secondary structure of the same pdb file in cartoon representation. Has anyone encountered similar situation? what would be the fix? Thanks! Best Regards, Charles -- *************************************************** Charles Chen Research Instructor University of Pittsburgh School of Medicine Department of Anesthesiology ******************************************************
Hi Charles, On 21/01/2018 15:04, CPMAS Chen wrote:
This may be a little off-topic. I have posted this in VMD users mail list. I want to try here too to see if anyone experienced similar issue.
VMD and pymol gave different presentation on the secondary structure of a protein.
I correctly labelled all helices and sheets.
I wonder what that means. How did you label all helices and sheets and how did you know that you did it correctly? Paul
I’m guessing this structure is on the large side? Unless something has changed since I last used it, VMD ignores secondary structure annotations in the PDB file. It calculates them instead using an old version of STRIDE, which fails beyond 9,999 residues (or possibly atoms? Can’t remember now). One can hack together a quick-fix solution fairly easily (basically split the structure into smaller pieces, calculate for each of those then copy the results back to the master structure). If you really want the secondary structure in VMD to match what Pymol sees, you could do it fairly easily with a little scripting in both packages. VMD gets/sets secondary structure as a simple Tcl array of characters, one per residue. So all you’d need to do in Pymol is a simple loop over all residues to get their secondary structure designation and write the corresponding character to a text file. Then load the text file in VMD, convert the string to a character array, and apply it to your model. A mite fiddly, but doable. Alternatively, have you tried ChimeraX? It’s really rather nice in what it can do. Hope this helps, Tristan Tristan Croll Research Fellow Cambridge Institute for Medical Research University of Cambridge CB2 0XY
On 21 Jan 2018, at 15:44, Paul Emsley
wrote: Hi Charles,
On 21/01/2018 15:04, CPMAS Chen wrote:
This may be a little off-topic. I have posted this in VMD users mail list. I want to try here too to see if anyone experienced similar issue. VMD and pymol gave different presentation on the secondary structure of a protein. I correctly labelled all helices and sheets.
I wonder what that means. How did you label all helices and sheets and how did you know that you did it correctly?
Paul _______________________________________________ phenixbb mailing list [email protected] http://phenix-online.org/mailman/listinfo/phenixbb Unsubscribe: [email protected]
Since I'm not actually all that familiar with PyMol scripting, here's how you can write out secondary structure annotations from ChimeraX and apply them in VMD for an arbitrarily-sized structure. First, open the model in ChimeraX and go to the Python console (Tools/General/Shell). Then copy/paste the below: def write_secondary_structure(model, filename): from chimerax.core.atomic import Residue r = m.atoms.residues ss_types = r.ss_types type_dict = { Residue.SS_COIL: 'C', Residue.SS_HELIX: 'H', Residue.SS_STRAND: 'E' } with open(filename, 'w') as f: print(','.join((type_dict[s] for s in r.ss_types)), file=f) from chimerax.core.atomic import AtomicStructure m = session.models.list(type=AtomicStructure)[0] write_secondary_structure(m, 'structure.txt') This will write out the secondary structure information to structure.txt using VMD's annotation format. Then, open your model in VMD, open the console (Extensions/Tk Console) and copy/paste the below: proc apply_secondary_structure {model infile} { set infile [open $infile r] set fdata [read $infile]; puts "Read structure info" set f_structure [split [lindex $[split $fdata "\n"] 0] ","]; puts "Successfully split data" $model set structure $f_structure; puts "Applied structure to model" close $infile } set model [atomselect top all] apply_secondary_structure $model structure.txt $model delete ... and your cartoon should now look as expected. On 2018-01-21 18:23, Tristan Croll wrote:
I’m guessing this structure is on the large side? Unless something has changed since I last used it, VMD ignores secondary structure annotations in the PDB file. It calculates them instead using an old version of STRIDE, which fails beyond 9,999 residues (or possibly atoms? Can’t remember now). One can hack together a quick-fix solution fairly easily (basically split the structure into smaller pieces, calculate for each of those then copy the results back to the master structure). If you really want the secondary structure in VMD to match what Pymol sees, you could do it fairly easily with a little scripting in both packages. VMD gets/sets secondary structure as a simple Tcl array of characters, one per residue. So all you’d need to do in Pymol is a simple loop over all residues to get their secondary structure designation and write the corresponding character to a text file. Then load the text file in VMD, convert the string to a character array, and apply it to your model. A mite fiddly, but doable.
Alternatively, have you tried ChimeraX? It’s really rather nice in what it can do.
Hope this helps,
Tristan
Tristan Croll Research Fellow Cambridge Institute for Medical Research University of Cambridge CB2 0XY
On 21 Jan 2018, at 15:44, Paul Emsley
wrote: Hi Charles,
On 21/01/2018 15:04, CPMAS Chen wrote:
This may be a little off-topic. I have posted this in VMD users mail list. I want to try here too to see if anyone experienced similar issue. VMD and pymol gave different presentation on the secondary structure of a protein. I correctly labelled all helices and sheets.
I wonder what that means. How did you label all helices and sheets and how did you know that you did it correctly?
Paul _______________________________________________ phenixbb mailing list [email protected] http://phenix-online.org/mailman/listinfo/phenixbb Unsubscribe: [email protected]
_______________________________________________ phenixbb mailing list [email protected] http://phenix-online.org/mailman/listinfo/phenixbb Unsubscribe: [email protected]
participants (3)
-
CPMAS Chen
-
Paul Emsley
-
Tristan Croll