-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create Bioinformatics_Drug_Discovery.py
- Loading branch information
Showing
1 changed file
with
110 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
import numpy as np | ||
import pandas as pd | ||
import rdkit | ||
from rdkit import Chem | ||
from rdkit.Chem import AllChem | ||
from rdkit.Chem import rdFMCS | ||
from rdkit.Chem import rdmolops | ||
from rdkit.Chem import rdRDMolDescriptors | ||
from rdkit.Chem import rdMolTransforms | ||
from rdkit.Chem.Pharm2D import Pharm2D | ||
from rdkit.Chem.Pharm2D import rdPharm2DUtils | ||
from rdkit.Chem.Pharm2D import rdPharm2DSK | ||
from rdkit.Chem.Pharm2D import rdPharm2DInterpreter | ||
from rdkit.Chem.Pharm2D import rdPharm2DDraw | ||
from rdkit.Chem.Pharm2D import rdPharm2DFilter | ||
from rdkit.Chem.Pharm2D import rdPharm2DUtils | ||
from rdkit.Chem.Pharm2D import rdPharm2DInterpreter | ||
from rdkit.Chem.Pharm2D import rdPharm2DDraw | ||
from rdkit.Chem.Pharm2D import rdPharm2DFilter | ||
from rdkit.Chem.Pharm2D import rdPharm2DUtils | ||
from rdkit.Chem.Pharm2D import rdPharm2DInterpreter | ||
from rdkit.Chem.Pharm2D import rdPharm2DDraw | ||
from rdkit.Chem.Pharm2D import rdPharm2DFilter | ||
from rdkit.Chem.Scaffolds import MurckoScaffold | ||
from rdkit.Chem.Scaffolds import rdMolDescriptors | ||
from rdkit.Chem.rdMolDescriptors import GetAdjacencyMatrix | ||
from rdkit.Chem.rdMolDescriptors import CalcMolFormula | ||
from rdkit.Chem.rdMolDescriptors import GetMorganFingerprint | ||
from rdkit.Chem.rdMolDescriptors import GetMACCSFingerprint | ||
from rdkit.Chem.rdMolDescriptors import GetMolWt | ||
from rdkit.Chem.rdMolDescriptors import GetTopologicalPolarity | ||
from rdkit.Chem.rdMolDescriptors import GetHeavyAtomMolWt | ||
from rdkit.Chem.rdMolDescriptors import GetChiralTag | ||
from rdkit.Chem.rdMolDescriptors import GetExactMolWt | ||
from rdkit.Chem.rdMolDescriptors import GetNumRotatableBonds | ||
from rdkit.Chem.rdMolDescriptors import GetNumAromaticRings | ||
from rdkit.Chem.rdMolDescriptors import GetNumHBA | ||
from rdkit.Chem.rdMolDescriptors import GetNumHBD | ||
from rdkit.Chem.rdMolDescriptors import GetNumExplicitHs | ||
from rdkit.Chem.rdMolDescriptors import GetNumImplicitHs | ||
from rdkit.Chem.rdMolDescriptors import GetNumLipinskiHBA | ||
from rdkit.Chem.rdMolDescriptors import GetNumLipinskiHBD | ||
from rdkit.Chem.rdMolDescriptors import GetNumRadicalElectrons | ||
from rdkit.Chem.rdMolDescriptors import GetNumStereoCenters | ||
from rdkit.Chem.rdMolDescriptors import GetNumValenceElectrons | ||
from rdkit.Chem.rdMolDescriptors import GetRingCount | ||
from rdkit.Chem.rdMolDescriptors import GetSSSR | ||
from rdkit.Chem.rdMolDescriptors import GetSymmSSSR | ||
from rdkit.Chem.rdMolDescriptors import GetSSSRDepict | ||
from rdkit.Chem.rdMolDescriptors import GetMolBlocks | ||
from rdkit.Chem.rdMolDescriptors import Get3DDistanceMatrix | ||
from rdkit.Chem.rdMolDescriptors import GetMolFrags | ||
from rdkit.Chem.rdMolDescriptors import Get3DDM | ||
from rdkit.Chem.rdMolDescriptors import GetRingInfo | ||
from rdkit.Chem.rdMolDescriptors import GetSymmSSSRIdx | ||
from rdkit.Chem.rdMolDescriptors import GetFragmentableAtoms | ||
from rdkit.Chem.rdMolDescriptors import GetAllPathsOfLengthN | ||
from rdkit.Chem.rdMolDescriptors import GetAtomsWithUnsaturatedBonds | ||
from rdkit.Chem.rdMolDescriptors import GetShortestPaths | ||
from rdkit.Chem.rdMolDescriptors import GetAdjacencyMatrixWithDoubleBondsAsOne | ||
from rdkit.Chem.rdMolDescriptors import GetAtomsAndBonds | ||
from rdkit.Chem.rdMolDescriptors import GetFragmentNumbers | ||
from rdkit.Chem.rdMolDescriptors import GetHarmonicAtomBondsDistances | ||
from rdkit.Chem.rdMolDescriptors import GetPathToSubmol | ||
from rdkit.Chem.rdMolDescriptors import GetTopologicalAtomNumbers | ||
from rdkit.Chem.rdMolDescriptors import GetTopologicalAtomGroups | ||
from rdkit.Chem.rdMolDescriptors import GetTopologicalDistanceMatrix | ||
from rdkit.Chem.rdMolDescriptors import GetAtomsWithRings | ||
from rdkit.Chem.rdMolDescriptors import GetAllRingsOfSizeN | ||
from rdkit.Chem.rdMolDescriptors import GetTopologicalPharmacophoreAtomPairs | ||
from rdkit.Chem.rdMolDescriptors import GetAllAtomEnvironmentSubgraphs | ||
from rdkit.Chem.rdMolDescriptors import GetMolChemicalSymbols | ||
from rdkit.Chem.rdMolDescriptors import GetAromaticAtomsAndBonds | ||
from rdkit.Chem.rdMolDescriptors import GetTopologicalCharge | ||
from rdkit.Chem.rdMolDescriptors import GetAllAtomAndBondPairs | ||
from rdkit.Chem.rdMolDescriptors import GetAtomsAndBondsInSmallestSetOfSmallestRings | ||
from rdkit.Chem.rdMolDescriptors import GetNumBridgeheadAtoms | ||
from rdkit.Chem.rdMolDescriptors import GetTopologicalPharmacophore | ||
from rdkit.Chem.rdMolDescriptors import GetAtomBondsAndAngles | ||
from rdkit.Chem.rdMolDescriptors import GetPathToSubmolHistograms | ||
from rdkit.Chem.rdMolDescriptors import GetDistanceMatrixForPath | ||
from rdkit.Chem.rdMolDescriptors import GetSubgraphForPath | ||
from rdkit.Chem.rdMolDescriptors import GetHarmonicRingBondsDistances | ||
from rdkit.Chem.rdMolDescriptors import GetMorganFingerprintForPath | ||
from rdkit.Chem.rdMolDescriptors import GetDistanceMatrixForSubmolHistograms | ||
from rdkit.Chem.rdMolDescriptors import GetAllAtomAndBondPaths | ||
from rdkit.Chem.rdMolDescriptors import GetPathsToSubmols | ||
from rdkit.Chem.rdMolDescriptors import GetTopologicalAtomPaths | ||
from rdkit.Chem.rdMolDescriptors import GetAllPathsToSubmolHistograms | ||
from rdkit.Chem.rdMolDescriptors import GetMolSaltFormula | ||
from rdkit.Chem.rdMolDescriptors import GetNumRotatableRings | ||
from rdkit.Chem.rdMolDescriptors import GetMorganFingerprint | ||
from rdkit.Chem.rdMolDescriptors import GetAtomEnvironment | ||
from rdkit.Chem.rdMolDescriptors import GetAdjacencyMatrixForSubmolHistograms | ||
from rdkit.Chem.rdMolDescriptors import GetNumLipinskiRo5Violations | ||
from rdkit.Chem.rdMolDescriptors import GetAdjacencyMatrixSmartsPattern | ||
from rdkit.Chem.rdMolDescriptors import GetAdjacencyMatrixMorganFingerprint | ||
from rdkit.Chem.rdMolDescriptors import GetAtomPairFingerprint | ||
from rdkit.Chem.rdMolDescriptors import GetAtomPairTorsionFingerprint | ||
def virtual_screening(ligand_library, target_ protein): | ||
""" | ||
Perform virtual screening of a ligand library against a target protein. | ||
""" | ||
# Prepare ligand library and target protein | ||
ligand_smiles = [Chem.MolToSmiles(ligand) for ligand in ligand_library] | ||
target_mol = Chem.MolFromPDBFile(target_protein) | ||
target_fp = AllChem.GetMorganFingerprint(target_mol, 2) | ||
|
||
# Calculate fingerprints and similarity scores for each ligand | ||
fingerprints = [AllChem |