# Add the protein, ligand and water
inter_cljff.add(protein)
inter_cljff.add(ligand)
inter_cljff.add(water)

# Add the forcefields to the system
system.add(intra_cljff)
system.add(intraff)
system.add(inter_cljff)

# Set the expression used to calculate the total energy
# of the system
system.setComponent( system.totalComponent(),
                     intra_cljff.components().total() + 
                     intraff.components().total() +
                     inter_cljff.components().total() )

# Tell the system about the periodic box
system.setProperty("space", space)

# now wrap everything so that the ligand is in the center of the box
system.add( SpaceWrapper(ligand_mol.evaluate().center(), all) )
system.applyConstraints()
system.removeAllConstraints()

# Save a binary representation of the system
# to the file "system.s3"
import Sire.Stream
Sire.Stream.save( system, "system.s3" )
Exemple #2
0
# Add the protein, ligand and water
inter_cljff.add(protein)
inter_cljff.add(ligand)
inter_cljff.add(water)

# Add the forcefields to the system
system.add(intra_cljff)
system.add(intraff)
system.add(inter_cljff)

# Set the expression used to calculate the total energy
# of the system
system.setComponent(
    system.totalComponent(),
    intra_cljff.components().total() + intraff.components().total() +
    inter_cljff.components().total())

# Tell the system about the periodic box
system.setProperty("space", space)

# now wrap everything so that the ligand is in the center of the box
system.add(SpaceWrapper(ligand_mol.evaluate().center(), all))
system.applyConstraints()
system.removeAllConstraints()

# Save a binary representation of the system
# to the file "system.s3"
import Sire.Stream
Sire.Stream.save(system, "system.s3")