"vscode:/vscode.git/clone" did not exist on "e22808f3423a2206525f0c1acc4961a054d89817"
Commit 25ac85a4 authored by Robert McGibbon's avatar Robert McGibbon
Browse files

Add provenance

parent 5a5d8958
...@@ -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
''' '''
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment