nlesc-nano / CAT

A collection of tools designed for the automatic construction, and subsequent analysis, of chemical compounds.
Other
16 stars 2 forks source link

ENH: Add support for polyatomic core anchors #259

Closed BvB93 closed 2 years ago

BvB93 commented 2 years ago

closes https://github.com/nlesc-nano/CAT/issues/255, cc @juliette1996

Add support for poly atomic core anchors such that the likes of, e.g., acetate-passivated cores can be supplied as input cores, the acetate in this case being replaced with actual ligands. Among others this includes the new core.optional.allignment = "anchor" option, which can be used for defining core vectors based on those from polyatomic core anchors.

Examples

Example involving an acetate anchor.

optional:
    core:
        allignment: "anchor"  # Define the core vectors based on the dummy acetate's vectors
        anchor:
            group: "[O-]C(C([H])([H])[H])=O"  # Acetate anion (with explicit hydrogens!)
            group_idx: [0, 6]  # Represent the anchor by the mean position of both oxyanions
            kind: "mean"
            remove: [0, 1, 2, 3, 4, 5, 6]  # Remove the entirety of the dummy acetate
codecov[bot] commented 2 years ago

Codecov Report

Merging #259 (e5c4ded) into master (ad4892b) will decrease coverage by 0.28%. The diff coverage is 75.51%.

@@            Coverage Diff             @@
##           master     #259      +/-   ##
==========================================
- Coverage   68.32%   68.04%   -0.29%     
==========================================
  Files          51       51              
  Lines        4237     4259      +22     
  Branches      793      798       +5     
==========================================
+ Hits         2895     2898       +3     
- Misses       1166     1179      +13     
- Partials      176      182       +6     
Impacted Files Coverage Δ
CAT/data_handling/validation_schemas.py 90.65% <ø> (ø)
CAT/attachment/core_anchoring.py 72.94% <70.00%> (-2.06%) :arrow_down:
CAT/__version__.py 100.00% <100.00%> (ø)
CAT/attachment/ligand_attach.py 78.30% <100.00%> (-0.14%) :arrow_down:
CAT/data_handling/anchor_parsing.py 100.00% <100.00%> (ø)
CAT/multi_ligand.py 64.19% <100.00%> (-13.59%) :arrow_down:
CAT/utils.py 69.64% <100.00%> (ø)
CAT/workflows/workflow.py 74.62% <0.00%> (-0.76%) :arrow_down:
CAT/base.py 63.90% <0.00%> (+1.18%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.