コード例 #1
0
ファイル: testSystem.py プロジェクト: zhenglz/mmtools
#!/usr/bin/env python

import os, sys, glob
sys.path.append("/home/ctk3b")
import simtk.unit as units
from mmtools.Topology.System import *

print '##########################################'
print '# Tests of the Topology.System methods #'
print '##########################################'

print "Create a System object from file ...",
s = System()
print "Done."

print "Set the name of the System object to Frank ..."
s.setName('Frank')
print 'New name:', t.getName()
print "Done."

print "Add a molecule to the System object ..."
s.addMolecule()
print "There are now", s.getNumMolecules(), "molelcules in the Topology."
print "Done."

print "Insert a molecule at position 1 ..."
s.insertMolecule(1)
print "There are now", s.getNumMolecules(), "molecules in the Topology."
print "Done."

print "Delete molecule 0 from the Topology...",
コード例 #2
0
ファイル: testSystem.py プロジェクト: choderalab/mmtools
#!/usr/bin/env python

import os, sys, glob
sys.path.append("/home/ctk3b")
import simtk.unit as units
from mmtools.Topology.System import *


print '##########################################'
print '# Tests of the Topology.System methods #'
print '##########################################'


print "Create a System object from file ...",
s = System()
print "Done."

print "Set the name of the System object to Frank ..." 
s.setName('Frank')
print 'New name:', t.getName()
print "Done."

print "Add a molecule to the System object ..."
s.addMolecule()
print "There are now", s.getNumMolecules(), "molelcules in the Topology."
print "Done."

print "Insert a molecule at position 1 ..."
s.insertMolecule(1)
print "There are now", s.getNumMolecules(), "molecules in the Topology."
print "Done."
コード例 #3
0
ファイル: testEVERYTHING.py プロジェクト: zhenglz/mmtools
import pdb
import profile
from mmtools.Topology.System import *

print "Reading in a system ...\n",
structureList = ['LG2-0-eq.gro']
topologyList = ['LG2.top']
sys = System("Test", structureList, topologyList, "Gromacs")
print "Done.\n"

# Test a simplified structure and topology
#print "Reading a structure and preprocessed topology ...",
#structureList = 'FullStructure.gro'
#topologyList = 'FullTopology.top'
#sys = System("Test", structureList, topologyList, "Gromacs")
#print "Done."

# Test, join, and split multiple structures and topologies
#print "Adding multiple structures and topologies ...",
#structureList = ['Protein.gro', 'Ligand.gro', 'Solvent.gro']
#topologyList = ['Protein.top', 'Ligand.top', 'Solvent.top']
#sys = System("Test", structureList, topologyList, "Gromacs")
#print "Done."

#print "Adding a molecule to a system ...",
#sys.addMolecule('Ion.gro', 'Ion.gro', "Gromacs")
#print "Done."

# Test a single topology and multiple structures
#print "Reading multiple structures and a single topology ...",