### Install PharmacoNet and Torch-Geometric Dependencies Source: https://github.com/seonghwanseo/pharmaconet/blob/main/src/pmnet_appl/README.md Provides `pip` commands to install the PharmacoNet library, including options for installing with `torch-geometric` dependencies or just PharmacoNet if dependencies are already met. It also shows how to install directly from the Git repository. ```bash pip install -e '.[appl]' --find-links https://data.pyg.org/whl/torch-2.3.1+cu121.html pip install -e . pip install pharmaconet @ git+https://github.com/SeonghwanSeo/PharmacoNet.git ``` -------------------------------- ### Install PharmacoNet using Conda Environment File Source: https://github.com/seonghwanseo/pharmaconet/blob/main/README.md Steps to set up the PharmacoNet environment using `conda` and the provided `environment.yml` file. This method installs a CPU-only version of PyTorch by default and then installs the PharmacoNet package. ```bash conda create -f environment.yml conda activate pmnet pip install . ``` -------------------------------- ### Set up PharmacoNet Development Environment (Bash) Source: https://github.com/seonghwanseo/pharmaconet/blob/main/developer/README.md This script constructs a Conda environment named 'pmnet-dev' with Python 3.10 and OpenBabel 3.1.1. It then activates the environment and installs PharmacoNet along with its development dependencies, including `torch-geometric` and `wandb`, noting that `pymol-open-source` is not required. ```bash # construct conda environment; pymol-open-source is not required. conda create -n pmnet-dev python=3.10 openbabel=3.1.1 conda activate pmnet-dev # install PharmacoNet & torch_geometric & wandb pip install -e '.[dev]' --find-links https://data.pyg.org/whl/torch-2.3.1+cu121.html ``` -------------------------------- ### Virtual Screening Command Examples Source: https://github.com/seonghwanseo/pharmaconet/blob/main/README.md These examples demonstrate practical usage of the `screening.py` script for virtual screening. They show how to specify the pharmacophore model, compound library, output file, and number of CPUs. The second example further illustrates how to customize specific pharmacophore feature parameters like HBD, HBA, and aromatic scores. ```Bash python screening.py -p ./result/6oim/6oim_D_MOV_model.pm --library examples/library --out result.csv --cpus 1 python screening.py -p ./result/6oim/6oim_D_MOV_model.pm --library examples/library --out result.csv --cpus 2 --hbd 5 --hba 5 --aromatic 8 ``` -------------------------------- ### Manual Installation of PharmacoNet Dependencies Source: https://github.com/seonghwanseo/pharmaconet/blob/main/README.md Detailed steps for manually installing PharmacoNet dependencies. This involves creating a Conda environment with Python and PyMOL, then installing PyTorch, RDKit, Biopython, OmegaConf, Tdqm, Numba (optional), and Molvoxel via pip. ```bash conda create --name pmnet python=3.12 pymol-open-source conda activate pmnet pip install torch # 1.13<=torch, CUDA acceleration is available. 1min for 1 cpu, 10s for 1 gpu pip install rdkit biopython omegaconf tdqm numba # Numba is optional, but recommended. pip install molvoxel # Molecular voxelization tools with minimal dependencies (https://github.com/SeonghwanSeo/molvoxel.git) ``` -------------------------------- ### Install PharmacoNet as a Proxy Model for Deep Learning Developers Source: https://github.com/seonghwanseo/pharmaconet/blob/main/README.md Command to install PharmacoNet directly from its GitHub repository as a Python package. This method is suitable for integrating PharmacoNet's functionalities into other deep learning projects as a proxy model. ```bash pip install pharmaconet @ git+https://github.com/SeonghwanSeo/PharmacoNet.git ``` -------------------------------- ### Extract Pharmacophore Features using Python API Source: https://github.com/seonghwanseo/pharmaconet/blob/main/README.md This Python API example is designed for deep learning researchers to extract pharmacophore features using PharmacoNet as a pre-trained model. It shows how to initialize the PharmacoNet module and perform end-to-end feature extraction from a protein, either with a reference ligand or by providing a manual center. The API also supports step-wise calculation for more granular control. ```Python from pmnet.api import PharmacoNet, get_pmnet_dev, ProteinParser from pmnet.typing import PMNetAttr module: PharmacoNet = get_pmnet_dev('cuda') # default: score_threshold=0.5 (less threshold: more features) # End-to-End calculation pmnet_attr: PMNetAttr pmnet_attr = module.feature_extraction(, ref_ligand_path=) pmnet_attr = module.feature_extraction(, center=(, , )) # Step-wise calculation ``` -------------------------------- ### Load Pre-trained TacoGFN Docking Proxy Model Source: https://github.com/seonghwanseo/pharmaconet/blob/main/src/pmnet_appl/README.md Demonstrates how to initialize and load a `TacoGFN_Proxy` model using `get_docking_proxy` or `TacoGFN_Proxy.load`. It covers specifying the device, cache database, and training dataset, then shows how to use `scoring` and `scoring_list` methods for predictions. ```python from pmnet_appl import get_docking_proxy from pmnet_appl.tacogfn_reward import TacoGFN_Proxy device: str | torch.device = "cuda" | "cpu" # Cache for CrossDocked2020 Targets: 15,201 training pockets + 100 test pockets cache_db = "train" | "test" | "all" | None # TacoGFN Reward Function train_dataset = "ZINCDock15M" | "CrossDocked2020" proxy: TacoGFN_Proxy = get_docking_proxy("TacoGFN_Reward", "QVina", train_dataset, cache_db, device) proxy = TacoGFN_Proxy.load("QVina", train_dataset, cache_db, device) # if cache_db is 'test' | 'all' print(proxy.scoring("14gs_A", "c1ccccc1")) print(proxy.scoring_list("14gs_A", ["c1ccccc1", "C1CCCCC1"])) ``` -------------------------------- ### Create and Load Custom Target Cache for Docking Proxy Source: https://github.com/seonghwanseo/pharmaconet/blob/main/src/pmnet_appl/README.md Shows how to generate a custom target cache from protein information (PDB paths or coordinates) and save it to a specified path. It then demonstrates loading this custom cache into the `TacoGFN_Proxy` model for subsequent scoring operations. ```python proxy = get_docking_proxy("TacoGFN_Reward", "QVina", "ZINCDock15M", None, device) save_cache_path = "" protein_info_dict = { "": ("", ""), # use center of reference ligand "": ("", (1.0, 2.0, 3.0)) # use center coordinates } proxy.get_cache_database(protein_info_dict, save_cache_path, verbose=False) # Load Custom Target Cache proxy = get_docking_proxy("TacoGFN_Reward", "QVina", "ZINCDock15M", save_cache_path, device) proxy.scoring("key1", "c1ccccc1") proxy.scoring_list("key2", ["c1ccccc1", "C1CCCCC1"]) ``` -------------------------------- ### Run PharmacoNet for Virtual Screening Source: https://github.com/seonghwanseo/pharmaconet/blob/main/README.md Command to perform virtual screening using a pre-trained pharmacophore model. Users can specify the model path, the directory containing the compound library, the output path for results, and the number of CPU cores to utilize. ```bash python screening.py -p --library --out --cpus ``` -------------------------------- ### Run PharmacoNet for Protein-based Pharmacophore Modeling Source: https://github.com/seonghwanseo/pharmaconet/blob/main/README.md Commands to initiate pharmacophore modeling using PharmacoNet. This includes options for importing from RCSB PDB, using custom protein paths, enabling CUDA acceleration, and incorporating a reference ligand for modeling. ```bash python modeling.py --pdb python modeling.py --protein --prefix --cuda python modeling.py --protein --prefix --ref_ligand ``` -------------------------------- ### Generate Pharmacophore Model from PDB ID Source: https://github.com/seonghwanseo/pharmaconet/blob/main/README.md This command initiates pharmacophore modeling using a specified PDB ID. The script automatically detects ligands within the PDB structure and prompts the user to select a ligand for binding site detection, saving the resulting pharmacophore model and a PyMOL visualization session. ```Bash python modeling.py --pdb 6oim INFO:root:Load PharmacoNet finish INFO:root:Download 6oim to result/6oim/6oim.pdb ============================== INFO:root:A total of 3 ligand(s) are detected! Ligand 1 - ID : MG (Chain: B [auth A]) - Center : -2.512, 2.588, 0.220 - Name : MAGNESIUM ION Ligand 2 - ID : GDP (Chain: C [auth A]) - Center : -6.125, 3.588, 7.310 - Name : GUANOSINE-5-DIPHOSPHATE Ligand 3 - ID : MOV (Chain: D [auth A]) - Center : 1.872, -8.260, -1.361 - Name : AMG 510 (BOUND FORM) - Synonyms: 6-FLUORO-7-(2-FLUORO-6-HYDROXYPHENYL)-4-[(2S)-2-METHYL-4-PROPANOYLPIPERAZIN-1-YL]-1-[4-METHYL-2-(PROPAN-2-YL)PYRIDIN-3-YL]PYRIDO[2,3-D]PYRIMIDIN-2(1H)-ONE INFO:root:Select the ligand number(s) (ex. 3 ; 1,3 ; manual ; all ; exit) ligand number:3 # USER INPUT: Enter the ligand number for binding site detection INFO:root:Running 3th Ligand... Ligand 3 - ID : MOV (Chain: D [auth A]) - Center : 1.872, -8.260, -1.361 - Name : AMG 510 (BOUND FORM) - Synonyms: 6-FLUORO-7-(2-FLUORO-6-HYDROXYPHENYL)-4-[(2S)-2-METHYL-4-PROPANOYLPIPERAZIN-1-YL]-1-[4-METHYL-2-(PROPAN-2-YL)PYRIDIN-3-YL]PYRIDO[2,3-D]PYRIMIDIN-2(1H)-ONE INFO:root:Save Pharmacophore Model to result/6oim/6oim_D_MOV_model.pm INFO:root:Save Pymol Visualization Session to result/6oim/6oim_D_MOV_model.pse ``` -------------------------------- ### Generate Pharmacophore Model with Custom Protein and Reference Ligand Source: https://github.com/seonghwanseo/pharmaconet/blob/main/README.md This command allows pharmacophore modeling using a local protein PDB file and a reference ligand PDB file. The center of the reference ligand is used to define the binding box. A custom prefix can be specified for the output files. ```Bash python modeling.py --protein ./examples/6OIM_protein.pdb --ref_ligand ./examples/6OIM_D_MOV.pdb --prefix 6oim INFO:root:Load PharmacoNet finish INFO:root:Load examples/6OIM_protein.pdb INFO:root:Using center of examples/6oim_D_MOV.pdb as center of box INFO:root:Save Pharmacophore Model to result/6oim/6oim_6oim_D_MOV_model.pm INFO:root:Save Pymol Visualization Session to result/6oim/6oim_6oim_D_MOV_model.pse ``` -------------------------------- ### Perform Virtual Screening with Default Parameters Source: https://github.com/seonghwanseo/pharmaconet/blob/main/README.md This command executes virtual screening using a pre-generated pharmacophore model against a library of compounds. It uses default parameters for pharmacophore feature scoring (e.g., Cation/Anion: 8, Aromatic/Halogen/HBA/HBD: 4, Hydrophobic: 1). The results are saved to an output file, and the process can be parallelized using multiple CPUs. ```Bash python screening.py -p --library --out --cpus ``` -------------------------------- ### Generate Pharmacophore Model with Custom Protein and Manual Center Source: https://github.com/seonghwanseo/pharmaconet/blob/main/README.md When no reference ligand is provided, this command enables pharmacophore modeling by manually specifying the binding site center coordinates (x, y, z). This is useful for custom proteins where automatic ligand detection is not desired or possible. The output model and PyMOL session are saved with a custom prefix. ```Bash python modeling.py --protein ./examples/6OIM_protein.pdb --prefix 6oim INFO:root:Load PharmacoNet finish INFO:root:Load examples/6OIM_protein.pdb WARNING:root:No ligand is detected! INFO:root:Enter the center of binding site manually: x: 2 # USER INPUT: Enter x y: -8 # USER INPUT: Enter y z: -1 # USER INPUT: Enter z INFO:root:Using center (2.0, -8.0, -1.0) INFO:root:Save Pharmacophore Model to result/6OIM/6OIM_2.0_-8.0_-1.0_model.pm INFO:root:Save Pymol Visualization Session to result/6OIM/6OIM_2.0_-8.0_-1.0_model.pse ``` -------------------------------- ### Evaluate Ligands using Python API Source: https://github.com/seonghwanseo/pharmaconet/blob/main/README.md This Python code snippet demonstrates how to programmatically load a PharmacophoreModel and score ligands. It supports scoring from ligand files (SDF, MOL2, PDB) or directly from SMILES strings by generating RDKit ETKDG conformers. This allows for integration into custom Python scripts for ligand evaluation, with multiprocessing support. ```Python from pmnet import PharmacophoreModel model = PharmacophoreModel.load() # NOTE: Scoring with ligand file with 1 or more conformers score = model.scoring_file() # SDF, MOL2, PDB # NOTE: Scoring with RDKit ETKDG Conformers score = model.scoring_smiles(, ) ``` -------------------------------- ### Generate Pharmacophore Model with Custom Weight File Source: https://github.com/seonghwanseo/pharmaconet/blob/main/README.md This command allows specifying a custom path for the PharmacoNet model weight file. This is particularly useful for offline environments where automatic download is not feasible. The model is generated using the provided PDB ID and the local weight file. ```Bash python modeling.py --pdb 6oim --weight_path ``` -------------------------------- ### Cite PharmacoNet Publication Source: https://github.com/seonghwanseo/pharmaconet/blob/main/README.md BibTeX entry for citing the PharmacoNet paper titled 'PharmacoNet: deep learning-guided pharmacophore modeling for ultra-large-scale virtual screening', published in Chemical Science. ```BibTeX @article{seo2024pharmaconet, title={PharmacoNet: deep learning-guided pharmacophore modeling for ultra-large-scale virtual screening}, author={Seo, Seonghwan and Kim, Woo Youn}, journal={Chemical Science}, year={2024}, publisher={Royal Society of Chemistry} } ``` -------------------------------- ### Perform Virtual Screening with Custom Parameters Source: https://github.com/seonghwanseo/pharmaconet/blob/main/README.md This command enables fine-grained control over the virtual screening process by allowing custom parameters for each pharmacophore feature type (anion, cation, aromatic, HBD, HBA, halogen, hydrophobic). This flexibility allows users to adjust scoring sensitivities based on specific research needs. The screening is performed against a compound library, with results saved to a specified output path and support for multiprocessing. ```Bash python screening.py -p --library --out --cpus \ --anion --cation --aromatic \ --hbd --hba --halogen --hydrophobic ``` -------------------------------- ### Initialize ProteinParser and Extract Attributes Source: https://github.com/seonghwanseo/pharmaconet/blob/main/README.md Initializes the ProteinParser with an optional 'center_noise' parameter for data augmentation and then extracts PMNet attributes from the provided protein data using a module's run_extraction method. ```Python parser = ProteinParser(center_noise=) pmnet_attr = module.run_extraction(protein_data) ``` -------------------------------- ### Run PharmacoNet for Deep Learning Feature Extraction Source: https://github.com/seonghwanseo/pharmaconet/blob/main/README.md Commands to extract pharmacophore features from proteins, suitable for deep learning research. Options include using a reference ligand or specifying a custom center for feature extraction, with support for CUDA acceleration. ```bash python feature_extraction.py --protein --ref_ligand --out python feature_extraction.py --protein --center --out --cuda ``` -------------------------------- ### PMNetAttr Data Structure Reference Source: https://github.com/seonghwanseo/pharmaconet/blob/main/README.md Defines the detailed structure and types of the PMNetAttr object, including its multi-scale features, hotspot information, and various interaction types such as hydrophobic, aromatic, cation, anion, halogen, and hydrogen bond interactions. ```APIDOC pmnet_attr: PMNetAttr - multi_scale_features: tuple[Tensor, Tensor, Tensor, Tensor, Tensor]: - [96, 4, 4, 4], [96, 8, 8, 8], [96, 16, 16, 16], [96, 32, 32, 32], [96, 64, 64, 64] - hotspots: hotspot_info: HotspotInfo - type: str (7 types) {'Hydrophobic', 'Aromatic', 'Cation', 'Anion', 'Halogen', 'HBond_donor', 'HBond_acceptor'} - features: Tensor [192,] - position: tuple[float, float, float] - (x, y, z) - score: float in [0, 1] - nci_type: str (10 types) 'Hydrophobic': Hydrophobic interaction 'PiStacking_P': PiStacking (Parallel) 'PiStacking_T': PiStacking (T-shaped) 'PiCation_lring': Interaction btw Protein Cation & Ligand Aromatic Ring 'PiCation_pring': Interaction btw Protein Aromatic Ring & Ligand Cation 'SaltBridge_pneg': SaltBridge btw Protein Anion & Ligand Cation 'SaltBridge_lneg': SaltBridge btw Protein Cation & Ligand Anion 'XBond': Halogen Bond 'HBond_pdon': Hydrogen Bond btw Protein Donor & Ligand Acceptor 'HBond_ldon': Hydrogen Bond btw Protein Acceptor & Ligand Donor - density_type: str (7 types) {'Hydrophobic', 'Aromatic', 'Cation', 'Anion', 'Halogen', 'HBond_donor', 'HBond_acceptor'} ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.