sequence='A',
                    chain='0',
                    number='227')

nt212_0.infer_hydrogens()
nt213_0.infer_hydrogens()
nt214_0.infer_hydrogens()
nt215_0.infer_hydrogens()
nt225_0.infer_hydrogens()
nt226_0.infer_hydrogens()
nt227_0.infer_hydrogens()

# Test:  superimpose 7 nucleotides:

d = discrepancy(
    [nt77_9, nt78_9, nt79_9, nt80_9, nt102_9, nt103_9, nt104_9],
    [nt212_0, nt213_0, nt214_0, nt215_0, nt225_0, nt226_0, nt227_0])
print "Discrepancy", d

# location error (squared) is 0.5372
# discrepancy should be about 0.1159
# discrepancy is sqrt(L^2 + A1^2 + A2^2 + ... + A7^2)/7, where L is location error and A1 ... A7 are angles between bases in radians
# angles between bases should be about 0.0700, 0.0287, 0.0547, 0.0754, 0.0262, 0.0580, 0.1083
# or else twice that, not quite sure

# rotation matrix should be about:
#    0.4780    0.4348   -0.7632
#   -0.2844   -0.7455   -0.6028
#   -0.8311    0.5051   -0.2327

# Test:  superimpose 5 nucleotides:
nt215_0 = Component([Atom(type='N', name='N9',x=65.975257,y=88.831997,z=40.136012),Atom(type='C', name='C4',x=66.702401,y=89.994667,z=40.011532),Atom(type='N', name='N3',x=67.766022,y=90.236385,z=39.231838),Atom(type='N', name='N1',x=67.704136,y=92.464071,z=40.195458),Atom(type='C', name='C6',x=66.639983,y=92.179942,z=40.958219),Atom(type='N', name='N6',x=66.133569,y=93.137006,z=41.768617),Atom(type='C', name='C8',x=64.985309,y=89.076727,z=41.054098),Atom(type='C', name='C5',x=66.078611,y=90.886197,z=40.892056),Atom(type='C', name='C2',x=68.193729,y=91.493083,z=39.393252),Atom(type='N', name='N7',x=65.006984,y=90.308925,z=41.540918),Atom(type='H', name='H2',x=69.056711,y=91.781118,z=38.798286),Atom(type='H', name='H8',x=64.269285,y=88.315386,z=41.333782),Atom(type='H', name='H9',x=66.150984,y=87.971623,z=39.638415),Atom(type='1', name='1H6',x=66.567469,y=94.043677,z=41.781538),Atom(type='2', name='2H6',x=65.335635,y=92.936669,z=42.345765),Atom(type='C', name='C1*',x=66.286000,y=87.590000,z=39.403000),Atom(type='C', name='C2*',x=67.575000,y=86.923000,z=39.881000),Atom(type='O', name='O2*',x=68.212000,y=86.301000,z=38.782000),Atom(type='C', name='C3*',x=67.028000,y=85.921000,z=40.884000),Atom(type='O', name='O3*',x=67.958000,y=84.881000,z=41.131000),Atom(type='C', name='C4*',x=65.765000,y=85.442000,z=40.193000),Atom(type='O', name='O4*',x=65.232000,y=86.663000,z=39.605000),Atom(type='C', name='C5*',x=64.716000,y=84.797000,z=41.070000),Atom(type='O', name='O5*',x=64.389000,y=85.659000,z=42.173000),Atom(type='P', name='P',x=63.217000,y=85.290000,z=43.188000),Atom(type='O', name='O1P',x=63.363000,y=83.869000,z=43.563000),Atom(type='O', name='O2P',x=63.166000,y=86.324000,z=44.249000)],type='rna', pdb='1S72', sequence='A', chain='0', number='215')
nt225_0 = Component([Atom(type='N', name='N9',x=64.973309,y=95.554258,z=44.998782),Atom(type='C', name='C4',x=64.222165,y=94.411777,z=45.067586),Atom(type='N', name='N3',x=64.319832,y=93.349543,z=44.219795),Atom(type='N', name='N1',x=62.595628,y=92.479323,z=45.591723),Atom(type='C', name='C6',x=62.446561,y=93.565320,z=46.514849),Atom(type='O', name='O6',x=61.624378,y=93.493326,z=47.406664),Atom(type='C', name='C8',x=64.564254,y=96.367605,z=46.030792),Atom(type='C', name='C5',x=63.382314,y=94.607688,z=46.165243),Atom(type='C', name='C2',x=63.470858,y=92.402965,z=44.536371),Atom(type='N', name='N7',x=63.601925,y=95.829672,z=46.760315),Atom(type='N', name='N2',x=63.432775,y=91.262522,z=43.789879),Atom(type='H', name='H1',x=61.965864,y=91.708433,z=45.778946),Atom(type='H', name='H8',x=65.005631,y=97.340231,z=46.199104),Atom(type='H', name='H9',x=65.687662,y=95.741836,z=44.310550),Atom(type='1', name='1H2',x=64.068623,y=91.195584,z=43.015231),Atom(type='2', name='2H2',x=62.804179,y=90.506080,z=43.985773),Atom(type='C', name='C1*',x=66.026000,y=95.871000,z=44.046000),Atom(type='C', name='C2*',x=65.442000,y=96.416000,z=42.741000),Atom(type='O', name='O2*',x=66.334000,y=96.123000,z=41.693000),Atom(type='C', name='C3*',x=65.415000,y=97.901000,z=43.039000),Atom(type='O', name='O3*',x=65.348000,y=98.700000,z=41.870000),Atom(type='C', name='C4*',x=66.727000,y=98.089000,z=43.780000),Atom(type='O', name='O4*',x=66.846000,y=96.890000,z=44.590000),Atom(type='C', name='C5*',x=66.771000,y=99.292000,z=44.674000),Atom(type='O', name='O5*',x=65.617000,y=99.306000,z=45.509000),Atom(type='P', name='P',x=65.394000,y=100.458000,z=46.574000),Atom(type='O', name='O1P',x=65.777000,y=101.748000,z=45.951000),Atom(type='O', name='O2P',x=64.023000,y=100.283000,z=47.124000)],type='rna', pdb='1S72', sequence='G', chain='0', number='225')
nt226_0 = Component([Atom(type='N', name='N9',x=65.880362,y=94.198442,z=37.934382),Atom(type='C', name='C4',x=66.375930,y=93.140274,z=37.205873),Atom(type='N', name='N3',x=67.499303,y=93.080371,z=36.476432),Atom(type='N', name='N1',x=66.821651,y=90.797613,z=36.002323),Atom(type='C', name='C6',x=65.709266,y=90.900675,z=36.741874),Atom(type='N', name='N6',x=64.881566,y=89.835765,z=36.842128),Atom(type='C', name='C8',x=64.706509,y=93.775168,z=38.505067),Atom(type='C', name='C5',x=65.434873,y=92.121605,z=37.395579),Atom(type='C', name='C2',x=67.634344,y=91.873772,z=35.915932),Atom(type='N', name='N7',x=64.394196,y=92.522316,z=38.207411),Atom(type='H', name='H2',x=68.520703,y=91.731431,z=35.302912),Atom(type='H', name='H8',x=64.113760,y=94.425993,z=39.134058),Atom(type='H', name='H9',x=66.311862,y=95.106724,z=38.021319),Atom(type='1', name='1H6',x=65.119136,y=88.987226,z=36.358360),Atom(type='2', name='2H6',x=64.043995,y=89.900080,z=37.393736),Atom(type='C', name='C1*',x=66.526000,y=95.519000,z=38.040000),Atom(type='C', name='C2*',x=66.466000,y=96.286000,z=36.721000),Atom(type='O', name='O2*',x=67.518000,y=97.228000,z=36.692000),Atom(type='C', name='C3*',x=65.103000,y=96.944000,z=36.841000),Atom(type='O', name='O3*',x=64.971000,y=98.074000,z=36.005000),Atom(type='C', name='C4*',x=65.073000,y=97.340000,z=38.307000),Atom(type='O', name='O4*',x=65.795000,y=96.285000,z=38.987000),Atom(type='C', name='C5*',x=63.693000,y=97.480000,z=38.895000),Atom(type='O', name='O5*',x=63.769000,y=97.518000,z=40.327000),Atom(type='P', name='P',x=63.941000,y=98.895000,z=41.117000),Atom(type='O', name='O1P',x=64.171000,y=99.992000,z=40.157000),Atom(type='O', name='O2P',x=62.830000,y=99.000000,z=42.086000)],type='rna', pdb='1S72', sequence='A', chain='0', number='226')
nt227_0 = Component([Atom(type='N', name='N9',x=65.035461,y=93.135744,z=33.682613),Atom(type='C', name='C4',x=64.560951,y=91.844209,z=33.629590),Atom(type='N', name='N3',x=65.091504,y=90.783374,z=33.004465),Atom(type='N', name='N1',x=63.178934,y=89.572320,z=33.882192),Atom(type='C', name='C6',x=62.683614,y=90.657697,z=34.491758),Atom(type='N', name='N6',x=61.531054,y=90.554059,z=35.191784),Atom(type='C', name='C8',x=64.147393,y=93.856420,z=34.440724),Atom(type='C', name='C5',x=63.382460,y=91.879703,z=34.384018),Atom(type='C', name='C2',x=64.331583,y=89.698470,z=33.188260),Atom(type='N', name='N7',x=63.128045,y=93.138005,z=34.888595),Atom(type='H', name='H2',x=64.684902,y=88.785562,z=32.715554),Atom(type='H', name='H8',x=64.292700,y=94.910441,z=34.636887),Atom(type='H', name='H9',x=65.878826,y=93.471638,z=33.241437),Atom(type='1', name='1H6',x=61.069212,y=89.662509,z=35.240042),Atom(type='2', name='2H6',x=61.148979,y=91.360690,z=35.653625),Atom(type='C', name='C1*',x=66.303000,y=93.579000,z=33.097000),Atom(type='C', name='C2*',x=66.180000,y=93.833000,z=31.594000),Atom(type='O', name='O2*',x=67.431000,y=93.577000,z=30.994000),Atom(type='C', name='C3*',x=65.793000,y=95.306000,z=31.575000),Atom(type='O', name='O3*',x=66.110000,y=95.932000,z=30.334000),Atom(type='C', name='C4*',x=66.623000,y=95.872000,z=32.721000),Atom(type='O', name='O4*',x=66.654000,y=94.810000,z=33.709000),Atom(type='C', name='C5*',x=66.105000,y=97.137000,z=33.365000),Atom(type='O', name='O5*',x=64.732000,y=96.969000,z=33.751000),Atom(type='P', name='P',x=64.020000,y=98.007000,z=34.724000),Atom(type='O', name='O1P',x=64.074000,y=99.353000,z=34.125000),Atom(type='O', name='O2P',x=62.715000,y=97.433000,z=35.131000)],type='rna', pdb='1S72', sequence='A', chain='0', number='227')

nt212_0.infer_hydrogens()
nt213_0.infer_hydrogens()
nt214_0.infer_hydrogens()
nt215_0.infer_hydrogens()
nt225_0.infer_hydrogens()
nt226_0.infer_hydrogens()
nt227_0.infer_hydrogens()

# Test:  superimpose 7 nucleotides:

d = discrepancy([nt77_9,nt78_9,nt79_9,nt80_9,nt102_9,nt103_9,nt104_9],[nt212_0,nt213_0,nt214_0,nt215_0,nt225_0,nt226_0,nt227_0])
print "Discrepancy", d

# location error (squared) is 0.5372
# discrepancy should be about 0.1159
# discrepancy is sqrt(L^2 + A1^2 + A2^2 + ... + A7^2)/7, where L is location error and A1 ... A7 are angles between bases in radians
# angles between bases should be about 0.0700, 0.0287, 0.0547, 0.0754, 0.0262, 0.0580, 0.1083
# or else twice that, not quite sure

# rotation matrix should be about:
#    0.4780    0.4348   -0.7632
#   -0.2844   -0.7455   -0.6028
#   -0.8311    0.5051   -0.2327

# Test:  superimpose 5 nucleotides:
Ejemplo n.º 3
0
 def test_can_compute_another_discrepancy(self):
     val = discrepancy([nt10_0, nt12_0, nt14_0, nt16_0, nt18_0],
                       [nt11_0, nt13_0, nt15_0, nt17_0, nt19_0])
     np.testing.assert_almost_equal(1.1414, val, decimal=3)
Ejemplo n.º 4
0
 def test_can_compute_simple_discrepancy(self):
     val = discrepancy([nt10_0, nt11_0, nt12_0, nt13_0, nt14_0],
                       [nt15_0, nt16_0, nt17_0, nt18_0, nt19_0])
     np.testing.assert_almost_equal(0.9402, val, decimal=3)
Ejemplo n.º 5
0
 def test_can_compute_another_discrepancy(self):
     val = discrepancy([nt10_0, nt12_0, nt14_0, nt16_0, nt18_0],
                       [nt11_0,nt13_0,nt15_0,nt17_0,nt19_0])
     np.testing.assert_almost_equal(1.1414, val, decimal=3)
Ejemplo n.º 6
0
 def test_can_compute_simple_discrepancy(self):
     val = discrepancy([nt10_0, nt11_0, nt12_0, nt13_0, nt14_0],
                       [nt15_0,nt16_0,nt17_0,nt18_0,nt19_0])
     np.testing.assert_almost_equal(0.9402, val, decimal=3)