Skip to content

Commit

Permalink
BugFix: Change factor if trshing neg freq more than once
Browse files Browse the repository at this point in the history
  • Loading branch information
alongd committed Jun 21, 2019
1 parent 300d579 commit 2f89f9a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions arc/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down

0 comments on commit 2f89f9a

Please sign in to comment.