Ramprasad-Group / polygnn

polyGNN is a Python library to automate ML model training for polymer informatics.
Other
30 stars 5 forks source link

smiles_featurizer;'ValueError: Invalid repeat unit. Periodic bond types are mismatching.' #19

Closed kietbphan closed 9 months ago

kietbphan commented 11 months ago

Hi, Im trying to make predictions on 12k+ polymers and ran into a problem with double and triple bonds on the terminator. The smiles_featurizer fails to featurize these bonds and the program ends. The exact error is; "Invalid repeat unit. Periodic bond types are mismatching.". Ive also included a picture of the whole output.

Here are some smiles that make the program fail; '[]CCCC(=[])Cl' '[]CC(COS(=O)(=O)c1ccc(C)cc1)=C(C#[])COS(=O)(=O)c1ccc(C)cc1' '[]CC(OS(=O)(=O)c1ccc(C)cc1)=C(C#[])OS(=O)(=O)c1ccc(C)cc1'

Screenshot 2023-08-22 at 7 04 46 PM
rishigurnani commented 11 months ago

@kietbphan This is occurring because the bonds to each star must match. For example, the first star in the first SMILES has a single bond, but the second star has a double bond. This is nonsensical, and so the program returns an error.

rishigurnani commented 9 months ago

Closing this issue since there has been no response. @kietbphan Feel free to reopen if necessary.