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
60307def
Commit
60307def
authored
Jul 18, 2013
by
peastman
Browse files
Merge pull request #59 from rmcgibbo/enumrepr
Add __repr__ to app's enums, so that we can print them easily
parents
0190d1e9
9a5ecd8f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
12 deletions
+57
-12
wrappers/python/simtk/openmm/app/amberprmtopfile.py
wrappers/python/simtk/openmm/app/amberprmtopfile.py
+19
-4
wrappers/python/simtk/openmm/app/forcefield.py
wrappers/python/simtk/openmm/app/forcefield.py
+38
-8
No files found.
wrappers/python/simtk/openmm/app/amberprmtopfile.py
View file @
60307def
...
...
@@ -41,10 +41,25 @@ import simtk.openmm as mm
# Enumerated values for implicit solvent model
HCT
=
object
()
OBC1
=
object
()
OBC2
=
object
()
GBn
=
object
()
class
HCT
(
object
):
def
__repr__
(
self
):
return
'HCT'
HCT
=
HCT
()
class
OBC1
(
object
):
def
__repr__
(
self
):
return
'OBC1'
OBC1
=
OBC1
()
class
OBC2
(
object
):
def
__repr__
(
self
):
return
'OBC2'
OBC2
=
OBC2
()
class
GBn
(
object
):
def
__repr__
(
self
):
return
'GBn'
GBn
=
GBn
()
class
AmberPrmtopFile
(
object
):
"""AmberPrmtopFile parses an AMBER prmtop file and constructs a Topology and (optionally) an OpenMM System from it."""
...
...
wrappers/python/simtk/openmm/app/forcefield.py
View file @
60307def
...
...
@@ -42,17 +42,47 @@ from simtk.openmm.app import Topology
# Enumerated values for nonbonded method
NoCutoff
=
object
()
CutoffNonPeriodic
=
object
()
CutoffPeriodic
=
object
()
Ewald
=
object
()
PME
=
object
()
class
NoCutoff
(
object
):
def
__repr__
(
self
):
return
'NoCutoff'
NoCutoff
=
NoCutoff
()
class
CutoffNonPeriodic
(
object
):
def
__repr__
(
self
):
return
'CutoffNonPeriodic'
CutoffNonPeriodic
=
CutoffNonPeriodic
()
class
CutoffPeriodic
(
object
):
def
__repr__
(
self
):
return
'CutoffPeriodic'
CutoffPeriodic
=
CutoffPeriodic
()
class
Ewald
(
object
):
def
__repr__
(
self
):
return
'Ewald'
Ewald
=
Ewald
()
class
PME
(
object
):
def
__repr__
(
self
):
return
'PME'
PME
=
PME
()
# Enumerated values for constraint type
HBonds
=
object
()
AllBonds
=
object
()
HAngles
=
object
()
class
HBonds
(
object
):
def
__repr__
(
self
):
return
'HBonds'
HBonds
=
HBonds
()
class
AllBonds
(
object
):
def
__repr__
(
self
):
return
'AllBonds'
AllBonds
=
AllBonds
()
class
HAngles
(
object
):
def
__repr__
(
self
):
return
'HAngles'
HAngles
=
HAngles
()
# A map of functions to parse elements of the XML file.
...
...
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