Skip to content

Feat/pydantic#6

Closed
romaingrx wants to merge 367 commits into
v2from
feat/pydantic
Closed

Feat/pydantic#6
romaingrx wants to merge 367 commits into
v2from
feat/pydantic

Conversation

@romaingrx

Copy link
Copy Markdown

No description provided.

- Removed the cell2mol_mode function from final_c2m_module.py, simplifying the interface for running cell2mol.
- Consolidated the unit cell reconstruction logic into a new function, reconstruct_unitcell, in cell_reconstruction.py.
- Updated unitcell.py to directly call reconstruct_unitcell, enhancing clarity and reducing complexity.
feat: add ProtonationGroupResult to type registry
- Introduced a new script `rf.py` for training a Random Forest classifier.
- Added hapticity in features
- Included cross-validation for model evaluation with metrics such as accuracy and F1 score.
- Saved the trained model and its metadata, including feature importance.
- enumerate  protonation states
- resolve charge states for species
- balance and validate total molecular or unit cell charge
- process SMILES and generate bond order information
- Updated logging messages in Group and Ligand classes to provide clearer context.
- Removed debug parameters from methods where they were unnecessary.
- Changed import paths for charge-related functions to reflect new module structure.
- Simplified charge assignment logic in Molecule class and removed redundant debug prints.
- Enhanced error assessment in Molecule class to categorize error cases.
- Cleaned up commented-out debug logs for better readability.
- Adjusted default values for cov_factor and metal_factor in Specie class to use config constants.
choglass and others added 26 commits July 3, 2026 11:23
Co-authored-by: Copilot <copilot@github.com>
…erenes, noble gases, teflate, and Sb-halides

These species were previously skipped or forced through the general
AC2mol bond-order search, which either can't scale to them (60+ atom
fullerene cages) or produces chemically implausible charge-separated
resonance structures. Each now gets a direct, connectivity-based
charge assignment instead:

- Fullerene cages: closed-shell Kekule structure via a perfect matching
  on the 3-regular cage graph (Petersen's theorem), replacing the old
  "skip entirely" behavior.
- Noble gas solvate/lattice atoms: always neutral.
- Teflate (-OTeF5): fixed hexacoordinate Te(VI) pattern with charge on
  the terminal O.
- Sb-halide-only species: per-center formal charge for mononuclear
  cases, and charge distributed round-robin across terminal halogens
  for polynuclear/bridged clusters.

Also:
- Route As/Sb/Bi/Se/Te always through the AC2BO search regardless of
  whether their degree matches a "normal" valence.
- Detect non-coordinated carboxylate/sulfonate moieties to size ligand
  max-charge ranges, replacing the plain terminal-oxygen count.
- Add dedicated porphyrin charge handling and disable charged
  fragments when a porphyrin's candidate charge is 0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants