Пример #1
0
def calc_fwdir(gtsfile):
    '''
    * calculates which internal coordinate changes the most
      in the transition state
    * it also gives the sign of the variation in the forward
      direction of the MEP
    '''
    if (gtsfile is None) or (not os.path.exists(gtsfile)): return (None, None)
    # Generate Molecule from gts file
    molecule = Molecule()
    molecule.set_from_gts(gtsfile)
    # setup (with frequency calculation)
    molecule.setup()
    ic, fwsign = molecule.get_imag_main_dir()
    # return data
    return (ic2string(ic), fwsign)
Пример #2
0
def calc_fwdir(target):
    '''
    * calculates which internal coordinate changes the most
      in the transition state
    * it also gives the sign of the variation in the forward
      direction of the MEP
    '''
    # list of gts files associated with target
    gtsfiles = [PN.DIR1+gts for gts in os.listdir(PN.DIR1)\
                if gts.endswith(".gts") and gts.startswith(target)]
    # Generate Molecule from gts file
    molecule = Molecule()
    molecule.set_from_gts(gtsfiles[0])
    # setup (with frequency calculation)
    molecule.setup()
    ic, fwsign = molecule.get_imag_main_dir()
    # return data
    return (ic2string(ic), fwsign)