if __name__ == '__main__': from qchem import QChem from pes import PES from molecule import Molecule from _linesearch import NoLineSearch from slots import Distance basis = "6-31G*" nproc = 8 filepath = "examples/tests/bent_benzene.xyz" lot = QChem.from_options(states=[(1, 0)], charge=0, basis=basis, functional='HF', nproc=nproc, fnm=filepath) pes = PES.from_options(lot=lot, ad_idx=0, multiplicity=1) M = Molecule.from_options(fnm=filepath, PES=pes, coordinate_type="DLC") distance = Distance(5, 8) #Not 1 based!! print(distance) ef = eigenvector_follow.from_options() #Linesearch=NoLineSearch) geoms = ef.optimize(molecule=M, refE=M.energy, opt_steps=5) #geoms = ef.optimize(molecule=M,refE=M.energy,opt_steps=1) print(M.primitive_internal_coordinates) manage_xyz.write_xyzs('opt.xyz', geoms, scale=1.)
#functional='HF' functional = 'B3LYP' filepath1 = "examples/tests/butadiene_ethene.xyz" filepath2 = "examples/tests/cyclohexene.xyz" #filepath1='reactant.xyz' #filepath2='product.xyz' lot1 = QChem.from_options(states=[(1, 0)], charge=0, basis=basis, functional=functional, nproc=nproc, fnm=filepath1) lot2 = QChem(lot1.options.copy().set_values({'fnm': filepath2})) pes1 = PES.from_options(lot=lot1, ad_idx=0, multiplicity=1) pes2 = PES(pes1.options.copy().set_values({'lot': lot2})) M1 = Molecule.from_options(fnm=filepath1, PES=pes1, coordinate_type="DLC") M2 = Molecule.from_options(fnm=filepath2, PES=pes2, coordinate_type="DLC") optimizer = eigenvector_follow.from_options( print_level=1 ) #default parameters fine here/opt_type will get set by GSM gsm = GSM.from_options(reactant=M1, product=M2, nnodes=9, optimizer=optimizer, print_level=1) gsm.go_gsm(rtype=2, opt_steps=3)