Skip to content

Commit 359638e

Browse files
committed
Consider conf_sp job_type in the output folder txt files
1 parent 9666d50 commit 359638e

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

arc/plotter.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -901,6 +901,7 @@ def save_conformers_file(project_directory: str,
901901
im_freqs: Optional[List[List[float]]] = None,
902902
log_content: bool = False,
903903
before_optimization: bool = True,
904+
sp_flag = False,
904905
):
905906
"""
906907
Save the conformers before or after optimization.
@@ -920,6 +921,7 @@ def save_conformers_file(project_directory: str,
920921
im_freqs (list, optional): Entries lists of imaginary frequencies.
921922
log_content (bool): Whether to log the content of the conformers file. ``True`` to log, default is ``False``.
922923
before_optimization (bool): Whether the conformers are before DFT optimization. ``True`` for before, default is ``True``.
924+
sp_flag (bool): Whether the conformers are single point calculations. ``True`` for single point, default is ``False``.
923925
"""
924926
spc_dir = 'rxns' if is_ts else 'Species'
925927
geo_dir = os.path.join(project_directory, 'output', spc_dir, label, 'geometry', 'conformers')
@@ -936,7 +938,10 @@ def save_conformers_file(project_directory: str,
936938
content += f'Conformers for {label}, computed using a force field:\n\n'
937939
else:
938940
level_of_theory = level_of_theory.simple() if isinstance(level_of_theory, Level) else level_of_theory
939-
content += f'Conformers for {label}, optimized at the {level_of_theory} level:\n\n'
941+
if not sp_flag:
942+
content += f'Conformers for {label}, optimized at the {level_of_theory} level:\n\n'
943+
else:
944+
content += f'Conformers for {label}, single point calculation at the {level_of_theory} level:\n\n'
940945
for i, xyz in enumerate(xyzs):
941946
content += f'conformer {i}:\n'
942947
if xyz is not None:

arc/scheduler.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ def schedule_jobs(self):
569569
if self.species_dict[label].is_ts:
570570
self.determine_most_likely_ts_conformer(label)
571571
else:
572-
self.determine_most_stable_conformer(label) # also checks isomorphism
572+
self.determine_most_stable_conformer(label, sp_flag=True if self.job_types['conf_sp'] else False) # also checks isomorphism
573573
if self.species_dict[label].initial_xyz is not None:
574574
# if initial_xyz is None, then we're probably troubleshooting conformers, don't opt
575575
if not self.composite_method:
@@ -2002,14 +2002,15 @@ def parse_conformer(self,
20022002
return True
20032003
return False
20042004

2005-
def determine_most_stable_conformer(self, label):
2005+
def determine_most_stable_conformer(self, label, sp_flag=False):
20062006
"""
20072007
Determine the most stable conformer for a species (which is not a TS).
20082008
Also run an isomorphism check.
20092009
Save the resulting xyz as `initial_xyz`.
20102010
20112011
Args:
20122012
label (str): The species label.
2013+
sp_flag (bool): Whether this is a single point calculation job.
20132014
"""
20142015
if self.species_dict[label].is_ts:
20152016
raise SchedulerError('The determine_most_stable_conformer() method does not deal with transition '
@@ -2031,12 +2032,13 @@ def determine_most_stable_conformer(self, label):
20312032
plotter.save_conformers_file(project_directory=self.project_directory,
20322033
label=label,
20332034
xyzs=self.species_dict[label].conformers,
2034-
level_of_theory=self.conformer_opt_level,
2035+
level_of_theory=self.conformer_opt_level if not sp_flag else self.conformer_sp_level,
20352036
multiplicity=self.species_dict[label].multiplicity,
20362037
charge=self.species_dict[label].charge,
20372038
is_ts=False,
20382039
energies=self.species_dict[label].conformer_energies,
20392040
before_optimization=False,
2041+
sp_flag=sp_flag,
20402042
) # after optimization
20412043
# Run isomorphism checks if a 2D representation is available
20422044
if self.species_dict[label].mol is not None:

0 commit comments

Comments
 (0)