-
-
Notifications
You must be signed in to change notification settings - Fork 21
Quick Start
Here you will learn how to install the initial package, build the initial network, print it out, and perform some analysis.
GlobalChem is the graph network that has no dependencies and it's functionality built within the main object.
GlobalChemExtensions has a dependency network that is too cumbersome to deal with but has additional functionality for cheminformaticians (or anyone really) to perform analysis on chemical data including the GlobalChem Graph network.
The best way to interact with our API is to use one our official library distributed on PyPi
code
# Install via pip
pip install global-chem
# Install the Extension Package
pip install global-chem[extensions]
Additional Dependency Features
Not everyone wants to install everything into their local environment which can be a very hefty especially something as large as GlobalChemTo combat this we partitioned some of the applications dependencies into different package dependencies that can be installed with the extra function from setuptools
. Please refer to the master extension list about which app depends on where.
- cheminformatics
- bioinformatics
- quantum_chemistry
- development_operations
- forcefields
- graphing
- all - All the extensions
code
pip install 'global-chem[graphing]'
pip install 'global-chem[forcefields]'
pip install 'global-chem[bioinformatics]'
pip install 'global-chem[cheminformatics]'
pip install 'global-chem[quantum_chemistry]'
pip install 'global-chem[development_operations]'
pip install 'global-chem[all]'
Good to know: global-chem-extensions dependencies are not linked to any specific versions in hopes for flexibility of other development environments.
To build the GlobalChem Graph network we first import the package, initialize the class, and call the function :
code
gc = GlobalChem()
gc.build_global_chem_network(print_output=True)
output
'global_chem': {
'children': [
'environment',
'miscellaneous',
'organic_synthesis',
'medicinal_chemistry',
'narcotics',
'interstellar_space',
'proteins',
'materials'
],
'name': 'global_chem',
'node_value': <global_chem.global_chem.Node object at 0x10f60eed0>,
'parents': []
}, etc.
gc.print_globalchem_network()
code
gc.print_globalchem_network()
output
┌solvents─common_organic_solvents
┌organic_synthesis─└protecting_groups─amino_acid_protecting_groups
│ ┌polymers─common_monomer_repeating_units
├materials─└clay─montmorillonite_adsorption
│ ┌privileged_kinase_inhibtors
│ ├privileged_scaffolds
├proteins─kinases─┌scaffolds─├iupac_blue_book_substituents
│ │ └common_r_group_replacements
│ └braf─inhibitors
│ ┌vitamins
│ ├open_smiles
├miscellaneous─├amino_acids
│ └regex_patterns
global_chem──├environment─emerging_perfluoroalkyls
│ ┌schedule_one
│ ├schedule_four
│ ├schedule_five
├narcotics─├pihkal
│ ├schedule_two
│ └schedule_three
├interstellar_space
│ ┌cannabinoids
│ │ ┌electrophillic_warheads_for_kinases
│ ├warheads─└common_warheads_covalent_inhibitors
└medicinal_chemistry─│ ┌phase_2_hetereocyclic_rings
└rings─├iupac_blue_book_rings
└rings_in_drugs
Let's have some fun. Let's access a node and perform some PCA Analysis. We want to test whether an object functional groups share some similarity some arbitrary features and try to determine what those features specifically are. This will help understand features of relevance for small molecules.
We are going to look at the list of the molecules in pihkal because it's a pretty comprehensive list of what's on the drug market currently published on the wikipedia page. This will help us identify
PCA Analysis
code
from global_chem import GlobalChem
from global_chem_extensions import GlobalChemExtensions
gc = GlobalChem()
gc.build_global_chem_network(print_output=False, debugger=False)
smiles_list = list(gc.get_node_smiles('pihkal').values())
GlobalChemExtensions().node_pca_analysis(smiles_list, save_file=False)
plot

Radial Analysis
Let's have a look at how a list of emerging perfluoroalkyls to the rest of the nodes in the network using a radial analysis. For more details on the Radial Analysis algorithm please head over to the page.
code
from global_chem_extensions import GlobalChemExtensions
gc = GlobalChem()
gc.build_global_chem_network(print_output=False, debugger=False)
smiles_list = list(gc.get_node_smiles('pihkal').values())
GlobalChemExtensions().sunburst_chemical_list(smiles_list, save_file=False)
plot
If we have a quick look at the list of Pihkal, we can see that they are very similar to the covalent warheads. More nodes, and more in-ferment can be made about the data and up to the user verify :).
Enjoy
Read more of the documentation or just start playing around with the data. This data takes some time to digest so patience is necessary when building you're own networks as well. Happy cheminformatics.
If you are curious about our software or have any questions, feel free to contact us!