parameters: (self, file, verbose=False)
docstring: Load a DMS file
  
          Parameters
          ----------
          file : string (for one file)
          or
          file : list of strings (multiple files, each containing a molecule)
          the name(s) of the file to load
docstring_summary: Load a DMS file
docstring_tokens: Load a DMS file
function: def __init__(self, file, verbose=False):
          """Load a DMS file
  
          Parameters
          ----------
          file : string (for one file)
          or
          file : list of strings (multiple files, each containing a molecule)
          the name(s) of the file to load
          """
  
          # sqlite3 is included in the standard lib, but at python
          # compile time, you can disable support (I think), so it's
          # not *guarenteed* to be available. Doing the import here
          # means we only raise an ImportError if people try to use
          # this class, so the module can be safely imported
          import sqlite3
  
          self._verbose = verbose
          self._file = []
          self._open = []
          self._tables = []
          self._conn = []
          self._provenance = []
          self._natoms = [] #number of atoms in each file
  
          #constructs list of files even if only one file
          if isinstance(file, list):
              self._file = file
          else:
              self._file.append(file)
  
          #open sqlite connectors for each of the files
          nfiles = len(self._file)
          for (fcounter,f) in zip(range(0,nfiles),self._file):
              self._open.append(False)
              if not  os.path.exists(str(f)):
                  raise IOError("No such file or directory: '%s'" % str(f))
              conn = sqlite3.connect(f)
              self._conn.append(conn)
              self._open[fcounter] = True
              tables = self._readSchemas(conn)
              if len(tables) == 0:
                  raise IOError('DMS file %s was not loaded sucessfully. No tables found' % str(f))
              if 'nbtype' not in tables['particle']:
                  raise ValueError('No nonbonded parameters associated with '
                                   'DMS file %s. You can add a forcefield with the '
                                   'viparr command line tool distributed with desmond' % str(f))
              self._tables.append(tables)
              self._natoms.append(0)
  
          # Build the topology
          self.topology, self.positions, self.velocities = self._createTopology()
          self._topologyAtoms = list(self.topology.atoms())
          self._atomBonds = [{} for x in range(len(self._topologyAtoms))]
          self._angleConstraints = [{} for x in range(len(self._topologyAtoms))]
  
          #offset to each molecule/file in the topology
          self._offset = self._prefixsum(self._natoms)
  
          #retrieve provenance
          self._createProvenance()
function_tokens: def __init__ ( self , file , verbose = False ) : # sqlite3 is included in the standard lib, but at python # compile time, you can disable support (I think), so it's # not *guarenteed* to be available. Doing the import here # means we only raise an ImportError if people try to use # this class, so the module can be safely imported import sqlite3 self . _verbose = verbose self . _file = [ ] self . _open = [ ] self . _tables = [ ] self . _conn = [ ] self . _provenance = [ ] self . _natoms = [ ] #number of atoms in each file #constructs list of files even if only one file if isinstance ( file , list ) : self . _file = file else : self . _file . append ( file ) #open sqlite connectors for each of the files nfiles = len ( self . _file ) for ( fcounter , f ) in zip ( range ( 0 , nfiles ) , self . _file ) : self . _open . append ( False ) if not os . path . exists ( str ( f ) ) : raise IOError ( "No such file or directory: '%s'" % str ( f ) ) conn = sqlite3 . connect ( f ) self . _conn . append ( conn ) self . _open [ fcounter ] = True tables = self . _readSchemas ( conn ) if len ( tables ) == 0 : raise IOError ( 'DMS file %s was not loaded sucessfully. No tables found' % str ( f ) ) if 'nbtype' not in tables [ 'particle' ] : raise ValueError ( 'No nonbonded parameters associated with ' 'DMS file %s. You can add a forcefield with the ' 'viparr command line tool distributed with desmond' % str ( f ) ) self . _tables . append ( tables ) self . _natoms . append ( 0 ) # Build the topology self . topology , self . positions , self . velocities = self . _createTopology ( ) self . _topologyAtoms = list ( self . topology . atoms ( ) ) self . _atomBonds = [ { } for x in range ( len ( self . _topologyAtoms ) ) ] self . _angleConstraints = [ { } for x in range ( len ( self . _topologyAtoms ) ) ] #offset to each molecule/file in the topology self . _offset = self . _prefixsum ( self . _natoms ) #retrieve provenance self . _createProvenance ( )