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
7a034156
Commit
7a034156
authored
Jul 10, 2014
by
peastman
Browse files
Merge pull request #520 from rmcgibbo/ff-constructor-docstring
Docstring for ForceField constructor
parents
8b7093a2
676d6cfd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
wrappers/python/simtk/openmm/app/forcefield.py
wrappers/python/simtk/openmm/app/forcefield.py
+6
-2
No files found.
wrappers/python/simtk/openmm/app/forcefield.py
View file @
7a034156
...
@@ -100,8 +100,11 @@ class ForceField(object):
...
@@ -100,8 +100,11 @@ class ForceField(object):
"""Load one or more XML files and create a ForceField object based on them.
"""Load one or more XML files and create a ForceField object based on them.
Parameters:
Parameters:
- files A list of XML files defining the force field. Each entry may be an absolute file path, a path relative to the
- files A list of XML files defining the force field. Each entry may
current working directory, or a path relative to this module's data subdirectory (for built in force fields).
be an absolute file path, a path relative to the current working
directory, a path relative to this module's data subdirectory
(for built in force fields), or an open file-like object with a
read() method from which the forcefield XML data can be loaded.
"""
"""
self
.
_atomTypes
=
{}
self
.
_atomTypes
=
{}
self
.
_templates
=
{}
self
.
_templates
=
{}
...
@@ -111,6 +114,7 @@ class ForceField(object):
...
@@ -111,6 +114,7 @@ class ForceField(object):
self
.
_scripts
=
[]
self
.
_scripts
=
[]
for
file
in
files
:
for
file
in
files
:
try
:
try
:
# this handles either filenames or open file-like objects
tree
=
etree
.
parse
(
file
)
tree
=
etree
.
parse
(
file
)
except
IOError
:
except
IOError
:
tree
=
etree
.
parse
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'data'
,
file
))
tree
=
etree
.
parse
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'data'
,
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