Python wrapper for jCompoundMapper molecular fingerprints
Project description
Python wrapper for jCompoundMapper molecular fingerprints
Python wrapper to ease the calculation of jCompoundMApper molecular fingerprints.
Installation
From source:
git clone https://github.com/OlivierBeq/jcompoundmapper_pywrapper.git
pip install ./jcompoundmapper_pywrapper
with pip:
pip install jcompoundmapper-pywrapper
Get started
from jcompoundmapper_pywrapper import JCompoundMapper
from rdkit import Chem
smiles_list = [
# erlotinib
"n1cnc(c2cc(c(cc12)OCCOC)OCCOC)Nc1cc(ccc1)C#C",
# midecamycin
"CCC(=O)O[C@@H]1CC(=O)O[C@@H](C/C=C/C=C/[C@@H]([C@@H](C[C@@H]([C@@H]([C@H]1OC)O[C@H]2[C@@H]([C@H]([C@@H]([C@H](O2)C)O[C@H]3C[C@@]([C@H]([C@@H](O3)C)OC(=O)CC)(C)O)N(C)C)O)CC=O)C)O)C",
# selenofolate
"C1=CC(=CC=C1C(=O)NC(CCC(=O)OCC[Se]C#N)C(=O)O)NCC2=CN=C3C(=N2)C(=O)NC(=N3)N",
# cisplatin
"N.N.Cl[Pt]Cl"
]
mols = [Chem.MolFromSmiles(smiles) for smiles in smiles_list]
jcm = JCompoundMapper()
print(jcm.calculate(mols))
One can use any of the following fingerprints: DFS, ASP, AP2D, AT2D, AP3D, AT3D, CATS2D, CATS3D, PHAP2POINT2D, PHAP3POINT2D, PHAP2POINT3D, PHAP3POINT3D, ECFP, ECFPVariant, LSTAR, SHED, RAD2D, RAD3D or MACCS.
By default, 1024 bits fingerprints are generated, except for the 166 bits MACCS.
jcm = JCompoundMapper('ECFP')
print(jcm.calculate(mols, 2048))
:warning: Molecules with 3D conformers must be provided to calculate 3D fingerprints (i.e. CATS3D, PHAP2POINT3D, PHAP3POINT3D and RAD3D).
One can specify advanced parameters to the fingerprinter:
from jCompoundMapper_pywrapper import DEFAULT_FP_PARAMETERS
custom_ecfp_params = DEFAULT_FP_PARAMETERS['ECFP']
custom_ecfp_params.depth = 6
jcm = JCompoundMapper('ECFP', custom_ecfp_params)
print(jcm.calculate(mols))
Documentation
def calculate(mols, nbits=1024, show_banner=True, njobs=1, chunksize=1000):
Default method to calculate jCompoundMapper fingerprints.
Parameters:
- mols : Iterable[Chem.Mol]
RDKit molecule objects for which to obtain jCompoundMapper fingerprints. - nbits : Union[int, List[int]]
Size of the fingerprints. - show_banner : bool
Displays default notice about jCompoundMapper. - njobs : int
Maximum number of simultaneous processes. - chunksize : int
Maximum number of molecules each process is charged of.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for jcompoundmapper_pywrapper-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7e7bd1427cc3dedeab650193353b5ba8f45716af22989cc85f56c4eb3e62755 |
|
MD5 | 1b95ca09a73195e2648bb2f49e0b8a22 |
|
BLAKE2b-256 | 012cacd6206b1f09a0f73430c6ac25753fd4d174a6c7ab14e94a3de0d6025755 |
Hashes for jcompoundmapper_pywrapper-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 357065eac1353883be01b201506b22291c2ad6f2d13fda0702b9868f60c72cd5 |
|
MD5 | f85e4171ad25f12d2f3cd22b801cc639 |
|
BLAKE2b-256 | f1b5b516b4bc10da9b8bd0d2d62d34688567ca3cf23145423f093f130dd04cd1 |