rmcgibbo / openmm-cmd

OpenMM Command Line Application
7 stars 3 forks source link

Sysxml #23

Closed leeping closed 10 years ago

leeping commented 10 years ago

This fix should print out the correct traits to the terminal and config file when deserializing an XML.

leeping@not0rious:~/src/openmm-cmd/examples/03-ExamplePDB-SysXML$ openmm --coords input.pdb --sysxml system.xml | tee openmm.out
>>> ###################################################################
>>> # To use this script, paste all of the lines starting with the
>>> # three less than signs (>>>) into a python interpreter.
>>> ###################################################################
>>> 
>>> from simtk.unit import *
>>> from simtk import openmm as mm
>>> from simtk.openmm import app
>>> 
>>> pdb = app.PDBFile('input.pdb')
>>> topology = pdb.topology
>>> positions = pdb.positions
>>> system = XmlSerializer.deserializeSystem(open(system.xml).read())
>>> integrator = mm.LangevinIntegrator(300*kelvin, 1.0/picosecond, 2*femtosecond)
>>> platform = mm.Platform.getPlatformByName('CUDA')
>>> platformProperties = {'CudaPrecision': 'mixed'}
########################################################################
# Option Summary. A more detailed config file is saved to config.out.ini
########################################################################

[General]                       
platform = CUDA                  # default value
coords = input.pdb               # your selection
precision = Mixed                # default value
sysxml = system.xml              # your selection

[System]                        

[Dynamics]                      
integrator = Langevin            # default value
dt = 2*femtosecond               # default value
temp = 300*kelvin                # default value
collision_rate = 1.0/picosecond  # default value

[Simulation]                    
n_steps = 10000                  # default value
restart_file = restart.json.bz2  # default value
minimize = True                  # default value
restart_freq = 5000              # default value
traj_file = output.dcd           # default value
read_restart = False             # default value
progress_freq = 1000             # default value
write_restart = True             # default value
traj_freq = 1000                 # default value
rmcgibbo commented 10 years ago

Looks good to me.