ReactionMechanismGenerator / ReactionMechanismGenerator/ARC
deduce_method_type substring-matches 'am' inside 'cam', so CAM-B3LYP types as semiempirical and open-shell species run restricted
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 51
- Forks
- 25
- Avg merge
- 4d 5h
- Merged PRs (30d)
- 15
Description
Level.deduce_method_type (arc/level.py:344) tests its method lists by substring:
semiempirical_methods = ['am', 'pm', 'zindo', 'mndo', 'xtb', 'nddo']
...
elif any(sm_method in self.method for sm_method in semiempirical_methods):
self.method_type = 'semiempirical'
'am' is a substring of 'cam', so every Coulomb-attenuated functional types as semiempirical.
is_species_restricted (arc/job/adapters/common.py:631) early-returns True for
REFERENCE_AGNOSTIC_METHOD_TYPES, which includes semiempirical, before any multiplicity
check — so an open-shell species at a CAM functional is decided restricted.
Executed on a doublet OH ([OH], multiplicity 2, number_of_radicals=None):
b3lyp type=dft is_species_restricted=False
cam-b3lyp type=semiempirical is_species_restricted=True
camh-b3lyp type=semiempirical is_species_restricted=True
lc-camb3lyp type=semiempirical is_species_restricted=True
cam-qtp00 type=semiempirical is_species_restricted=True
wb97xd type=dft is_species_restricted=False
m062x type=dft is_species_restricted=False
It reaches the input file. Gaussian (cam-b3lyp, data/ess_methods.yml:17) — benign, because
Gaussian selects the unrestricted method itself for multiplicity > 1:
b3lyp #P integral=(grid=ultrafine, Acc2E=12) guess=mix ub3lyp/def2tzvp ...
cam-b3lyp #P integral=(grid=ultrafine, Acc2E=12) guess=mix cam-b3lyp/def2tzvp ...
TeraChem (camb3lyp, data/ess_methods.yml:154) is not benign — terachem.py:278 writes
the prefix explicitly:
b3lyp charge 0 / spinmult 2 / basis def2tzvp / method ub3lyp
camb3lyp charge 0 / spinmult 2 / basis def2tzvp / method rcamb3lyp
method rcamb3lyp with spinmult 2 is a restricted DFT calculation on a doublet radical — a
wrong number with no error raised. QChem would be the same class of failure
(qchem.py:225 writes input_dict['unrestricted'] = 'False') if it registered a CAM
functional; it currently does not.
Two other consequences of the same misclassification, since semiempirical is
reference-agnostic throughout: job_scf_reference_is_restricted returns None for these
levels, and any frequency scale factor / method-type dispatch keyed on method_type sees
semiempirical for what is an ordinary range-separated hybrid.
The narrow fix is to stop matching 'am'/'pm' as bare substrings — e.g. anchor the
semiempirical stems to a token boundary, or match am1/pm3/pm6/pm7 explicitly rather
than their two-letter prefixes. Worth auditing the other lists for the same trap while there
('ri' matches inside ripwpb95, 'ic' inside a good many names).
Found while reviewing #1014 — @calvinp0 spotted the misclassification there; the TeraChem
escalation and the executed inputs above are from verifying it. Not caused by that PR;
arc/level.py is untouched by it.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at arc/level.py:344 and trace how method_type feeds is_species_restricted in arc/job/adapters/common.py:631. Reproduce the listed CAM examples for an open-shell species, then inspect terachem.py:278 and the relevant data/ess_methods.yml entries. Done means CAM methods are classified as DFT and unrestricted inputs are preserved where required, without breaking genuine semiempirical names.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 74/100