def from_parser(cls, parser): """ Generates an instance of EscfOutput from a parser based on the stdout of a Turbomole executable. Args: parser (Parser): the parser to be used to extract the data. Returns: EscfOutput. """ dft = DFTData.from_parser(parser) escf = EscfData.from_parser(parser) run = RunData.from_parser(parser) tm = TurbomoleData.from_parser(parser) geometry = GeometryData.from_parser(parser) basis = BasisData.from_parser(parser) cosmo = CosmoData.from_parser(parser) integral = IntegralData.from_parser(parser) symmetry = SymmetryData.from_parser(parser) return cls(dft=dft, escf=escf, geometry=geometry, basis=basis, run=run, tm=tm, cosmo=cosmo, integral=integral, symmetry=symmetry)
def test_str(testdir): path = os.path.join(testdir, "outputs", "dscf", "h2o_std.log") with open(path) as f: log = f.read() td = TurbomoleData.from_string(log) s = str(td) assert "Content of the TurbomoleData object" in s assert "dscf" in s
def from_parser(cls, parser): """ Generates an instance of EscfOnlyOutput from a parser based on the stdout of a Turbomole executable. Args: parser (Parser): the parser to be used to extract the data. Returns: EscfOnlyOutput. """ escf = EscfData.from_parser(parser) run = RunData.from_parser(parser) tm = TurbomoleData.from_parser(parser) return cls(escf=escf, run=run, tm=tm)
def from_parser(cls, parser): """ Generates an instance of AoforceOutput from a parser based on the stdout of a Turbomole executable. Args: parser (Parser): the parser to be used to extract the data. Returns: AoforceOutput. """ ni = AoforceNumericalIntegrationData.from_parser(parser) rot = AoforceRotationalData.from_parser(parser) vib = AoforceVibrationalData.from_parser(parser) run = RunData.from_parser(parser) tm = TurbomoleData.from_parser(parser) return cls(numerical_integration=ni, rotational=rot, vibrational=vib, run=run, tm=tm)
def from_parser(cls, parser): """ Generates an instance of StatptOutput from a parser based on the stdout of a Turbomole executable. Args: parser (Parser): the parser to be used to extract the data. Returns: StatptOutput. """ info = StatptData.from_parser(parser) gradients = RelaxGradientsData.from_parser(parser) convergence = RelaxConvergenceData.from_parser(parser) run = RunData.from_parser(parser) tm = TurbomoleData.from_parser(parser) return cls(info=info, gradients=gradients, convergence=convergence, run=run, tm=tm)
def from_parser(cls, parser): """ Generates an instance of ScfOutput from a parser based on the stdout of a Turbomole executable. Args: parser (Parser): the parser to be used to extract the data. Returns: ScfOutput. """ dft = DFTData.from_parser(parser) scf = ScfData.from_parser(parser) energies = ScfEnergiesData.from_parser(parser) electrostatic = ElectrostaticMomentsData.from_parser(parser) geometry = GeometryData.from_parser(parser) basis = BasisData.from_parser(parser) run = RunData.from_parser(parser) tm = TurbomoleData.from_parser(parser) cosmo = CosmoData.from_parser(parser) spin = SpinData.from_parser(parser) integral = IntegralData.from_parser(parser) smearing = SmearingData.from_parser(parser) symmetry = SymmetryData.from_parser(parser) return cls(dft=dft, scf=scf, energies=energies, electrostatic=electrostatic, geometry=geometry, basis=basis, run=run, tm=tm, cosmo=cosmo, spin=spin, integral=integral, smearing=smearing, symmetry=symmetry)
def from_parser(cls, parser): """ Generates an instance of EgradOutput from a parser based on the stdout of a Turbomole executable. Args: parser (Parser): the parser to be used to extract the data. Returns: EgradOutput. """ grad_data = parser.gradient if not grad_data: return None dft = DFTData.from_parser(parser) escf = EscfData.from_parser(parser) run = RunData.from_parser(parser) tm = TurbomoleData.from_parser(parser) geometry = GeometryData.from_parser(parser) basis = BasisData.from_parser(parser) cosmo = CosmoData.from_parser(parser) integral = IntegralData.from_parser(parser) egrad_ex = parser.egrad_excited_state ex_state = egrad_ex["index"] if egrad_ex is not None else None return cls(gradients=grad_data["gradients"], dielectric=grad_data["dielectric"], dft=dft, escf=escf, geometry=geometry, basis=basis, run=run, tm=tm, cosmo=cosmo, integral=integral, ex_state=ex_state)
def from_parser(cls, parser): """ Generates an instance of GradOutput from a parser based on the stdout of a Turbomole executable. Args: parser (Parser): the parser to be used to extract the data. Returns: GradOutput. """ grad_data = parser.gradient if not grad_data: return None run = RunData.from_parser(parser) tm = TurbomoleData.from_parser(parser) memory = parser.rdgrad_memory return cls(gradients=grad_data["gradients"], dielectric=grad_data["dielectric"], run=run, tm=tm, memory=memory)