def parse(self, line): if line[:11] == " Leave Link" and line[13 : 13 + len(self.link)] == self.link: self.in_link = False if self.in_link: MultiLineParser.parse(self, line) if line[:8] == " (Enter " and line[-6 - len(self.link) : -6] == self.link: self.in_link = True
def parse(self, line): if line[:11] == " Leave Link" and line[13:13 + len(self.link)] == self.link: self.in_link = False if self.in_link: MultiLineParser.parse(self, line) if line[:8] == " (Enter " and line[-6 - len(self.link):-6] == self.link: self.in_link = True
def __init__(self, link, label, activator=None, deactivator=None, condition=None, depends_on=[]): MultiLineParser.__init__(self, label, activator, deactivator, condition, depends_on) self.link = str(link)
def __init__(self, label="npa_charges", condition=None): activator = re.compile(r"Natural Population Analysis:") deactivator = re.compile(r"^$") MultiLineParser.__init__(self, label, activator, deactivator, condition) self.re = re.compile(r"^\s+\d+\s+\S+\s+(?P<npa_charge>\S+)")
def reset(self): MultiLineParser.reset(self) self.gradients = []
def __init__(self, label="gradients", condition=None): activator = re.compile(r"Total Gradient") deactivator = re.compile(r"^$") MultiLineParser.__init__(self, label, activator, deactivator, condition) self.re = re.compile(r"\d+\s+\S+\s+(?P<gradient_x>\S+)\s+(?P<gradient_y>\S+)\s+(?P<gradient_z>\S+)")
def reset(self): MultiLineParser.reset(self) self.molecules = []
def __init__(self, label="output_molecules", condition=None): activator = re.compile(r"n\s+atoms\s+geometry") deactivator = re.compile(r"}$") MultiLineParser.__init__(self, label, activator, deactivator, condition) self.re = re.compile(r"(?P<symbol>\S+)\s*\[\s*(?P<x>\S+)\s*(?P<y>\S+)\s*(?P<z>\S+)\s*\]")
def reset(self): MultiLineParser.reset(self) self.in_link = False
def __init__(self, label='npa_charges', condition=None): activator = re.compile(r"Natural Population Analysis:") deactivator = re.compile(r"^$") MultiLineParser.__init__(self, label, activator, deactivator, condition) self.re = re.compile(r"^\s+\d+\s+\S+\s+(?P<npa_charge>\S+)")
def __init__(self, label='gradients', condition=None): activator = re.compile(r"Total Gradient") deactivator = re.compile(r"^$") MultiLineParser.__init__(self, label, activator, deactivator, condition) self.re = re.compile(r"\d+\s+\S+\s+(?P<gradient_x>\S+)\s+(?P<gradient_y>\S+)\s+(?P<gradient_z>\S+)")
def __init__(self, label='output_molecules', condition=None): activator = re.compile(r"n\s+atoms\s+geometry") deactivator = re.compile(r"}$") MultiLineParser.__init__(self, label, activator, deactivator, condition) self.re = re.compile(r"(?P<symbol>\S+)\s*\[\s*(?P<x>\S+)\s*(?P<y>\S+)\s*(?P<z>\S+)\s*\]")