Skip to content

Commit ccf8d24

Browse files
authored
Avoid parsing active space when wavefunctions are used without proceeding to MRCI in molpro (#830)
Parsing active space is needed before running an MRCI job in molpro. For a method type labeled as wavefunction (CC), ARC tries to run parse_active_space, but stops the whole job if SP was not in molpro. Fixed to allow using wavefunctions without MRCI.
2 parents b665b73 + 818b8b7 commit ccf8d24

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

arc/parser/parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ def parse_active_space(sp_path: str, species: 'ARCSpecies') -> Optional[Dict[str
539539
if not os.path.isfile(sp_path):
540540
raise InputError(f'Could not find file {sp_path}')
541541
if not determine_ess(sp_path) == 'molpro':
542-
raise InputError(f'File {sp_path} is not a Molpro output file, cannot parse active space.')
542+
return None
543543
active = dict()
544544
num_heavy_atoms = sum([1 for symbol in species.get_xyz()['symbols'] if symbol not in ['H', 'D', 'T']])
545545
nuclear_charge, total_closed_shell_orbitals, total_active_orbitals = None, None, None

arc/scheduler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2681,7 +2681,7 @@ def post_sp_actions(self,
26812681
if self.sp_level is not None and 'ccsd' in self.sp_level.method:
26822682
self.species_dict[label].t1 = parser.parse_t1(self.output[label]['paths']['sp'])
26832683
self.species_dict[label].e_elect = parser.parse_e_elect(self.output[label]['paths']['sp'])
2684-
if level is not None and level.method_type == 'wavefunction':
2684+
if level is not None and level.method_type == 'wavefunction' and self.species_dict[label].active is None:
26852685
self.species_dict[label].active = parser.parse_active_space(sp_path=self.output[label]['paths']['sp'],
26862686
species=self.species_dict[label])
26872687
if self.species_dict[label].t1 is not None:

0 commit comments

Comments
 (0)