Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
7a45cf24
"...src/ssh:/git@developer.sourcefind.cn:2222/tsoc/openmm.git" did not exist on "40891bab4ed6fdde1d2184e2b75924d67a2bfa4c"
Commit
7a45cf24
authored
Apr 24, 2012
by
Peter Eastman
Browse files
Added a StateDataReporter to the Python examples
parent
a4bf2ceb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
+4
-0
examples/simulateAmber.py
examples/simulateAmber.py
+2
-0
examples/simulatePdb.py
examples/simulatePdb.py
+2
-0
No files found.
examples/simulateAmber.py
View file @
7a45cf24
from
simtk.openmm.app
import
*
from
simtk.openmm
import
*
from
simtk.unit
import
*
from
sys
import
stdout
prmtop
=
AmberPrmtopFile
(
'input.prmtop'
)
inpcrd
=
AmberInpcrdFile
(
'input.inpcrd'
)
...
...
@@ -10,4 +11,5 @@ simulation = Simulation(prmtop.topology, system, integrator)
simulation
.
context
.
setPositions
(
inpcrd
.
positions
)
simulation
.
minimizeEnergy
()
simulation
.
reporters
.
append
(
PDBReporter
(
'output.pdb'
,
1000
))
simulation
.
reporters
.
append
(
StateDataReporter
(
stdout
,
1000
,
step
=
True
,
potentialEnergy
=
True
,
temperature
=
True
))
simulation
.
step
(
10000
)
examples/simulatePdb.py
View file @
7a45cf24
from
simtk.openmm.app
import
*
from
simtk.openmm
import
*
from
simtk.unit
import
*
from
sys
import
stdout
pdb
=
PDBFile
(
'input.pdb'
)
forcefield
=
ForceField
(
'amber99sb.xml'
,
'tip3p.xml'
)
...
...
@@ -10,4 +11,5 @@ simulation = Simulation(pdb.topology, system, integrator)
simulation
.
context
.
setPositions
(
pdb
.
positions
)
simulation
.
minimizeEnergy
()
simulation
.
reporters
.
append
(
PDBReporter
(
'output.pdb'
,
1000
))
simulation
.
reporters
.
append
(
StateDataReporter
(
stdout
,
1000
,
step
=
True
,
potentialEnergy
=
True
,
temperature
=
True
))
simulation
.
step
(
10000
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment