mojaie / MolecularGraph.jl

Graph-based molecule modeling toolkit for cheminformatics
MIT License
192 stars 28 forks source link

Funcional groups #12

Closed Kelvyn88 closed 4 years ago

Kelvyn88 commented 4 years ago

Hi Seiji Matsouka

I am working with your repo “MolecularGraph”. I want to modify the funcgroup.yaml to identify CH2 and CH3. Could you give me a Deep explanation about how the groups are identified?

Thanks. Kelvyn Sánchez

mojaie commented 4 years ago

How it works

What the functional group analysis really do is simply iterative SMARTS substructure search. All SMARTS queries listed in the funcgroup.yaml (and all other yaml files in funcgroup folder) as query fields are applied to find functional groups from the molecule. The only one interesting is the SMARTS query list in the files have graph structure.

Substructure terminology graph

The graph structure is similar to Gene Ontology or ChEMBL CHEMINF. Each SMARTS records may have isa or has fields. Some records have any field but this is deprecated.

The substructure terminology graph indicates which substructures does the molecule have, whereas GO/CHEMINF indicates which biological function does the gene/molecule have.

This graph structure may be not only useful to classify molecules by its substructures systematically but also reduce computational cost --- e. g. if we already know the molecule does not have carbonyl group, more costly carboxyl group search will never be applied.

How to use it

See the notebook tutorial "getting started". I will add new page for funcgroup analysis. If you want to add definition of functional groups, try to make your own YAML file first.

And customize "FUNC_GROUP_TABLE" in funcgroup.jl file. (Now I found that "FUNC_GROUP_TABLE" and related settings are not exposed to API. I will work on this issue.)

Thank you!

mojaie commented 4 years ago

To identify CH2 and CH3, SMARTS query [CH2] and [CH3] would work. Or if you want to know number of hydrogens on each atoms, try hcount in src/properties.jl.

Kelvyn88 commented 4 years ago

Thanks!