<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.pymol.org/index.php?action=history&amp;feed=atom&amp;title=CreateSecondaryStructure</id>
	<title>CreateSecondaryStructure - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.pymol.org/index.php?action=history&amp;feed=atom&amp;title=CreateSecondaryStructure"/>
	<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=CreateSecondaryStructure&amp;action=history"/>
	<updated>2026-09-02T23:10:07Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=CreateSecondaryStructure&amp;diff=5344&amp;oldid=prev</id>
		<title>Pyadmin: 9 revisions</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=CreateSecondaryStructure&amp;diff=5344&amp;oldid=prev"/>
		<updated>2014-03-28T01:43:40Z</updated>

		<summary type="html">&lt;p&gt;9 revisions&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 01:43, 28 March 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Pyadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=CreateSecondaryStructure&amp;diff=5343&amp;oldid=prev</id>
		<title>Newacct at 08:14, 27 November 2009</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=CreateSecondaryStructure&amp;diff=5343&amp;oldid=prev"/>
		<updated>2009-11-27T08:14:15Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;===DESCRIPTION===&lt;br /&gt;
To build a peptide sequence.  &lt;br /&gt;
&lt;br /&gt;
===SETUP===&lt;br /&gt;
run CreateSecondaryStructure.py&lt;br /&gt;
&lt;br /&gt;
===NOTES / STATUS===&lt;br /&gt;
*Tested on Pymolv1.0, Windows platform&lt;br /&gt;
*Many bugs to be found&lt;br /&gt;
&lt;br /&gt;
===USAGE===&lt;br /&gt;
*seqInfo = getTableFromCsvFile(&amp;quot;seqInfo.csv&amp;quot;)&lt;br /&gt;
 with in the file something like:&lt;br /&gt;
 MET,-54,-47&lt;br /&gt;
 PRO,-54,-47&lt;br /&gt;
&lt;br /&gt;
*seqInfo = [['MET',-57,-47],['PRO',-57,-47]]&lt;br /&gt;
*createPeptide(seqInfo)&lt;br /&gt;
&lt;br /&gt;
===EXAMPLES===&lt;br /&gt;
 seqInfo = [['MET',-57,-47],['PRO',-57,-47]]&lt;br /&gt;
 createPeptide(seqInfo)&lt;br /&gt;
&lt;br /&gt;
===SCRIPTS (CreateSecondaryStructures.py)===&lt;br /&gt;
CreateSecondaryStructures.py &lt;br /&gt;
 &amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
##############################################&lt;br /&gt;
#   Original Author:  Dan Kulp&lt;br /&gt;
#   Date  :  9/8/2005&lt;br /&gt;
#    MOdified by Jurgen F. Doreleijers&lt;br /&gt;
#    For Hamid Eghbalnia               &lt;br /&gt;
#&lt;br /&gt;
#############################################&lt;br /&gt;
# Call in window like : &lt;br /&gt;
# @C:\Documents and Settings\jurgen.WHELK.000\workspace\Wattos\python\Wattos\Utils\CreateSecondaryStructures.py&lt;br /&gt;
# Next line is a pymol directive&lt;br /&gt;
python&lt;br /&gt;
import urllib&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Well I guess one can build a protein with it but the vdw contacts would be horrible.&lt;br /&gt;
# Peptide needs to be at least 2 residues.&lt;br /&gt;
def createPeptide(seqInfo):&lt;br /&gt;
    cmd.delete(&amp;quot;all&amp;quot;)&lt;br /&gt;
    # Creates residue TWO&lt;br /&gt;
    editor.attach_amino_acid('pk1',seqInfo[1][0]) &lt;br /&gt;
    # Creates residue ONE&lt;br /&gt;
    createSS('resi 2', sequence=seqInfo[0][0],terminal='N')&lt;br /&gt;
    print &amp;quot;found sequence info for number of residues: &amp;quot;, len(seqInfo)&lt;br /&gt;
    for i in range(2,len(seqInfo) ):&lt;br /&gt;
        # resn is the residue number of the new residue&lt;br /&gt;
        resn = i + 1&lt;br /&gt;
        print &amp;quot;Adding residue: &amp;quot;, resn,   seqInfo[i][0]&lt;br /&gt;
        # Note that the previous residue is numbered i. &lt;br /&gt;
        resi = 'resi '+`i`&lt;br /&gt;
        createSS(resi, sequence=seqInfo[i][0])&lt;br /&gt;
    for i in range( len(seqInfo) ):&lt;br /&gt;
        resi = 'resi '+`i+1`&lt;br /&gt;
#        print &amp;quot;Setting backbone angles for residue: &amp;quot;, (i+1),   seqInfo[i][0],seqInfo[i][1],seqInfo[i][2]&lt;br /&gt;
        set_phipsi(resi,seqInfo[i][1],seqInfo[i][2])&lt;br /&gt;
    &lt;br /&gt;
# Create generic secondary structure, based off a selection&lt;br /&gt;
def createSS(sel, sequence='ALA',repeat=1,terminal='C'):&lt;br /&gt;
&lt;br /&gt;
    # Set selection&lt;br /&gt;
    selection = &amp;quot;%s and name %s&amp;quot; % (sel,terminal)&lt;br /&gt;
&lt;br /&gt;
    # Pick atom for editing - interestingly only need to do this for the first addition&lt;br /&gt;
    cmd.edit(selection,None,None,None,pkresi=0,pkbond=0)&lt;br /&gt;
&lt;br /&gt;
    # Array of residues&lt;br /&gt;
    seq = sequence.split(&amp;quot;,&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    # Get residue numbering .. potential bug here if number is inconsistent.. (Only works at c-terminal)&lt;br /&gt;
    resi = int(cmd.get_model(sel).atom[0].resi) + 1&lt;br /&gt;
    # Loop and build new residues&lt;br /&gt;
    for i in range(1,repeat+1):&lt;br /&gt;
        for s in seq:&lt;br /&gt;
#            print &amp;quot;residue[%i]: %s %s&amp;quot; % (i,s,terminal)&lt;br /&gt;
            editor.attach_amino_acid('pk1',s)&lt;br /&gt;
&lt;br /&gt;
    # Remove extra OXT carboxylate atom (OXT1, OXT2 ?) .. fix as needed&lt;br /&gt;
    if terminal == 'C':&lt;br /&gt;
        cmd.remove(&amp;quot;%s and name OXT&amp;quot; % sel)&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
def set_phipsi(sel,phi,psi):&lt;br /&gt;
    # Get atoms from selection&lt;br /&gt;
    atoms = cmd.get_model(&amp;quot;byres (&amp;quot;+sel+&amp;quot;)&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    # Loop through atoms in selection        &lt;br /&gt;
    for at in atoms.atom:&lt;br /&gt;
        if at.name == &amp;quot;N&amp;quot;:&lt;br /&gt;
            # Check for a null chain id (some PDBs contain this) &lt;br /&gt;
            unit_select = &amp;quot;&amp;quot;&lt;br /&gt;
            if not at.chain == &amp;quot;&amp;quot;:&lt;br /&gt;
               unit_select = &amp;quot;chain &amp;quot;+str(at.chain)+&amp;quot; and &amp;quot;&lt;br /&gt;
    &lt;br /&gt;
            try:&lt;br /&gt;
                # Define residue selections     &lt;br /&gt;
                residue_def_prev = unit_select+'resi '+str(int(at.resi)-1)&lt;br /&gt;
                residue_def      = unit_select+'resi '+str(at.resi)        &lt;br /&gt;
#                print &amp;quot;residue_def_prev: [%s]&amp;quot; % residue_def_prev&lt;br /&gt;
#                print &amp;quot;residue_def     : [%s]&amp;quot; % residue_def&lt;br /&gt;
                if at.resn == &amp;quot;PRO&amp;quot;:&lt;br /&gt;
                    print &amp;quot;Skipping setting phi for PRO&amp;quot;&lt;br /&gt;
                else:&lt;br /&gt;
                    old_phi = cmd.get_dihedral(residue_def_prev+' and name C',residue_def+' and name N', residue_def+' and name CA',residue_def+' and name C')        &lt;br /&gt;
                    cmd.set_dihedral(          residue_def_prev+' and name C',residue_def+' and name N', residue_def+' and name CA',residue_def+' and name C'      ,phi)&lt;br /&gt;
                    print &amp;quot;Changed residue %4s %4s phi: from %6.1f to %6.1f&amp;quot; % (at.resn, at.resi, old_phi, float(phi))        &lt;br /&gt;
            except:&lt;br /&gt;
                &lt;br /&gt;
                print &amp;quot;Note skipping set of phi because of error; this is normal for a N-terminal residue&amp;quot;&lt;br /&gt;
            try:&lt;br /&gt;
                residue_def      = unit_select+'resi '+str(at.resi)&lt;br /&gt;
                residue_def_next = unit_select+'resi '+str(int(at.resi)+1)&lt;br /&gt;
#                print &amp;quot;residue_def     : [%s]&amp;quot; % residue_def&lt;br /&gt;
#                print &amp;quot;residue_def_next: [%s]&amp;quot; % residue_def_next&lt;br /&gt;
                old_psi = cmd.get_dihedral(residue_def     +' and name N',residue_def+' and name CA',residue_def+' and name C', residue_def_next+' and name N')&lt;br /&gt;
                cmd.set_dihedral(          residue_def     +' and name N',residue_def+' and name CA',residue_def+' and name C', residue_def_next+' and name N',psi)&lt;br /&gt;
                print &amp;quot;Changed residue %4s %4s psi: from %6.1f to %6.1f&amp;quot; % (at.resn, at.resi, old_psi, float(psi))        &lt;br /&gt;
            except:&lt;br /&gt;
                print &amp;quot;Note skipping set of psi; this is normal for a C terminal residue&amp;quot;&lt;br /&gt;
&lt;br /&gt;
def getTableFromCsvFile(urlLocation):&lt;br /&gt;
  result = []&lt;br /&gt;
  r1 = urllib.urlopen(urlLocation)&lt;br /&gt;
  data = r1.read()&lt;br /&gt;
  r1.close()  &lt;br /&gt;
  dataLines = data.split(&amp;quot;\n&amp;quot;)   &lt;br /&gt;
  for dataLine in dataLines:&lt;br /&gt;
    if dataLine:&lt;br /&gt;
        result.append( dataLine.split(',') )     &lt;br /&gt;
  return result&lt;br /&gt;
&lt;br /&gt;
# next line is a pymol directive.&lt;br /&gt;
python end&lt;br /&gt;
&lt;br /&gt;
os.chdir(&amp;quot;C:\Documents and Settings\jurgen.WHELK.000\workspace\Wattos\python\Wattos\Utils&amp;quot;)&lt;br /&gt;
seqInfo = getTableFromCsvFile(&amp;quot;seqInfo.csv&amp;quot;)&lt;br /&gt;
createPeptide(seqInfo)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library|CreateSecondaryStructure]]&lt;br /&gt;
[[Category:Structural_Biology_Scripts|CreateSecondaryStructure]]&lt;/div&gt;</summary>
		<author><name>Newacct</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=CreateSecondaryStructure&amp;diff=5341&amp;oldid=prev</id>
		<title>Jurgenfd at 14:01, 22 August 2007</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=CreateSecondaryStructure&amp;diff=5341&amp;oldid=prev"/>
		<updated>2007-08-22T14:01:27Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 14:01, 22 August 2007&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l32&quot; &gt;Line 32:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 32:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#############################################&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#############################################&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Call in &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pymol &lt;/del&gt;window like :  &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Call in window like :  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# @C:\Documents and Settings\jurgen.WHELK.000\workspace\Wattos\python\Wattos\Utils\CreateSecondaryStructures.py&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# @C:\Documents and Settings\jurgen.WHELK.000\workspace\Wattos\python\Wattos\Utils\CreateSecondaryStructures.py&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Next line is a pymol directive&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Next line is a pymol directive&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l58&quot; &gt;Line 58:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 58:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     for i in range( len(seqInfo) ):&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     for i in range( len(seqInfo) ):&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         resi = 'resi '+`i+1`&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         resi = 'resi '+`i+1`&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;        &lt;/del&gt;print &amp;quot;Setting backbone angles for residue: &amp;quot;, i,   seqInfo[i][0],seqInfo[i][1],seqInfo[i][2]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;#        &lt;/ins&gt;print &amp;quot;Setting backbone angles for residue: &amp;quot;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;(&lt;/ins&gt;i&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;+1)&lt;/ins&gt;,   seqInfo[i][0],seqInfo[i][1],seqInfo[i][2]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         set_phipsi(resi,seqInfo[i][1],seqInfo[i][2])&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         set_phipsi(resi,seqInfo[i][1],seqInfo[i][2])&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l108&quot; &gt;Line 108:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 108:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                 else:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                 else:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                     old_phi = cmd.get_dihedral(residue_def_prev+' and name C',residue_def+' and name N', residue_def+' and name CA',residue_def+' and name C')         &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                     old_phi = cmd.get_dihedral(residue_def_prev+' and name C',residue_def+' and name N', residue_def+' and name CA',residue_def+' and name C')         &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;                    print &amp;quot;Changing phi: &amp;quot;+at.resn+str(at.resi)+&amp;quot; from &amp;quot;+str(old_phi)+&amp;quot; to &amp;quot;+str(phi)        &lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                     cmd.set_dihedral(          residue_def_prev+' and name C',residue_def+' and name N', residue_def+' and name CA',residue_def+' and name C'      ,phi)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                     cmd.set_dihedral(          residue_def_prev+' and name C',residue_def+' and name N', residue_def+' and name CA',residue_def+' and name C'      ,phi)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;                    print &amp;quot;Changed residue %4s %4s phi: from %6.1f to %6.1f&amp;quot; % (at.resn, at.resi, old_phi, float(phi))        &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             except:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             except:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                 print &amp;quot;Note skipping set of phi; this is normal for a N-terminal residue&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;                &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                 print &amp;quot;Note skipping set of phi &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;because of error&lt;/ins&gt;; this is normal for a N-terminal residue&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             try:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             try:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                 residue_def      = unit_select+'resi '+str(at.resi)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                 residue_def      = unit_select+'resi '+str(at.resi)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l118&quot; &gt;Line 118:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 119:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#                print &amp;quot;residue_def_next: [%s]&amp;quot; % residue_def_next&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#                print &amp;quot;residue_def_next: [%s]&amp;quot; % residue_def_next&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                 old_psi = cmd.get_dihedral(residue_def     +' and name N',residue_def+' and name CA',residue_def+' and name C', residue_def_next+' and name N')&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                 old_psi = cmd.get_dihedral(residue_def     +' and name N',residue_def+' and name CA',residue_def+' and name C', residue_def_next+' and name N')&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;                print &amp;quot;Changing psi: &amp;quot;+at.resn+str(at.resi)+&amp;quot; from &amp;quot;+str(old_psi)+&amp;quot; to &amp;quot;+str(psi)&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                 cmd.set_dihedral(          residue_def     +' and name N',residue_def+' and name CA',residue_def+' and name C', residue_def_next+' and name N',psi)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                 cmd.set_dihedral(          residue_def     +' and name N',residue_def+' and name CA',residue_def+' and name C', residue_def_next+' and name N',psi)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;                print &amp;quot;Changed residue %4s %4s psi: from %6.1f to %6.1f&amp;quot; % (at.resn, at.resi, old_psi, float(psi))        &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             except:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;             except:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                 print &amp;quot;Note skipping set of psi; this is normal for a C terminal residue&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                 print &amp;quot;Note skipping set of psi; this is normal for a C terminal residue&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jurgenfd</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=CreateSecondaryStructure&amp;diff=5340&amp;oldid=prev</id>
		<title>Jurgenfd: Added example</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=CreateSecondaryStructure&amp;diff=5340&amp;oldid=prev"/>
		<updated>2007-08-21T01:16:41Z</updated>

		<summary type="html">&lt;p&gt;Added example&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 01:16, 21 August 2007&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l11&quot; &gt;Line 11:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 11:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===USAGE===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===USAGE===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*seqInfo = getTableFromCsvFile(&amp;quot;seqInfo.csv&amp;quot;)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*seqInfo = getTableFromCsvFile(&amp;quot;seqInfo.csv&amp;quot;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;or&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;with in the file something like:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt; MET,-54,-47&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt; PRO,-54,-47&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*seqInfo = [['MET',-57,-47],['PRO',-57,-47]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*seqInfo = [['MET',-57,-47],['PRO',-57,-47]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*createPeptide(seqInfo)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*createPeptide(seqInfo)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jurgenfd</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=CreateSecondaryStructure&amp;diff=5339&amp;oldid=prev</id>
		<title>Jurgenfd: Pretty big rewrite</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=CreateSecondaryStructure&amp;diff=5339&amp;oldid=prev"/>
		<updated>2007-08-20T21:55:23Z</updated>

		<summary type="html">&lt;p&gt;Pretty big rewrite&lt;/p&gt;
&lt;a href=&quot;//wiki.pymol.org/index.php?title=CreateSecondaryStructure&amp;amp;diff=5339&amp;amp;oldid=5338&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Jurgenfd</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=CreateSecondaryStructure&amp;diff=5338&amp;oldid=prev</id>
		<title>Jurgenfd: /* SCRIPTS (CreateSecondaryStructures.py) */</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=CreateSecondaryStructure&amp;diff=5338&amp;oldid=prev"/>
		<updated>2007-08-16T17:12:51Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;SCRIPTS (CreateSecondaryStructures.py)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 17:12, 16 August 2007&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*Many bugs found, need to be worked out before further use... stay tuned.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*Many bugs found, need to be worked out before further use... stay tuned.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l59&quot; &gt;Line 59:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 58:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Create generic secondary structure, based off a selection&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Create generic secondary structure, based off a selection&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;def createSS(sel, sequence='ALA',repeat=&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;'&lt;/del&gt;1&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;'&lt;/del&gt;,phi=-60,psi=-60,terminal='C'):&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;def createSS(sel, sequence='ALA',repeat=1,phi=-60,psi=-60,terminal='C'):&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	# Set selection&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	# Set selection&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jurgenfd</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=CreateSecondaryStructure&amp;diff=5337&amp;oldid=prev</id>
		<title>Tmwsiy at 12:31, 12 October 2005</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=CreateSecondaryStructure&amp;diff=5337&amp;oldid=prev"/>
		<updated>2005-10-12T12:31:32Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 12:31, 12 October 2005&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*Many bugs found, need to be worked out before further use... stay tuned.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===DESCRIPTION===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===DESCRIPTION===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To enable growing of a peptide sequence of one of the terminals.  The growing can be set to any secondary structure (phi,psi pairing). Only extendHelix is currently implemented, but it should be rather simple to add more functions in or tweak the existing ones.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To enable growing of a peptide sequence of one of the terminals.  The growing can be set to any secondary structure (phi,psi pairing). Only extendHelix is currently implemented, but it should be rather simple to add more functions in or tweak the existing ones.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l13&quot; &gt;Line 13:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 16:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*Tested on Pymolv0.97, Windows platform&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*Tested on Pymolv0.97, Windows platform&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*N-terminal growing doesn't work: adds residues, but doesn't set angles correctly&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*N-terminal growing doesn't work: adds residues, but doesn't set angles correctly&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*Many bugs found, need to be worked out before further use... stay tuned.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===USAGE===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===USAGE===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Tmwsiy</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=CreateSecondaryStructure&amp;diff=5336&amp;oldid=prev</id>
		<title>Tmwsiy at 02:23, 9 September 2005</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=CreateSecondaryStructure&amp;diff=5336&amp;oldid=prev"/>
		<updated>2005-09-09T02:23:23Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 02:23, 9 September 2005&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l6&quot; &gt;Line 6:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 6:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*createSS&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*createSS&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*set_phipsi&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*set_phipsi&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;===IMAGES===&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===SETUP===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===SETUP===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Tmwsiy</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=CreateSecondaryStructure&amp;diff=5335&amp;oldid=prev</id>
		<title>Tmwsiy at 02:22, 9 September 2005</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=CreateSecondaryStructure&amp;diff=5335&amp;oldid=prev"/>
		<updated>2005-09-09T02:22:06Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;===DESCRIPTION===&lt;br /&gt;
To enable growing of a peptide sequence of one of the terminals.  The growing can be set to any secondary structure (phi,psi pairing). Only extendHelix is currently implemented, but it should be rather simple to add more functions in or tweak the existing ones.&lt;br /&gt;
&lt;br /&gt;
Functions:&lt;br /&gt;
*extendHelix&lt;br /&gt;
*createSS&lt;br /&gt;
*set_phipsi&lt;br /&gt;
&lt;br /&gt;
===IMAGES===&lt;br /&gt;
&lt;br /&gt;
===SETUP===&lt;br /&gt;
run CreateSecondaryStructure.py&lt;br /&gt;
&lt;br /&gt;
===NOTES / STATUS===&lt;br /&gt;
*Tested on Pymolv0.97, Windows platform&lt;br /&gt;
*N-terminal growing doesn't work: adds residues, but doesn't set angles correctly&lt;br /&gt;
&lt;br /&gt;
===USAGE===&lt;br /&gt;
 extendHelix selection,sequence,repeat [, phi] [, psi] [, terminal ]&lt;br /&gt;
 set_phipsi selection, phi, psi&lt;br /&gt;
&lt;br /&gt;
===EXAMPLES===&lt;br /&gt;
 extendHelix('resi 1371', 'ALA,GLN,HIS,ALA', 5)&lt;br /&gt;
 set_phipsi('resi 1371', -60, -60)&lt;br /&gt;
&lt;br /&gt;
===SCRIPTS (CreateSecondaryStructures.py)===&lt;br /&gt;
CreateSecondaryStructures.py &lt;br /&gt;
 &amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
##############################################&lt;br /&gt;
#   Author:  Dan Kulp&lt;br /&gt;
#   Date  :  9/8/2005&lt;br /&gt;
#&lt;br /&gt;
#&lt;br /&gt;
#   Notes: &lt;br /&gt;
#      - Simple builds a string of residues&lt;br /&gt;
#          and sets the phi,psi angles.&lt;br /&gt;
#      - No energies are computed.&lt;br /&gt;
#      - This will generate a starting point.&lt;br /&gt;
#      - Defaultly grows from C-term, &lt;br /&gt;
#      - N-term growing currently broken&lt;br /&gt;
#############################################&lt;br /&gt;
&lt;br /&gt;
import string&lt;br /&gt;
&lt;br /&gt;
# Wrapper Functions...&lt;br /&gt;
print &amp;quot;extendHelix(selection,sequence,repeat)&amp;quot;&lt;br /&gt;
print &amp;quot;Example:\n\t extendHelix('resi 1371', 'ALA,GLN,HIS,ALA', 5)&amp;quot;&lt;br /&gt;
print &amp;quot;Note: simple build of residue type and phi,psi angle; no energy computed&amp;quot;	&lt;br /&gt;
&lt;br /&gt;
def extendHelix(sel,seq,repeat=1,phi=-60,psi=-60,terminal='C'):&lt;br /&gt;
	createSS(sel,seq,repeat,phi,psi,string.upper(terminal))&lt;br /&gt;
	cmd.select(&amp;quot;extendedHelix&amp;quot;,&amp;quot;all&amp;quot;)&lt;br /&gt;
	cmd.deselect()&lt;br /&gt;
	cmd.save(&amp;quot;./extendedHelix.pdb&amp;quot;,&amp;quot;extendedHelix&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Create generic secondary structure, based off a selection&lt;br /&gt;
def createSS(sel, sequence='ALA',repeat='1',phi=-60,psi=-60,terminal='C'):&lt;br /&gt;
&lt;br /&gt;
	# Set selection&lt;br /&gt;
	selection = &amp;quot;%s and name %s&amp;quot; % (sel,terminal)&lt;br /&gt;
&lt;br /&gt;
	# Pick atom for editing - interestingly only need to do this for the first addition&lt;br /&gt;
	cmd.edit(selection,None,None,None,pkresi=0,pkbond=0)&lt;br /&gt;
&lt;br /&gt;
	# Array of residues&lt;br /&gt;
	seq = string.split(sequence,&amp;quot;,&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	# Get residue numbering .. potential bug here if number is inconsistent.. (Only works at c-terminal)&lt;br /&gt;
	resi = int(cmd.get_model(sel).atom[0].resi) + 1&lt;br /&gt;
	&lt;br /&gt;
	# Loop and build new residues&lt;br /&gt;
	for i in range(1,repeat+1):&lt;br /&gt;
		for s in seq:&lt;br /&gt;
			print &amp;quot;residue[%i]: %s&amp;quot; % (i,s)&lt;br /&gt;
			editor.attach_amino_acid('pk1',s)&lt;br /&gt;
&lt;br /&gt;
	# Loop and set phi,psi angles for new residues&lt;br /&gt;
	if terminal == 'N':&lt;br /&gt;
		resi -= repeat&lt;br /&gt;
		&lt;br /&gt;
	for i in range(0,repeat+1):&lt;br /&gt;
		for s in seq:&lt;br /&gt;
			set_phipsi(&amp;quot;resi %i&amp;quot; % (resi), phi,psi)&lt;br /&gt;
			resi += 1&lt;br /&gt;
&lt;br /&gt;
	# Remove extra OXT carboxylate atom (OXT1, OXT2 ?) .. fix as needed&lt;br /&gt;
	if terminal == 'C':&lt;br /&gt;
		cmd.remove(&amp;quot;%s and name OXT&amp;quot; % sel)&lt;br /&gt;
	&lt;br /&gt;
	&lt;br /&gt;
def set_phipsi(sel,phi,psi):&lt;br /&gt;
&lt;br /&gt;
	# Set up some variables..&lt;br /&gt;
	residues = ['dummy']  # Keep track of residues already done&lt;br /&gt;
	probs = []            # probability of each residue conformation&lt;br /&gt;
&lt;br /&gt;
	# Get atoms from selection&lt;br /&gt;
	atoms = cmd.get_model(&amp;quot;byres (&amp;quot;+sel+&amp;quot;)&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
        # Loop through atoms in selection		&lt;br /&gt;
	for at in atoms.atom:&lt;br /&gt;
	    try:&lt;br /&gt;
	       # Don't process Glycines or Alanines&lt;br /&gt;
		if at.resn == 'GLY' or at.chain+&amp;quot;:&amp;quot;+at.resn+&amp;quot;:&amp;quot;+at.resi in residues:&lt;br /&gt;
			continue&lt;br /&gt;
&lt;br /&gt;
	        residues.append(at.chain+&amp;quot;:&amp;quot;+at.resn+&amp;quot;:&amp;quot;+at.resi)&lt;br /&gt;
&lt;br /&gt;
	        # Check for a null chain id (some PDBs contain this) &lt;br /&gt;
	        unit_select = &amp;quot;&amp;quot;&lt;br /&gt;
		if not at.chain == &amp;quot;&amp;quot;:&lt;br /&gt;
		   unit_select = &amp;quot;chain &amp;quot;+str(at.chain)+&amp;quot; and &amp;quot;&lt;br /&gt;
&lt;br /&gt;
	        # Define selections for residue i-1, i and i+1    &lt;br /&gt;
		residue_def = unit_select+'resi '+str(at.resi)&lt;br /&gt;
  		residue_def_prev = unit_select+'resi '+str(int(at.resi)-1)&lt;br /&gt;
#		residue_def_next = unit_select+'resi '+str(int(at.resi)+1)&lt;br /&gt;
&lt;br /&gt;
	        # Compute phi/psi angle&lt;br /&gt;
		old_phi = cmd.get_dihedral(residue_def+' and name CB',residue_def+' and name CA',residue_def+' and name N',residue_def_prev+' and name C')&lt;br /&gt;
		old_psi = cmd.get_dihedral(residue_def+' and name O',residue_def+' and name C',residue_def+' and name CA',residue_def+' and name CB')&lt;br /&gt;
&lt;br /&gt;
		print &amp;quot;Changing &amp;quot;+at.resn+str(at.resi)+&amp;quot; from &amp;quot;+str(old_phi)+&amp;quot;,&amp;quot;+str(old_psi)+&amp;quot; to &amp;quot;+str(phi)+&amp;quot;,&amp;quot;+str(psi)&lt;br /&gt;
&lt;br /&gt;
		cmd.set_dihedral(residue_def+' and name CB',residue_def+' and name CA',residue_def+' and name N',residue_def_prev+' and name C',phi)&lt;br /&gt;
		cmd.set_dihedral(residue_def+' and name O',residue_def+' and name C',residue_def+' and name CA',residue_def+' and name CB', psi)&lt;br /&gt;
&lt;br /&gt;
	    except:&lt;br /&gt;
		print &amp;quot;Exception Thrown&amp;quot;&lt;br /&gt;
		continue&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library|CreateSecondaryStructure]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Structural_Biology_Scripts|CreateSecondaryStructure]]&lt;/div&gt;</summary>
		<author><name>Tmwsiy</name></author>
	</entry>
</feed>