PyMolGridVisualiser is a Python tool designed to generate PDF visualisations of PDB files in a grid layout. Utilizing PyMOL, this tool makes it easier to visualise multiple protein structures at once.
- Searches the provided directory and its all subdirectories to find all .pdb files.
- Selects num_files worth of pdbs at random and generates an image for it via pymol API.
- Puts the images to a PDF document.
To quickly get started with PyMolGridVisualiser:
-
Clone this repository:
git clone https://github.com/profdocpizza/PyMolGridVisualiser.git
-
Navigate to the PyMolGridVisualiser directory:
cd PyMolGridVisualiser
-
Install the required packages using Anaconda:
(If this step is taking too long, checkAlternative Installation
in Installation Guide)conda env create -f environment.yml
-
Activate the environment:
conda activate pymolgrid
-
Get PyMol license file from https://pymol.org/edu/ and copy it to PyMolGridVisualiser directory. File ends with
.lic
. -
Unzip example pdb files:
unzip examples/pdbs/all_pdbs.zip -d examples/pdbs/
-
Run the tool on sample PDB files:
python src/protein_visualiser.py --input_folder examples/ --output_filename example_pdbs
-
The PDF output file will be saved in
/outputs
directory by default. -
Run the tool on your PDB files with custom settings:
python src/protein_visualiser.py --input_folder "PATH/TO/YOUR/PDBS/DIRECTORY/" --filename_pattern "STRING_TO_LOOK_FOR" --num_files 1000 --grid 8 5 --output_pdf_name "YOUR_DESIRED_PDF_NAME" --output_directory "PATH/TO/OUTPUT/DIRECTORY"
For detailed usage instructions, visit the Usage Guide.