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

Unaccounted bond order 3 #10

Closed
JavierSanchez-Utges opened this issue Apr 6, 2024 · 2 comments
Closed

Unaccounted bond order 3 #10

JavierSanchez-Utges opened this issue Apr 6, 2024 · 2 comments

Comments

@JavierSanchez-Utges
Copy link

Hi, it seems triple bonds are not accounted for, as I am getting this error. Is it possible?

"""
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/joblib/externals/loky/process_executor.py", line 463, in _process_worker
    r = call_item()
  File "/usr/local/lib/python3.7/site-packages/joblib/externals/loky/process_executor.py", line 291, in __call__
    return self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/joblib/parallel.py", line 590, in __call__
    for func, args, kwargs in self.items]
  File "/usr/local/lib/python3.7/site-packages/joblib/parallel.py", line 590, in <listcomp>
    for func, args, kwargs in self.items]
  File "/content/GrASP/parse_files.py", line 690, in process_production_set
    raise e
  File "/content/GrASP/parse_files.py", line 688, in process_production_set
    process_system(mol2_dir + structure_name, save_directory=f'{prepend}/{data_dir}', parse_ligands=False)
  File "/content/GrASP/featurize_protein.py", line 225, in process_system
    edge_attributes = {tuple(bond.atoms.ids):{"bond_type":bond_type_dict[bond.order]} for bond in protein.bonds}
  File "/content/GrASP/featurize_protein.py", line 225, in <dictcomp>
    edge_attributes = {tuple(bond.atoms.ids):{"bond_type":bond_type_dict[bond.order]} for bond in protein.bonds}
KeyError: '3'
"""

I think it goes back to this bit here:

# Leaving an extra bit to denote self loops
    bond_type_dict = {
        '1': [1,0,0,0,0,0],
        '2': [0,1,0,0,0,0],
        'ar':[0,0,1,0,0,0],
        'am':[0,0,0,1,0,0],
        'un':[0,0,0,0,1,0]  # Unkown Bond Type
    }
@zwsmith200
Copy link
Member

See #8 for this. There are no triple bonds in standard amino acids so we would prefer the model crashes instead of silently making predictions on a feature it has never seen.

@JavierSanchez-Utges
Copy link
Author

Fair enough, I will check which kind of atoms and amino acids this is found in, might also be altLocs.

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

No branches or pull requests

2 participants