本文整理匯總了Python中MDAnalysis.Universe.load_new方法的典型用法代碼示例。如果您正苦於以下問題:Python Universe.load_new方法的具體用法?Python Universe.load_new怎麽用?Python Universe.load_new使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類MDAnalysis.Universe
的用法示例。
在下文中一共展示了Universe.load_new方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: Universe
# 需要導入模塊: from MDAnalysis import Universe [as 別名]
# 或者: from MDAnalysis.Universe import load_new [as 別名]
try:
#uniTraj = Universe(topologyPath, format='PRMTOP')
uniTraj = Universe(topologyPath, format=topoFormat)
except:
print "Error: Could not load topology file"
return 100
try:
#filename, fileExtension = os.path.splitext(trajectoryPath)
#if str.lower(fileExtension)== ".netcdf":
# uniTraj.load_new(trajectoryPath, format='NCDF')
#else:
# uniTraj.load_new(trajectoryPath)
uniTraj.load_new(trajectoryPath, format=trajFormat)
#uniTraj.load_new(trajectoryPath)
except:
print "Error: Could not load trajectory file"
return 200
print "Inserting trajectory"
trajectoryToDB(uniTraj, con, simulationId)
#print len(structIdArray)
if con:
con.close()
print "The program successfully finished"