Beispiel #1
0
def qu8(question=8):
    '''
    DESCRIPTION

   Question 8:  Find the unusual base pair between A21 and
   G36. What is the length of the H-bonds between the bases
   (ignore the H atoms in the distance measurement)? List
   the distance with the residue name, residue number, and
   atom name. What additional H-bond occurs between a base
   in this base pair and a ribose ring of one of the two
   nucleotides in this base pair?   
    '''
#    print question
    cmd.alias('aq8','reinitialize;\
    fetch 3zp8, hammer,async=0;  rock; hide everything;\
    show ribbon; show sticks, resi 21 or resi 36;\
    set_view (-0.9,-0.19,0.39,0.39,-0.74,0.55,0.19,0.65,0.74,\
    0.0,0.0,-37.58,-21.66,15.71,-23.32,35.42,39.74,-20.0);')
    print('Enter "q8" to set scene for question 8.')
    print('Enter "help(qu8)" for more information')
    print('This is the definition of the alias "aq8": \
    fetch 3zp8, hammer, async=0; rock; hide everything; show ribbon;\
    show sticks, resi 21 or resi 36;\
    set_view (-0.9,-0.19,0.39,0.39,-0.74,0.55,0.19,0.65,\
    0.74,0.0,0.0,-37.58,-21.66,15.71,-23.32,35.42,39.74,-20.0)')
Beispiel #2
0
def qu7(question=7):
    '''
    DESCRIPTION

    Question 7:  Measure the longest dimension and the
    shortest dimension of the ribozyme. What is the ratio of
    the longest dimension to the shortest dimension? Is it
    globular like a protein?
    '''
    
#    print question
    cmd.alias('aq7','reinitialize;fetch 3zp8, hammer,\
    async=0; show ribbon, hammer;rock;\
    set_view (0.62,0.14,0.78,0.13,-0.99,0.07,0.78,\
    0.05,-0.63,-0.0,-0.0,-169.8,-16.43,9.44,-9.63,\
    143.54,196.05,-20.0);')
    print 'Enter "q7" to set scene for question 7.'
    print 'Enter "help(qu7)" for more information' 
    print 'This is the definition of the alias "aq7":\
Beispiel #3
0
def qu3(question=3):
    '''
    DESCRIPTION

    Question 3: In which groove is the protein making the
    most contacts? How is this unusual? 
    '''
#    print question
    cmd.alias('aq3','reinitialize;fetch 3v6d, HIVrt,\
    async=0; show cartoon, c. A or c. B;\
    rock;set_view (0.53,-0.06,-0.84,0.82,-0.21,0.53,\
    -0.21,-0.98,-0.07,-0.0,-0.0,-192.99,-29.84,8.42,\
    47.76,178.27,207.7,-20.0);')
    print('Enter "q3" to set scene for question 3.')
    print('Enter "help(qu3)" for more information')
    print('This is the definition of the alias "aq3": \
    fetch 3v6d, HIVrt, async=0; show cartoon, c. A or c. B;rock; \
    set_view (0.53,-0.06,-0.84,0.82,-0.21,0.53,-0.21,\
    -0.98,-0.07,-0.0,-0.0,-192.99,-29.84,8.42,47.76,\
    178.27,207.7,-20.0)')
Beispiel #4
0
def qu5(question=5):
    '''
    DESCRIPTION

    Question 5:  How many axial stacks of helices does 
    the ribozyme have?
    '''
#    print question
    cmd.alias('aq5', 'reinitialize; fetch 3zp8, hammer,\
    async=0; show cartoon,hammer;rock;set_view \
    (-0.5,0.18,-0.85,-0.17,-0.98,-0.11,-0.85,0.09,0.52,0.0,0\
    .0,-167.2,-18.45,10.92,-12.11,126.37,208.02,-20.0);')
    print('Enter "q5" to set scene for question 5.')    
    print('Enter "help(qu5)" for more information')
    print('This is the definition of the alias "aq5": \
    fetch 3zp8, hammer, async=0; \
    show cartoon, c. A or c. B;rock;\
    set_view (0.53,-0.06,-0.84,0.82,-0.21,0.53,-0.21,\
    -0.98,-0.07,-0.0,-0.0,-192.99,-29.84,8.42,47.76,\
    178.27,207.7,-20.0)')
Beispiel #5
0
def qu2(question=2):
    '''
    DESCRIPTION

    Question 2: Look along the helical axis of the DNA. Is
    the DNA helix bent?
    '''
#    print question
    cmd.alias('aq2','reinitialize;\
    fetch 3v6d, HIVrt, async=0;\
    rock;show cartoon, c. P or c. T;\
    set_view (0.61,0.29,-0.73,0.78,-0.37,\
    0.51,-0.12,-0.88,-0.45,-0.0, 0.0,-192.99,\
    -29.84,8.42,47.76,178.27,207.7,-20.0);')
    print('Enter "q2" to set scene for question 2.')    
    print('Enter "help(qu2)" for more information')
    print('This is the definition of the alias "aq2": \
    fetch 3v6d, HIVrt, async=0; rock;show cartoon, c. P or c. T;\
    set_view (0.61,0.29,-0.73,0.78,-0.37,0.51,-0.12,\
    -0.88,-0.45,-0.0,-0.0,-192.99,-29.84,8.42,47.76,\
    178.27,207.7,-20.0);')
Beispiel #6
0
def qu1(question=1):
    '''
    DESCRIPTION

    Question 1: Explain how AZT terminates extension of the
    DNA chain. 
    '''
#    print question
    cmd.alias('aq1','reinitialize;fetch 3v6d, HIVrt,async=0;\
    rock;preset.ball_and_stick("c. P and i. 822");\
    set_view (-0.99,-0.1,0.06,0.09,-0.39,0.92,-0.07,\
    0.92,0.39,0.0,0.0,-29.2,-10.56,24.72,39.27,\
    23.02,35.38,-20.0)') 
    print('Enter "q1" to set scene for question 1.' )
    print('Enter "help(qu1)" for more information') 
    print('This is the definition of the alias "aq1": \
    fetch 3v6d, HIVrt, async=0; rock;\
    preset.ball_and_stick("c. P and i. 822");\
    set_view (-0.99,-0.1,0.06,0.09,-0.39,0.92,-0.07,\
    0.92,0.39,0.0,0.0,-29.2,-10.56,24.72,39.27,23.02,\
    35.38,-20.0)')
Beispiel #7
0
def qu4(question=4):
    '''
    DESCRIPTION

    Question 4:  What the dihedral angle about the disulfide
    bond between MRG81 of chain F and Cys258 of chain C?
    This is a cross link between the protein and the DNA. Is
    this a cis or trans conformation of the bonds about the
    S--S bond? Is this conformation energetically favorable
    or unfavorable? 
    '''
#    print question
    cmd.alias('aq4','reinitialize;fetch 3v6d, HIVrt, async=0;\
    preset.ball_and_stick("(c. C and i. 258) or (c. F and i. 817 )");\
    set_view (0.48,0.84,-0.27,-0.81,0.3,-0.51,-0.35,0.46,0.82,\
    0.0,-0.0,-27.26,-40.77,-53.15,12.15,25.47,29.09,-20.0);')
    print('Enter "q4" to set scene for question 4.')
    print('Enter "help(qu4)" for more information')
    print('This is the definition of the alias "aq4": \
    fetch 3v6d, HIVrt, async=0; \
    preset.ball_and_stick("(c. C and i. 258) or (c. F and i. 817 )"); \
    set_view (0.48,0.84,-0.27,-0.81,0.3,-0.51,-0.35,0.46, \
    0.82,0.0,-0.0,-27.26,-40.77,-53.15,12.15,25.47,29.09,-20.0)')
Beispiel #8
0
def qu6(question=6):
    '''
    DESCRIPTION

    Question 6:  What is the average distance of the Na1044
   ligand bonds? Give the residue numbers of the RNA
   nucleotides and the sodium to identify them. How many
   ligands are from RNA?
    '''
#    print question
    cmd.alias('aq6','reinitialize;fetch 3zp8, hammer,async=0;\
    rock; hide cartoon;\
    distance ligand1, i. 1044, c. A and i. 22 and n. N7;\
    distance ligand2, i. 1044, c. A and i. 21 and n. OP2;\
    distance ligand3, i. 1044, i. 2121;\
    distance ligand4, i. 1044, i. 2120; \
    distance ligand5, i. 1044, i. 2122; \
    distance ligand6, i. 1044, i. 2130;\
    set_view (-0.87,0.18,-0.46,-0.39,-0.81,0.44,-0.29,\
    0.56,0.78,-0.0,0.0,-20.47,-18.05,14.02,-18.89,\
    17.47,23.47,-20.0);')   
    print 'Enter "q6" to set scene for question 6.'
    print 'Enter "help(qu6)" for more information' 
    print 'This is the definition of the alias "aq6": \
Beispiel #9
0
DESCRIPTION

    API only. Context manager to restore the current scene on exit.
    '''
    def __init__(self, **kwargs):
        self.kwargs = kwargs
    def __enter__(self):
        import random
        self.name = 'tmp_%d' % (random.randint(0, 1e8))
        cmd.scene(self.name, 'store', **self.kwargs)
    def __exit__(self, type, value, traceback):
        cmd.scene(self.name, 'recall')
        cmd.scene(self.name, 'delete')

# commands
cmd.alias('z', 'zoom visible')
cmd.alias('x', 'nice')
cmd.extend('nice', nice)
cmd.extend('cbm', cbm)
cmd.extend('cbs', cbs)
cmd.extend('spectrumany', spectrumany)
cmd.extend('spectrum_states', spectrum_states)

# tab-completion of arguments
cmd.auto_arg[0]['spectrumany'] = [ expression_sc  , 'expression'      , ', ' ]
cmd.auto_arg[1]['spectrumany'] = [ cmd.auto_arg[0]['color'][0], 'color', ' ' ]
cmd.auto_arg[2]['spectrumany'] = cmd.auto_arg[2]['spectrum']
cmd.auto_arg[0]['spectrum_states'] = cmd.auto_arg[0]['disable']
cmd.auto_arg[1]['spectrum_states'] = [ cmd.auto_arg[0]['show'][0], 'representation', ' ' ]
cmd.auto_arg[2]['spectrum_states'] = cmd.auto_arg[1]['spectrumany']
Beispiel #10
0
    Then enter the name of an alias from the list above, for example: 
    
    site11
    
    To reuse of parts or all of the above commands, copy and paste the commands 
    onto the command line or into a plain text file. 
      
    These commands are sufficient for most editing tasks:  
    To edit code, positon cursor on command line with left mouse button.  
    Control-e moves the cursor to the end of the line, even when it is out of view.
    Control-a moves the cursor to the beginning of the line, even when it is out of view.    
    Up arrow key recalls last line of commands for editing.

    These commands may not be available on all systems:
    Shift-control-a selects everything from the right of the cursor to the end of the line.
    Shift-control-e selects everything to the left of the cursor to the end of the line.
    Command-f moves the cursor to the end of the current word.   
    Command-b moves the cursor to the begining of the current word.
    Control-f moves the cursor to the right by one character.   
    Control-b moves the cursor to the left by one character.
    """
cmd.extend('wtT4L',wtT4L)
print(wtT4L.__doc__)
cmd.bg_color("white")
cmd.fetch(code="3fa0", name="wtT4L",state = 0,async='0')
cmd.alias('site11', 'zoom resi 11; preset.technical("wtT4L")') 
cmd.alias('site31', 'preset.ball_and_stick("wtT4L");@S3_File.pml;set_view (0.31,-0.93,0.21,0.92,0.24,-0.29,0.22,0.28,0.93,-0.09,-0.05,-9.88,37.55,10.06,30.09,20.0,23.82,-20.0);')
cmd.alias('site96', 'preset.technical("wtT4L");set_view (-0.75,-0.65,0.11,0.62,-0.75,-0.22,0.22,-0.1,0.97,0.0,-0.0,-32.32,29.16,-1.45,6.77,27.32,37.32,-20.0);') 
cmd.alias('site99', 'preset.ball_and_stick("wtT4L");color bluewhite, i. 99; set_view (-0.24,-0.95,-0.21,0.51,0.07,-0.85,0.83,-0.32,0.46,0.03,-0.5,-5.37,22.35,-18.6,18.83,29.89,37.68,-20.0);') 
cmd.alias('site145', 'preset.technical("wtT4L");set_view (0.02,-0.63,-0.78,0.37,0.73,-0.56,0.93,-0.27,0.24,0.19,-0.3,-0.0,24.28,2 .24,13.53,15.23,21.26,-20.0);')
Beispiel #11
0
 def testAlias(self):
     stored.v = None
     cmd.alias('foo', '/stored.v = 123')
     cmd.do('_ foo', echo=0)
     self.assertEqual(stored.v, 123)
 def testAlias(self):
     stored.v = None
     cmd.alias('foo', '/stored.v = 123')
     cmd.do('_ foo', echo=0)
     self.assertEqual(stored.v, 123)
Beispiel #13
0
#    print question
    cmd.alias('aq1','reinitialize;fetch 3v6d, HIVrt,async=0;\
    rock;preset.ball_and_stick("c. P and i. 822");\
    set_view (-0.99,-0.1,0.06,0.09,-0.39,0.92,-0.07,\
    0.92,0.39,0.0,0.0,-29.2,-10.56,24.72,39.27,\
    23.02,35.38,-20.0)') 
    print('Enter "q1" to set scene for question 1.' )
    print('Enter "help(qu1)" for more information') 
    print('This is the definition of the alias "aq1": \
    fetch 3v6d, HIVrt, async=0; rock;\
    preset.ball_and_stick("c. P and i. 822");\
    set_view (-0.99,-0.1,0.06,0.09,-0.39,0.92,-0.07,\
    0.92,0.39,0.0,0.0,-29.2,-10.56,24.72,39.27,23.02,\
    35.38,-20.0)')
cmd.extend( 'qu1',qu1)
cmd.alias('q1','qu1;aq1')


def qu2(question=2):
    '''
    DESCRIPTION

    Question 2: Look along the helical axis of the DNA. Is
    the DNA helix bent?
    '''
#    print question
    cmd.alias('aq2','reinitialize;\
    fetch 3v6d, HIVrt, async=0;\
    rock;show cartoon, c. P or c. T;\
    set_view (0.61,0.29,-0.73,0.78,-0.37,\
    0.51,-0.12,-0.88,-0.45,-0.0, 0.0,-192.99,\
This is useful when aligning protein and surface previous the start of a
Rosetta SurfaceMode run. When finished type save name.pdb and protein and
surface will be saved in single pdb. Note: It is easiest to use when protein
and surface are loaded as seperate molecules.
"""
# USAGE
# F1 = translate +1 angstrom
# F2 = translate -1 angstrom
# F3 = rotate +1 degree
# F4 = rotate -1 degree
# Note: Holding down any of the above keys results in a smooth continuous
#       motion
# Specify axis by simply typing x, y, or z
# Note: You can always reset the clipping plane and depth cue by typing z

cmd.alias("x", "x()")
cmd.alias("y", "y()")
cmd.alias("z", "z()")


def x():
    print "translate or rotate about the x axis"
    print "F1 = translate positive"
    print "F2 = translate negative"
    print "F3 = rotate positive"
    print "F4 = rotate negative"
    cmd.set_key('F1', cmd.translate, ("[1,0,0]", "protein"))
    cmd.set_key('F2', cmd.translate, ("[-1,0,0]", "protein"))
    cmd.set_key('F3', cmd.rotate, ('x', 1, "protein"))
    cmd.set_key('F4', cmd.rotate, ('x', -1, "protein"))