Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to employ polyatomic core anchors #261

Open
juliette1996 opened this issue Nov 25, 2022 · 4 comments
Open

Failed to employ polyatomic core anchors #261

juliette1996 opened this issue Nov 25, 2022 · 4 comments
Labels
question Further information is requested

Comments

@juliette1996
Copy link

Hello there,
I'm trying to use the new option
core.optional.allignment = "anchor"
but it's apparently failing with this error message:

Traceback (most recent call last):
  File "C:\Users\jzito\Miniconda3\envs\escience\Scripts\init_cat-script.py", line 33, in <module>
    sys.exit(load_entry_point('nlesc-CAT', 'console_scripts', 'init_cat')())
  File "c:\users\jzito\escience\cat\CAT\data_handling\entry_points.py", line 62, in main
    base.prep(extract_args(args), return_mol=False)
  File "c:\users\jzito\escience\cat\CAT\base.py", line 121, in prep
    core_df = prep_core(core_df)
  File "c:\users\jzito\escience\cat\CAT\base.py", line 220, in prep_core
    idx_tuples = [set_core_anchors(i, anchor_tup, allignment_tup, subset) for i in core_df[MOL]]
  File "c:\users\jzito\escience\cat\CAT\base.py", line 220, in <listcomp>
    idx_tuples = [set_core_anchors(i, anchor_tup, allignment_tup, subset) for i in core_df[MOL]]
  File "c:\users\jzito\escience\cat\CAT\attachment\core_anchoring.py", line 51, in set_core_anchors
    anchor_idx = anchor_idx_group[:, anchor_tup.group_idx[0]].copy()
IndexError: too many indices for array

Here are the core and input files.

path: .

input_cores:
        - geo_opt.xyz

input_ligands:
        - CCC(=O)O

optional:
    database:
            mol_format: ['xyz']

    core:
        dirname: 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

    ligand:
        dirname: ligand
        split: True

    qd:
        dirname: qd
        construct_qd: True
        optimize: False

Can you help me with this?

@BvB93 BvB93 added the question Further information is requested label Apr 25, 2023
@juliette1996
Copy link
Author

@RobertaPascazio do you have a .pdb file of this structure?

@BvB93
Copy link
Member

BvB93 commented Apr 25, 2023

The problem here was the lack of bonds in the passed core, which caused CAT to fail in identifying the anchoring sites within the passed molecules. The error message here is problematic though and should be way more explicit (fixed as of b8349e6).

@RobertaPascazio
Copy link

RobertaPascazio commented Apr 25, 2023

There you have it!

geo_opt.zip

@juliette1996
Copy link
Author

Same error as before when using the pdb file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants