Ejemplo n.º 1
0
    def __init__(self,
                 infile,
                 charge,
                 mult,
                 joblist,
                 method='tpssh',
                 nametrunc=True,
                 basis='6-31+g*'):
        self.charge_tran = {
            'a2': '-2',
            'a1': '-1',
            'a0': '0',
            'c1': '1',
            'c2': '2',
            'c3': '3',
            'c4': '4'
        }
        revd = dict([reversed(i) for i in self.charge_tran.items()])
        self.charge_tran.update(revd)

        splinfile = infile.split('/')
        if len(splinfile) == 1:
            self.path = ''
        else:
            self.path = '/'.join(splinfile[:-1]) + '/'
        self.name = (splinfile[-1].split('.'))[0]
        if nametrunc == True:
            self.name = self.name.split('_')[0]
        self.infile = infile
        self.charge = charge
        self.mult = mult
        print(self.charge, self.mult)

        self.joblist = joblist  #joblist is a list of Q-Chem jobtypes
        self.method = method
        self.jobconcat = ''.join(joblist)
        self.job = qc.multifile()
        self.nametrunc = nametrunc
        self.basis = basis
Ejemplo n.º 2
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")
Ejemplo n.º 3
0
#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
job2=qc.inputfile()
job2.add(rem2)
job2.add(molec2)

#make the multifile input and save it
job=qc.multifile()
job.add(job1)
job.add(job2)
job.write("h2_opt.in")