Пример #1
0
 def testWrite(self):
     dcd = DCDFile(self.dcd, 'w')
     dcd.write(ENSEMBLE.getCoordsets())
     dcd.close()
     e = parseDCD(self.dcd)
     assert_allclose(e._getCoordsets(), ENSEMBLE._getCoordsets(),
                     rtol=RTOL, atol=ATOL,
                     err_msg='failed to parse DCD file correctly')
Пример #2
0
 def testWrite(self):
     dcd = DCDFile(self.dcd, 'w')
     dcd.write(ENSEMBLE.getCoordsets())
     dcd.close()
     e = parseDCD(self.dcd)
     assert_allclose(e._getCoordsets(), ENSEMBLE._getCoordsets(),
                     rtol=RTOL, atol=ATOL,
                     err_msg='failed to parse DCD file correctly')
Пример #3
0
 def testWriteModeAppend(self):
     dcd = DCDFile(writeDCD(self.dcd, ENSEMBLE), 'a')
     dcd.write(ENSEMBLE.getCoordsets())
     dcd.close()
     e = parseDCD(self.dcd)
     n_csets = len(ENSEMBLE)
     coordsets = e._getCoordsets()
     assert_equal(coordsets, coordsets, 
                  'failed to parse DCD file correctly')
     assert_allclose(coordsets[:n_csets], ENSEMBLE._getCoordsets(),
                     rtol=RTOL, atol=ATOL,
                     err_msg='failed to parse DCD file correctly')
Пример #4
0
 def testWriteModeAppend(self):
     dcd = DCDFile(writeDCD(self.dcd, ENSEMBLE), 'a')
     dcd.write(ENSEMBLE.getCoordsets())
     dcd.close()
     e = parseDCD(self.dcd)
     n_csets = len(ENSEMBLE)
     coordsets = e._getCoordsets()
     assert_equal(coordsets, coordsets,
                  'failed to parse DCD file correctly')
     assert_allclose(coordsets[:n_csets], ENSEMBLE._getCoordsets(),
                     rtol=RTOL, atol=ATOL,
                     err_msg='failed to parse DCD file correctly')