def load(self): """Load the basis set from file.""" if self.filename.endswith('.nwchem'): self.basis_atom_map = load_basis_atom_map_nwchem(self.filename) else: raise IOError('File format not supported: %s' % self.filename) self._to_arrays() self._to_segmented()
def load(self): """Load the basis set from file if it hasn't been done already. Note ---- If the basis_atom_map is already defined (not None), then the load method is ignored """ # if basis_atom_map is already defined if self.basis_atom_map is not None: # ignore load method return if self.filename.endswith('.nwchem'): self.basis_atom_map = load_basis_atom_map_nwchem(self.filename) elif self.filename.endswith('.gbs'): self.basis_atom_map = load_basis_atom_map_gbs(self.filename) else: raise IOError('File format not supported: %s' % self.filename) self._to_arrays() self._to_segmented() self._normalize_contractions()