choppa.render.PublicationView

class choppa.render.PublicationView(filled_aligned_fitness_dict, complex, complex_rdkit, fitness_threshold, override_backbone, output_session_file='out.pse')[source]

Uses the PyMOL API to create a session file for publication-ready views of the fitness data on top of the complex PDB. Users will need to ray the PyMOL view with the desired ray settings in the GUI application themselves, but a combination of pre-set ray settings is provided in the .pse file.

__init__(filled_aligned_fitness_dict, complex, complex_rdkit, fitness_threshold, override_backbone, output_session_file='out.pse')[source]

Methods

__init__(filled_aligned_fitness_dict, ...[, ...])

count_fit_residues(fitness_data)

For a dict with mutants in a fitness dict, counts the number of fit mutants

pymol_add_interactions(p, mutability_color_dict)

Adds interactions to pymol session if a ligand is present.

pymol_color_by_fitness(p)

With a pymol session set up with a system using self.pymol_setup_system(), integrates fitness data by coloring residues by mutability degree.

pymol_color_coder()

Given the aligned fitness dict, returns two dicts: - residue_mutability_levels : {residue index : number of fit mutations, ..} - mutability_color_dict : {number of fit mutations : color, ..}

pymol_prettify_system(p, ligands_in_system)

With a pymol session set up with a system using self.pymol_setup_system(), makes the session pretty.

pymol_select_components(p)

Makes selections in PyMOL for ligand, protein, binding site.

pymol_setup_system(p[, remove_solvents])

Sets up the protein (and ligands if present) without changing any of the looks.

pymol_start_session()

Boots up a session with the publicly available PyMOL API.

pymol_write_session(p, out_filename)

Writes out a pymol session to a .pse file.

render()

Renders the PyMOL session file.

count_fit_residues(fitness_data)[source]

For a dict with mutants in a fitness dict, counts the number of fit mutants

pymol_add_interactions(p, mutability_color_dict)[source]

Adds interactions to pymol session if a ligand is present. Interactions are colored by fitness of contacted residues, not by interaction type.

pymol_color_by_fitness(p)[source]

With a pymol session set up with a system using self.pymol_setup_system(), integrates fitness data by coloring residues by mutability degree.

pymol_color_coder()[source]

Given the aligned fitness dict, returns two dicts: - residue_mutability_levels : {residue index : number of fit mutations, ..} - mutability_color_dict : {number of fit mutations : color, ..}

pymol_prettify_system(p, ligands_in_system)[source]

With a pymol session set up with a system using self.pymol_setup_system(), makes the session pretty. This code isn’t pretty though, that’s just because of how the PyMOL API is constructed.

pymol_select_components(p)[source]

Makes selections in PyMOL for ligand, protein, binding site. Returns whether there is/are (a) ligand(s) present in the system.

pymol_setup_system(p, remove_solvents=True)[source]

Sets up the protein (and ligands if present) without changing any of the looks. Also removes some stuff we’re not interested in.

pymol_start_session()[source]

Boots up a session with the publicly available PyMOL API.

pymol_write_session(p, out_filename)[source]

Writes out a pymol session to a .pse file.

render()[source]

Renders the PyMOL session file.