Skip to content

PiniginaAnna/RulesTools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

RulesTools

Tools for extracting different types of reaction rules and filtering wrong reactions

Installing

pip install git+https://gitlab.cimm.site/pinigina/rulestools

Usage

Extract individual reaction rule

from RulesTools.transformations import CreateRule

rules_creator = CreateRule(rules_from_multistage_reaction=False, environment_atoms_number=1, 
                           rule_with_functional_groups=True, functional_groups_list=groups_list, include_rings=True,
                           keep_reagents=False, keep_meta=False, as_query=True, keep_atom_info='reaction_center')
rules = rules_creator(reaction)

Extract reaction rules from the reaction database

from RulesTools.database_processing import reaction_database_processing
from RulesTools.transformations import *
from RulesTools.filters import *

transformations = [DeleteSmallMolecules(number_of_atoms=4), ReverseReaction(),
                   CreateRule(rules_from_multistage_reaction=False, environment_atoms_number=1, 
                              rule_with_functional_groups=True, functional_groups_list=groups_list, include_rings=True,
                              keep_reagents=False, keep_meta=False, as_query=True, keep_atom_info='reaction_center')]

reaction_database_processing('path_to_reaction_database.rdf', transformations=transformations, save_only_unique=True)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages