Example #1
0
 def generate_input(self, sdf_string):
     """Create input files for NWChem.
     Args:
         sdf_string (str)
     """
     xyz_string = sdf2xyz(sdf_string)
     coord = xyz_string.split('\n')
     string1 = 'title "Molecule DFT geometry optimization"\ngeometry\n'
     string2 = 'end \nbasis\n * library '+str(self.basis_set)
     string3 = 'end\ndft\n  iterations 50\n  xc '+str(self.functional)
     string4 = 'end\ndriver\n  xyz '+prefix_name
     string5 = '  loose\nend\ntask dft optimize'
     with open('nwchem_molecule.nw', 'w') as f:
         f.write(string1)
         f.write('\n'.join(coord[2:]))
         f.write('\n'+string2)
         f.write('\n'+string3)
         f.write('\n'+string4)
         f.write('\n'+string5)
     f.close()
Example #2
0
 def generate_input(self, sdf_string):
     """Create input files for NWChem.
     Args:
         sdf_string (str)
     """
     xyz_string = sdf2xyz(sdf_string)
     coord = xyz_string.split('\n')
     string1 = 'title "Molecule DFT geometry optimization"\ngeometry\n'
     string2 = 'end \nbasis\n * library '+str(self.basis_set)
     string3 = 'end\ndft\n  iterations 50\n  xc '+str(self.functional)
     string4 = 'end\ndriver\n  xyz '+prefix_name
     string5 = '  loose\nend\ntask dft optimize'
     with open('nwchem_molecule.nw', 'w') as f:
         f.write(string1)
         f.write('\n'.join(coord[2:]))
         f.write('\n'+string2)
         f.write('\n'+string3)
         f.write('\n'+string4)
         f.write('\n'+string5)
     f.close()
Example #3
0
 def generate_input(self, sdf_string):
     """Create input files for ORCA.
     Args:
         sdf_string (str)
     """
     xyz_string = sdf2xyz(sdf_string)
     coord = xyz_string.split('\n')
     string1 = '! '+str(self.commandline)+'\n'
     string2 = '! xyzfile\n'
     string3 = '%geom MaxIter '+str(self.optsteps)+' end\n'
     string4 = '%pal nprocs '+str(self.nprocs)+" end\n"
     string5 = '%maxcore '+str(self.memory)+"\n"
     string6 = '* xyz '+str(self.chargemult)+'\n'
     with open('orca_molecule.inp', 'w') as f:
         f.write(string1)
         f.write(string2)
         f.write(string3)
         f.write(string4)
         f.write(string5)
         f.write(string6)
         f.write('\n'.join(coord[2:]))
         f.write('*\n')
     f.close()
Example #4
0
 def generate_input(self, sdf_string):
     """Create input files for ORCA.
     Args:
         sdf_string (str)
     """
     xyz_string = sdf2xyz(sdf_string)
     coord = xyz_string.split('\n')
     string1 = '! '+str(self.commandline)+'\n'
     string2 = '! xyzfile\n'
     string3 = '%geom MaxIter '+str(self.optsteps)+' end\n'
     string4 = '%pal nprocs '+str(self.nprocs)+" end\n"
     string5 = '%maxcore '+str(self.memory)+"\n"
     string6 = '* xyz '+str(self.chargemult)+'\n'
     with open('orca_molecule.inp', 'w') as f:
         f.write(string1)
         f.write(string2)
         f.write(string3)
         f.write(string4)
         f.write(string5)
         f.write(string6)
         f.write('\n'.join(coord[2:]))
         f.write('*\n')
     f.close()