diff --git a/Gaussian.py b/Gaussian.py index c2da070..0ab72ae 100755 --- a/Gaussian.py +++ b/Gaussian.py @@ -109,7 +109,7 @@ def SetupOptCalcs(Isomers, settings): if os.path.exists(filename + '.out'): if IsGausCompleted(filename + '.out'): - if IsGausConverged(filename + '.out'): + if IsGausConverged(filename + '.out') or (settings.AssumeConverged == True): iso.OptOutputFiles.append(filename + '.out') continue else: diff --git a/GaussianDarwin.py b/GaussianDarwin.py index 1cd969a..44fff46 100755 --- a/GaussianDarwin.py +++ b/GaussianDarwin.py @@ -251,6 +251,11 @@ def RunBatchOnDarwin(findex, GausJobs, settings): os.getcwd() + '/'], \ stderr=subprocess.STDOUT, stdout=subprocess.PIPE).communicate()[0] + print("\nDeleting checkpoint files...") + print('ssh darwin rm ' + fullfolder + '/*.chk') + outp = subprocess.Popen(['ssh', 'darwin', 'rm', fullfolder + '/*.chk'], \ + stderr=subprocess.STDOUT, stdout=subprocess.PIPE).communicate()[0] + fullscrfolder = settings.DarwinScrDir + scrfolder print("\nDeleting scratch folder...") print('ssh darwin rm -r ' + fullscrfolder) diff --git a/MacroModel.py b/MacroModel.py index f25436b..c6dcb50 100755 --- a/MacroModel.py +++ b/MacroModel.py @@ -47,8 +47,10 @@ def SetupMacroModel(settings): convinp = '"' + settings.SCHRODINGER + '/utilities/sdconvert" -isd ' else: convinp = settings.SCHRODINGER + '/utilities/sdconvert -isd ' - outp = subprocess.check_output(convinp + f + '.sdf -omae ' + f + - '.mae', shell=True) + + if not os.path.exists(f + '.mae'): + outp = subprocess.check_output(convinp + f + '.sdf -omae ' + f + + '.mae', shell=True) MacroModelInputs.append(f + '.mae') #Copy default com file to directory diff --git a/PyDP4.py b/PyDP4.py index 5f224cc..ea0ca7b 100755 --- a/PyDP4.py +++ b/PyDP4.py @@ -80,6 +80,7 @@ class Settings: NMRsource = '' # File or folder containing NMR description or data Title = 'DP4molecule' # Title of the calculation, set to NMR file name by default on launch AssumeDone = False # Assume all computations done, only read DFT output data and analyze (use for reruns) + AssumeConverged = False # Assume all optimizations have converged, do NMR and/or energy calcs on existing DFT geometries UseExistingInputs = False # Don't regenerate DFT inputs, use existing ones. Good for restarting a failed calc # --- Diastereomer generation --- @@ -158,7 +159,7 @@ def __init__(self, InputFile, Charge=-100): self.NMROutputFiles = [] # list of DFT NMR output file names self.ShieldingLabels = [] # A list of atom labels corresponding to the shielding values self.ConformerShieldings = [] # list of calculated NMR shielding constant lists for every conformer - self.BolztmannShieldings = [] # Boltzmann weighted NMR shielding constant list for the isomer + self.BoltzmannShieldings = [] # Boltzmann weighted NMR shielding constant list for the isomer self.Cshifts = [] # Calculated C NMR shifts self.Hshifts = [] # Calculated H NMR shifts @@ -249,7 +250,7 @@ def main(settings): Isomers = DFT.ReadGeometries(Isomers) #Add convergence check here before continuing with calcs! - if DFT.Converged(Isomers) == False: + if (DFT.Converged(Isomers) == False) and (settings.AssumeConverged == False): print('Some of the conformers did not converge, quitting...') quit() @@ -431,6 +432,8 @@ def getScriptPath(): parser.add_argument("--AssumeDFTDone", help="Assume RMSD pruning, DFT setup\ and DFT calculations have been run already", action="store_true") + parser.add_argument("--AssumeConverged", help="Assume DFT optimizations have" + \ + " converged and can be used for NMR and or energy calcs", action="store_true") parser.add_argument("--UseExistingInputs", help="Use previously generated\ DFT inputs, avoids long conf pruning and regeneration", action="store_true") parser.add_argument("--NoConfPrune", help="Skip RMSD pruning, use all\ @@ -503,6 +506,8 @@ def getScriptPath(): settings.ConfPrune = False if args.AssumeDFTDone: settings.AssumeDone = True + if args.AssumeConverged: + settings.AssumeConverged = True if args.UseExistingInputs: settings.UseExistingInputs = True if args.solvent: