lanl / Architector

The architector python package - for 3D metal complex design. C22085
Other
38 stars 6 forks source link

[Minor bug] override_oxo_opt #26

Closed espottesmith closed 1 month ago

espottesmith commented 8 months ago

In io_calc.py, there's the code:

# Difference of more than 1. Still perform a ff_preoptimization if requested.

if (np.abs(self.mol.xtb_charge - self.mol.charge) > 1):

    if ((not self.override_oxo_opt) or (self.assembly)) and (not self.force_oxo_relax):

        self.relax = False # E.g - don't relax if way off in oxdiation states (III) vs (V or VI)

    elif self.assembly: # FF more stable for highly charged assembly complexes.

        self.method = 'GFN-FF'

The problem is: as far as I can tell, there is no self.override_oxo_opt. When I was using this code, every time this section was hit, I got an error reporting that self.override_oxo_opt was not assigned.

I think a fix would be to instead reference the properties, like:

if ((not self.properties.get("override_oxo_opt", False)) or self.assembly) and (not self.force_oxo_relax)

I've been testing on Secondary_Solvation_Shell, but this bug seems to affect the main branch as well. Happy to give more specifics if needed.

mgt16-LANL commented 8 months ago

Should be resolved with : https://github.com/lanl/Architector/commit/78a2c5fb6c8d8a7e309fd1ad1708500eb69b8e06 ! LMK if this is still giving errors.

espottesmith commented 8 months ago

Will test and check it out! Thanks for the quick response.