def __init__(self, output=None, **kwargs): self.Et = np.nan self.energies = {} self.nuclear_repulsion = np.nan self.scf_step = np.nan self.unit = 'Eh' self.molecule = qtk.Molecule() if output: #self.path = qtk.getPath(output) if output: self.path, self.name = os.path.split(output) else: self.path = qtk.getPath(output) _file = qtk.fileStrip(output) self.stem, self.ext = os.path.splitext(_file)
def __init__(self, output=None, **kwargs): self.Et = np.nan self.energies = {} self.nuclear_repulsion = np.nan self.scf_step = np.nan self.unit = 'Eh' self.molecule = qtk.Molecule() if output: #self.path = qtk.getPath(output) if output: self.path, self.name = os.path.split(output) else: self.path = qtk.getPath(output) _file = qtk.fileStrip(output) self.stem, self.ext = os.path.splitext(_file) self.path = os.path.abspath(self.path)
def read(self, name, **kwargs): if os.path.exists(name): stem, extension = os.path.splitext(name) if re.match('\.xyz', extension): self.read_xyz(name, **kwargs) elif re.match('\.ascii', extension): self.read_ascii(name, **kwargs) else: qtk.exit("suffix " + extension + " is not reconized") self.string = ['' for _ in range(self.N)] self.name = qtk.fileStrip(stem) if np.sum(self.Z) % 2 == 1: if 'charge_saturation' not in kwargs: self.charge = -1 else: self.charge = kwargs['charge_saturation'] else: qtk.exit("file: '" + name + "' not found")
def read(self, name, **kwargs): if os.path.exists(name): stem, extension = os.path.splitext(name) if re.match('\.xyz', extension): self.read_xyz(name, **kwargs) elif re.match('\.ascii', extension): self.read_ascii(name, **kwargs) elif re.match('\.cif', extension): self.read_cif(name, **kwargs) else: qtk.exit("suffix " + extension + " is not reconized") self.string = ['' for _ in range(self.N)] self.name = qtk.fileStrip(stem) if np.sum(self.Z) % 2 == 1: if 'charge_saturation' not in kwargs: self.charge = -1 else: self.charge = kwargs['charge_saturation'] else: qtk.exit("file: '" + name + "' not found")