当前位置: 首页>>代码示例>>Python>>正文


Python System.update方法代码示例

本文整理汇总了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)
开发者ID:Alwnikrotikz,项目名称:sire,代码行数:31,代码来源:identityconstraint.py

示例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...")
开发者ID:michellab,项目名称:SireTests,代码行数:33,代码来源:testgridff.py

示例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)
开发者ID:Alwnikrotikz,项目名称:sire,代码行数:33,代码来源:prefsampling.py

示例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...")
开发者ID:Alwnikrotikz,项目名称:sire,代码行数:33,代码来源:testnewgridff.py


注:本文中的Sire.System.update方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。