本文整理汇总了Python中Sire.System.update方法的典型用法代码示例。如果您正苦于以下问题:Python System.update方法的具体用法?Python System.update怎么用?Python System.update使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sire.System
的用法示例。
在下文中一共展示了System.update方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: print
# 需要导入模块: from Sire import System [as 别名]
# 或者: from Sire.System import update [as 别名]
print("\nFEWPOINTS")
idcons.useFewPointsAlgorithm()
mols = idcons.update(system)
print(mols)
printMolecules(mols)
print("\nMANYPOINTS")
idcons.useManyPointsAlgorithm()
mols = idcons.update(system)
print(mols)
printMolecules(mols)
print("\nAPPLICATION TEST")
idcons = IdentityConstraint( [centers[99], centers[100], centers[101], centers[102]], system[MGIdx(0)] )
mols = idcons.update(system)
print("\nDEFAULT")
print(mols)
printMolecules(mols)
print("\nUPDATING SYSTEM")
print(system.version())
system.update(mols)
print(system.version())
mols = idcons.update(system)
print("\nPOST-UPDATE")
print(mols)
printMolecules(mols)
示例2: SameMoves
# 需要导入模块: from Sire import System [as 别名]
# 或者: from Sire.System import update [as 别名]
rbmc.setReflectionSphere(center_point, 7.5*angstrom)
moves = SameMoves(rbmc)
PDB().write(grid_system.molecules(), "test0000.pdb")
t = QTime()
for i in range(1,11):
print("Moving the system...")
t.start()
grid_system = moves.move(grid_system, 1000, False)
ms = t.elapsed()
print(("Moves complete! Took %d ms" % ms))
print(("GRID: ",grid_system.energies()))
exp_system.update( grid_system.molecules() )
print(("EXPT: ",exp_system.energies()))
print(("\nGrid energy equals: %s. Explicit energy equals: %s." % \
(grid_system.energy(), exp_system.energy())))
diff = grid_system.energy() - exp_system.energy()
print(("The difference is %s\n" % diff))
PDB().write(grid_system.molecules(), "test%0004d.pdb" % i)
# Save and restore the two systems from binary
import Sire.Stream
print("Saving the grid system...")
Sire.Stream.save( (grid_system, exp_system), "test/SireMM/testgrid.s3" )
print("Reloading the grid system...")
示例3: PrefSampler
# 需要导入模块: from Sire import System [as 别名]
# 或者: from Sire.System import update [as 别名]
sampler = PrefSampler(mol0, cljff[MGIdx(0)], 200*angstrom2)
sampler.updateFrom(system)
mol0 = PartialMolecule(mol0)
mol1 = PartialMolecule(mol1)
mol2 = PartialMolecule(mol2)
p0 = sampler.probabilityOf(mol0)
p1 = sampler.probabilityOf(mol1)
p2 = sampler.probabilityOf(mol2)
print(p0, p1, p2, p0+p1+p2)
mol1 = mol1.move().translate( Vector(1,0,0) ).commit()
system.update(mol1)
sampler.updateFrom(system)
p0 = sampler.probabilityOf(mol0)
p1 = sampler.probabilityOf(mol1)
p2 = sampler.probabilityOf(mol2)
print(p0, p1, p2, p0+p1+p2)
mol0 = mol0.move().translate( Vector(1,0,0) ).commit()
system.update(mol0)
sampler.updateFrom(system)
p0 = sampler.probabilityOf(mol0)
p1 = sampler.probabilityOf(mol1)
示例4: SameMoves
# 需要导入模块: from Sire import System [as 别名]
# 或者: from Sire.System import update [as 别名]
rbmc.setReflectionSphere(center_point, 7.5*angstrom)
moves = SameMoves(rbmc)
PDB().write(grid_system2.molecules(), "test0000.pdb")
t = QTime()
for i in range(1,11):
print("Moving the system...")
t.start()
grid_system2 = moves.move(grid_system2, 1000, False)
ms = t.elapsed()
print("Moves complete! Took %d ms" % ms)
print("NEW GRIDFF: ",grid_system2.energies())
grid_system.update( grid_system2.molecules() )
print("OLD GRIDFF: ",grid_system.energies())
print("\nOld GridFF energy equals: %s. New GridFF energy equals: %s." % \
(grid_system.energy(), grid_system2.energy()))
diff = grid_system.energy() - grid_system2.energy()
print("The difference is %s\n" % diff)
PDB().write(grid_system2.molecules(), "test%0004d.pdb" % i)
# Save and restore the two systems from binary
import Sire.Stream
print("Saving the systems...")
Sire.Stream.save( (grid_system, grid_system2), "test/SireMM/testgrid.s3" )
print("Reloading the grid system...")