From 2f89f9aa242d7dd382371a4365919311804cdc20 Mon Sep 17 00:00:00 2001 From: alongd Date: Fri, 21 Jun 2019 10:34:24 -0400 Subject: [PATCH] BugFix: Change factor if trshing neg freq more than once --- arc/scheduler.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arc/scheduler.py b/arc/scheduler.py index 650b84ae07..c0a4122492 100644 --- a/arc/scheduler.py +++ b/arc/scheduler.py @@ -1391,25 +1391,25 @@ def troubleshoot_negative_freq(self, label, job): if vibfreqs[largest_neg_freq_idx] >= 0 or len(neg_freqs_idx) == 0: raise SchedulerError('Could not determine negative frequency in species {0} while troubleshooting for' ' negative frequencies'.format(label)) - if len(neg_freqs_idx) == 1 and len(self.species_dict[label].neg_freqs_trshed) == 0: + if len(neg_freqs_idx) == 1 and not len(self.species_dict[label].neg_freqs_trshed): # species has one negative frequency, and has not been troubleshooted for it before logger.info('Species {0} has a negative frequencies ({1}). Perturbing its geometry using the respective ' 'vibrational displacements'.format(label, vibfreqs[largest_neg_freq_idx])) neg_freqs_idx = [largest_neg_freq_idx] # indices of the negative frequencies to troubleshoot for - elif len(neg_freqs_idx) == 1 and len(self.species_dict[label].neg_freqs_trshed) == 0: + elif len(neg_freqs_idx) == 1 and len(self.species_dict[label].neg_freqs_trshed): # species has one negative frequency, and has been troubleshooted for it before - factor = 1.3 + factor = 1 + 0.1 * len(self.species_dict[label].neg_freqs_trshed) logger.info('Species {0} has a negative frequencies ({1}). Perturbing its geometry using the respective ' 'vibrational displacements, this time using a larger factor ({2})'.format( label, vibfreqs[largest_neg_freq_idx], factor)) neg_freqs_idx = [largest_neg_freq_idx] # indices of the negative frequencies to troubleshoot for - elif len(neg_freqs_idx) > 1 and len(self.species_dict[label].neg_freqs_trshed) == 0: + elif len(neg_freqs_idx) > 1 and not len(self.species_dict[label].neg_freqs_trshed): # species has more than one negative frequency, and has not been troubleshooted for it before logger.info('Species {0} has {1} negative frequencies. Perturbing its geometry using the vibrational ' 'displacements of its largest negative frequency, {2}'.format(label, len(neg_freqs_idx), vibfreqs[largest_neg_freq_idx])) neg_freqs_idx = [largest_neg_freq_idx] # indices of the negative frequencies to troubleshoot for - elif len(neg_freqs_idx) > 1 and len(self.species_dict[label].neg_freqs_trshed) > 0: + elif len(neg_freqs_idx) > 1 and len(self.species_dict[label].neg_freqs_trshed): # species has more than one negative frequency, and has been troubleshooted for it before logger.info('Species {0} has {1} negative frequencies. Perturbing its geometry using the vibrational' ' displacements of ALL negative frequencies'.format(label, len(neg_freqs_idx)))