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

Why pad a_graph and b_graph to length 11? #3

Closed
yippp opened this issue Apr 5, 2022 · 1 comment
Closed

Why pad a_graph and b_graph to length 11? #3

yippp opened this issue Apr 5, 2022 · 1 comment

Comments

@yippp
Copy link

yippp commented Apr 5, 2022

I am interested in your work. While I read the code, I found that during preprocessing, in the class get_graph_features_from_smi in data_utils.py.
The codes

    # padding
    for a_graph in a_graphs:
        while len(a_graph) < 11:            # OH MY GOODNESS... Fe can be bonded to 10...
            a_graph.append(1e9)

    for b_graph in b_graphs:
        while len(b_graph) < 11:            # OH MY GOODNESS... Fe can be bonded to 10...
            b_graph.append(1e9)

I cannot understand why the atom and bond graphs needed to be padded to length 11. Could you tell me something about it?
Thanks a lot.

@zhengkaitu
Copy link
Collaborator

@yippp As in the comment, during our own testing with cornor cases, we found some metal complexes can literally have up to 10 bonds (e.g. for Fe centers bonded to 10 ligands). Therefore we decided to pad to 11 just to be more robust.

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