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
25ac85a4
"vscode:/vscode.git/clone" did not exist on "e22808f3423a2206525f0c1acc4961a054d89817"
Commit
25ac85a4
authored
Oct 01, 2013
by
Robert McGibbon
Browse files
Add provenance
parent
5a5d8958
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
wrappers/python/simtk/openmm/app/desmonddmsfile.py
wrappers/python/simtk/openmm/app/desmonddmsfile.py
+16
-0
No files found.
wrappers/python/simtk/openmm/app/desmonddmsfile.py
View file @
25ac85a4
...
@@ -71,6 +71,17 @@ class DesmondDMSFile(object):
...
@@ -71,6 +71,17 @@ class DesmondDMSFile(object):
'DMS file. You can add a forcefield with the '
'DMS file. You can add a forcefield with the '
'viparr command line tool distributed with desmond'
)
'viparr command line tool distributed with desmond'
)
# build the provenance string
provenance
=
[]
q
=
'''SELECT id, user, timestamp, version, workdir, cmdline, executable
FROM provenance'''
#for id, user, timestamp, version, workdir, cmdline, executable in self._conn.execute(q):
for
row
in
self
.
_conn
.
execute
(
'SELECT * FROM provenance'
):
rowdict
=
dict
(
zip
(
self
.
_tables
[
'provenance'
],
row
))
provenance
.
append
(
'%(id)d) %(timestamp)s: %(user)s
\n
version: %(version)s
\n
'
'cmdline: %(cmdline)s
\n
executable: %(executable)s
\n
'
%
rowdict
)
self
.
provenance
=
''
.
join
(
provenance
)
# Build the topology
# Build the topology
self
.
topology
,
self
.
positions
=
self
.
_createTopology
()
self
.
topology
,
self
.
positions
=
self
.
_createTopology
()
self
.
_topologyAtoms
=
list
(
self
.
topology
.
atoms
())
self
.
_topologyAtoms
=
list
(
self
.
topology
.
atoms
())
...
@@ -87,6 +98,11 @@ class DesmondDMSFile(object):
...
@@ -87,6 +98,11 @@ class DesmondDMSFile(object):
'''
'''
return
self
.
topology
return
self
.
topology
def
getProvenance
(
self
):
'''Get the provenance string of this system
'''
return
self
.
provenance
def
_createTopology
(
self
):
def
_createTopology
(
self
):
'''Build the topology of the system
'''Build the topology of the system
'''
'''
...
...
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