Exemplo n.º 1
0
 def assembleJob(self):
     job = qc.inputfile()
     self.jobdict[self.jobtype]()
     job.add(self.rem)
     job.add(self.mol)  # this is where coordinate info is added
     for job_arr in self.job_arr_list:
         job.add(job_arr)
     return job
Exemplo n.º 2
0
 def assembleJob(self):
     job = qc.inputfile()
     self.jobdict[self.jobtype]()
     job.add(self.rem)
     job.add(self.mol)
     for job_arr in self.job_arr_list:
         job.add(job_arr)
     return job
Exemplo n.º 3
0
    def run(self):
        job = qc.inputfile()
        job.add(self._rem_array)
        job.add(self._molecule.get_QChem_molecule())

        if exists(self._job_name + ".out"):
            raise IOError("Output file already exists for job: {0}.".format(
                self._job_name))
        else:
            msg.info("Starting " + self._job_type + ": " + self._job_name, 1)
            job.run(name=self._job_name)
Exemplo n.º 4
0
myrem.exchange('hf')
myrem.basis('sto-3g')
myrem.scf_algorithm('rca_diis')
#myrem.max_rca_cycles('10')
#myrem.thresh_rca_switch('7')
myrem.scf_guess('sad')
myrem.scf_convergence('9')
myrem.thresh('14')
myrem.incfock('0')
myrem.incdft('0')
#myrem.max_scf_cycles('500')
#myrem.symmetry('false')
#myrem.sym_ignore('true')
myrem.mem_total('16000')
myrem.mem_static('4000')

# Add rem_array
myfile = qc.inputfile()
myfile.add(myrem)

# Add geometry array
mygeo = qc.mol_array(aa.aimd.geometries[0])
myfile.add(mygeo)

# Finally, create each inputfile and write it to disk
for i, k in enumerate(aa.aimd.geometries):
    mygeo = qc.mol_array(k)
    myfile.add(mygeo)
    filename = str(i) + ".inp"
    myfile.write(filename)
Exemplo n.º 5
0
import pyQChem as qc

#generate rem array, cartesian object, mol array, and job via standard procedure (see input demos)
rem = qc.rem_array()
rem.basis("sto-3g")
rem.jobtype("opt")
xyz = qc.cartesian()
xyz.add_atom()
xyz.add_atom("H", "0", "0", ".74")
molec = qc.mol_array(xyz)
job = qc.inputfile()
job.add(rem)
job.add(molec)

#run job with name "h2" making h2.in h2.sh, and h2.out
job.run(name="h2")

#read in output
out = qc.read("h2.out")
out.opt.info()

#let's approximate how much this has changed

#grab first geometry
start = out.opt.geometries[0]

#grab last geometry
end = out.opt.geometries[-1]

#Print statistics for geometric distortions
print "\n\nApproximate change between starting and ending geometries by two metrics:\n"
Exemplo n.º 6
0
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)
Exemplo n.º 7
0
#make a rem_frgm array
rem_frgm=pq.rem_frgm_array()
rem_frgm.thresh("7")
rem_frgm.scf_convergence("3")

#make objects for holding the molecular geometries
xyz=pq.read("4water.xyz")
frag=pq.fragment(atom_list=xyz.list_of_atoms)

#make molecule array from cartesian object
mol1=pq.mol_array(xyz)
mol2=pq.mol_array(frag)

#make input object and write to disk
job1=pq.inputfile()
job1.add(rem1)
job1.add(mol1)

job2=pq.inputfile()
job2.add(rem2)
job2.rem.scf_guess("fragmo")
job2.add(rem_frgm)
job2.add(mol2)

job=pq.multifile()
job.add(job1)
job.add(job2)

job.write("4water.in")
Exemplo n.º 8
0
#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()
molec2.geometry("read")

#assemble the second job