# # This script generates a simple H2 input and writes it to disk # # MBG (2/2014) # # import pyqchem as qc #make the rem array and define the basis and exchange (setting them to defaults, but showing how) rem=qc.rem_array() rem.basis("sto-3g") rem.exchange("hf") #make the cartesian object xyz=qc.cartesian() xyz.add_atom() #defaults to H at origin xyz.add_atom("H","0","0",".74") #make molecule array from cartesian object molec=qc.mol_array(xyz) #make input object and write to disk job=qc.inputfile() job.add(rem) job.add(molec) job.write("h2.in")
rem1.scf_convergence("10") from copy import deepcopy rem2 = deepcopy(rem1) rem2.scf_guess("fragmo") #make a rem_frgm array rem_frgm = qc.rem_frgm_array() rem_frgm.thresh("7") rem_frgm.scf_convergence("3") #make objects for holding the molecular geometries xyz = qc.read("4water.xyz") frag = qc.fragment(atom_list=xyz.list_of_atoms) #make molecule array from cartesian object mol1 = qc.mol_array(xyz) mol2 = qc.mol_array(frag) #make input object and write to disk job1 = qc.inputfile() job1.add(rem1) job1.add(mol1) job2 = qc.inputfile() job2.add(rem2) job2.rem.scf_guess("fragmo") job2.add(rem_frgm) job2.add(mol2) job = qc.multifile() job.add(job1)
import pyqchem as qc import os #make a generic rem array rem=qc.rem_array() rem.basis("sto-3g") rem.exchange("hf") #make a list of jobs job_list=[] #for all xyzs in a database, create and append the job to the list for i in os.popen("ls ../../databases/a24/*.xyz").read().splitlines(): #make the jobs job=qc.inputfile() #give job a name job.runinfo.name=i.split('/')[-1].replace(".xyz","") #read the xyz xyz=qc.read(i) #append the molecule and rem array job.add(qc.mol_array(xyz)) job.add(rem) job_list.append(job) # run all jobs in list using 12 workers qc.queue(job_list,num_workers=12)
rem1.scf_convergence("10") from copy import deepcopy rem2=deepcopy(rem1) rem2.scf_guess("fragmo") #make a rem_frgm array rem_frgm=qc.rem_frgm_array() rem_frgm.thresh("7") rem_frgm.scf_convergence("3") #make objects for holding the molecular geometries xyz=qc.read("4water.xyz") frag=qc.fragment(atom_list=xyz.list_of_atoms) #make molecule array from cartesian object mol1=qc.mol_array(xyz) mol2=qc.mol_array(frag) #make input object and write to disk job1=qc.inputfile() job1.add(rem1) job1.add(mol1) job2=qc.inputfile() job2.add(rem2) job2.rem.scf_guess("fragmo") job2.add(rem_frgm) job2.add(mol2) job=qc.multifile() job.add(job1)
# MBG (2/2014) # import pyqchem as qc #make the rem array and fill it rem = qc.rem_array() rem.basis("sto-3g") rem.jobtype("opt") #make the cartesian object and fill it xyz = qc.cartesian() xyz.add_atom() #defaults to H at origin xyz.add_atom("H", "0", "0", ".74") #make molecule array from cartesian object molec = qc.mol_array(xyz) #assemble the job from the arrays job1 = qc.inputfile() job1.add(rem) job1.add(molec) #write it to file job1.write("h2.in") #make another rem to do the second job rem2 = qc.deepcopy(rem) rem2.jobtype("freq") #define the molecule array as "READ" so we grab the right geometry molec2 = qc.mol_array()
import pyqchem as qc import os #make a generic rem array rem = qc.rem_array() rem.basis("sto-3g") rem.exchange("hf") #make a list of jobs job_list = [] #for all xyzs in a database, create and append the job to the list for i in os.popen("ls ../../databases/a24/*.xyz").read().splitlines(): #make the jobs job = qc.inputfile() #give job a name job.runinfo.name = i.split('/')[-1].replace(".xyz", "") #read the xyz xyz = qc.read(i) #append the molecule and rem array job.add(qc.mol_array(xyz)) job.add(rem) job_list.append(job) # run all jobs in list using 12 workers qc.queue(job_list, num_workers=12)
# import pyqchem as qc #make the rem array and fill it rem=qc.rem_array() rem.basis("sto-3g") rem.jobtype("opt") #make the cartesian object and fill it xyz=qc.cartesian() xyz.add_atom() #defaults to H at origin xyz.add_atom("H","0","0",".74") #make molecule array from cartesian object molec=qc.mol_array(xyz) #assemble the job from the arrays job1=qc.inputfile() job1.add(rem) job1.add(molec) #write it to file job1.write("h2.in") #make another rem to do the second job rem2=qc.deepcopy(rem) rem2.jobtype("freq") #define the molecule array as "READ" so we grab the right geometry molec2=qc.mol_array()