API reference

This section details the functions and classes available in MDDB Workflow.

class model_workflow.mwf.Project(directory: str = '.', accession: str | None = None, database_url: str = 'https://irb-dev.mddbr.eu/api/', inputs_filepath: str | None = None, input_topology_filepath: str | None = None, input_structure_filepath: str | None = None, input_trajectory_filepaths: str | None = None, md_directories: List[str] | None = None, md_config: list | None = None, reference_md_index: int | None = None, populations_filepath: str = 'populations.json', transitions_filepath: str = 'transitions.json', filter_selection: bool | str = False, pbc_selection: str | None = None, cg_selection: str | None = None, image: bool = False, fit: bool = False, translation: List[float] = [0, 0, 0], mercy: List[str] | bool = [], trust: List[str] | bool = [], faith: bool = False, pca_analysis_selection: str = "(protein and name N CA C) or (nucleic and name P O5' O3' C5' C4' C3')", pca_fit_selection: str = "(protein and name N CA C) or (nucleic and name P O5' O3' C5' C4' C3')", rmsd_cutoff: float = 9, interaction_cutoff: float = 0.1, interactions_auto: str | None = None, guess_bonds: bool = False, sample_trajectory: int | None = None)[source]

Bases: object

property cg_residues: List[int]

Indices of residues in coarse grain (read only)

property charges

Atom charges (read only)

check_is_time_dependent() bool[source]

Set if MDs are time dependent.

check_md_directories()[source]
property dihedrals: List[dict]

Topology dihedrals (read only)

get_MDAnalysis_Universe = <Task (mda_univ)>
get_cg_residues() List[int][source]
get_chain_references = <Task (chains)>
get_charges = <Task (charges)>
get_check_stable_bonds() bool[source]
get_dihedrals() List[dict][source]

Get the topology dihedrals.

get_file(target_file: File) bool[source]
get_input(name: str)[source]
get_input_cg_selection() str | None[source]
get_input_pbc_selection() str | None[source]
get_input_structure_file() File[source]

Get the input structure filename.

get_input_topology_file() File | None[source]

Get the input topology file. If the file is not found try to download it.

get_input_topology_filepath() str | None[source]

Get the input topology filepath from the inputs or try to guess it. If the input topology filepath is a ‘no’ flag then we consider there is no topology at all So far we extract atom charges and atom bonds from the topology file In this scenario we can keep working but there are some consecuences: 1 - Analysis using atom charges such as ‘energies’ will be skipped 2 - The standard topology file will not include atom charges 3 - Bonds will be guessed

get_input_trajectory_files() List[File][source]

Get the input trajectory filename(s) from the inputs. If file(s) are not found try to download it.

get_inputs() dict[source]
get_inputs_file() File[source]

Set a function to load the inputs file.

get_interaction_types = <Task (intertypes)>
get_ligand_map = <Task (ligmap)>
get_ligand_references_file(parent) str[source]
get_lipid_map = <Task (lipmap)>
get_lipid_references_file(parent) str[source]
get_md_directories() list[source]
get_mds() list[source]
get_membrane_map = <Task (membranes)>
get_pbc_residues() List[int][source]
get_pdb_ids() List[str][source]
get_pdb_references = <Task (pdbs)>
get_populations() List[float] | None[source]
get_populations_file() File[source]

Get the MSM equilibrium populations filename.

get_protein_map = <Task (protmap)>
get_protein_references_file(parent) str[source]
get_reference_bonds = <Task (refbonds)>
get_reference_md() int[source]
get_reference_md_index() int[source]
get_residue_map = <Task (resmap)>
get_screenshot_filename = <Task (screenshot)>
get_snaphsots() int[source]
get_standard_topology_file(parent) str[source]
get_structure() Structure[source]
get_structure_file() str[source]
get_topology_file() str[source]

Get the processed topology file.

get_topology_filepath() str[source]

Get the processed topology file path.

get_topology_reader() Topology[source]
get_trajectory_file() str[source]
get_transitions() List[List[float]] | None[source]
get_transitions_file() str | None[source]

Get the MSM transition probabilities filename.

guess_input_topology_filepath() str | None[source]

If there is not input topology filepath, we try to guess it among the files in the project directory. Note that if we can download from the remote then we must check the remote available files as well.

inherit_topology_filename() str | None[source]
property input_authors

Input authors (read only)

property input_boxtype

Input boxtype (read only)

property input_cg_selection: str | None

Selection of atoms which are not acutal atoms but Coarse Grained beads (read only)

property input_chain_names

Input chain names (read only)

property input_citation

Input citation (read only)

property input_collections

Input collections (read only)

property input_contact

Input contact (read only)

property input_customs

Input custom representations (read only)

property input_cv19_abs

Input Covid-19 antibodies (read only)

property input_cv19_nanobs

Input Covid-19 nanobodies (read only)

property input_cv19_startconf

Input Covid-19 starting conformation (read only)

property input_cv19_unit

Input Covid-19 Unit (read only)

property input_description

Input description (read only)

property input_ensemble

Input ensemble (read only)

property input_force_fields

Input force fields (read only)

property input_framestep

Input framestep (read only)

input_getter()[source]
property input_groups

Input groups (read only)

property input_interactions

Interactions to be analyzed (read only)

property input_license

Input license (read only)

property input_ligands

Input ligand references (read only)

property input_linkcense

Input license link (read only)

Input links (read only)

property input_mds

Input MDs configuration (read only)

property input_method

Input method (read only)

property input_multimeric

Input multimeric labels (read only)

property input_name

Input name (read only)

property input_orientation

Input orientation (read only)

property input_pbc_selection: str | None

Selection of atoms which are still in periodic boundary conditions (read only)

property input_pdb_ids

Protein Data Bank IDs used for the setup of the system (read only)

property input_program

Input program (read only)

property input_protein_references

Uniprot IDs to be used first when aligning protein sequences (read only)

property input_structure_file: File

Input structure filename for each MD (read only)

property input_temperature

Input temperature (read only)

property input_thanks

Input acknowledgements (read only)

property input_timestep

Input timestep (read only)

property input_topology_file: File | None

Input topology file (read only)

property input_trajectory_files: List[File]

Input trajectory filenames for each MD (read only)

property input_type

Set if its a trajectory or an ensemble (read only)

property input_version

Input version (read only)

property input_water

Input water force field (read only)

property inputs: dict

Inputs from the inputs file (read only)

property inputs_file: File

Inputs filename (read only)

property interaction_types

Interaction types (read only)

is_inputs_file_available() bool[source]

Set a function to check if inputs file is available. Note that asking for it when it is not available will lead to raising an input error.

property is_time_dependent: bool

Check if trajectory frames are time dependent (read only)

property ligand_map

Ligand references (read only)

property ligand_references_file: str

File including ligand refereces data mined from PubChem (read only)

property lipid_map

Lipid mapping (read only)

property lipid_references_file: str

File including lipid references data mined from PubChem (read only)

property md_directories: list

MD directories (read only)

property mds: list

Available MDs (read only)

property membrane_map

Membrane mapping (read only)

property must_check_stable_bonds: List[int]

Indices of residues in coarse grain (read only)

pathify(filename_or_relative_path: str) str[source]
property pbc_residues: List[int]

Indices of residues in periodic boundary conditions (read only)

property pdb_ids: List[str]

Tested and standarized PDB ids (read only)

pdb_references_file(parent) str[source]
property populations: List[float] | None

Equilibrium populations from a MSM (read only)

property populations_file: File

MSM equilibrium populations filename (read only)

prepare_metadata = <Task (pmeta)>
prepare_standard_topology = <Task (stopology)>
property protein_map

Protein residues mapping (read only)

property protein_references_file: str

File including protein refereces data mined from UniProt (read only)

property reference_bonds

Atom bonds to be trusted (read only)

property reference_md: int

Reference MD (read only)

property reference_md_index: int

Reference MD index (read only)

property residue_map

Residue map (read only)

property screenshot_filename

Screenshot filename (read only)

property snapshots: int

Reference MD snapshots (read only)

property standard_topology_file: str

Standard topology filename (read only)

property structure: Structure

Parsed structure from the reference MD (read only)

property structure_file: str

Structure filename from the reference MD (read only)

property topology_file: str

Topology file (read only)

property topology_filepath: str

Topology file path (read only)

property topology_reader: Topology

Topology reader (read only)

property trajectory_file: str

Trajectory filename from the reference MD (read only)

property transitions: List[List[float]] | None

Transition probabilities from a MSM (read only)

property transitions_file: str | None

MSM transition probabilities filename (read only)

property universe

MDAnalysis Universe object (read only)

class model_workflow.mwf.MD(project: Project, number: int, directory: str, input_structure_filepath: str, input_trajectory_filepaths: List[str])[source]

Bases: object

property average_structure_file: str

Average structure filename (read only)

property cg_residues: List[int]

Indices of residues in coarse grain (read only)

property cg_selection: Selection

Periodic boundary conditions atom selection (read only)

property first_frame_file: str

First frame (read only)

get_average_structure = <Task (average)>
get_average_structure_file(parent) str[source]
get_cg_residues() List[int][source]
get_cg_selection() Selection[source]
get_file(target_file: File) bool[source]

Check if a file exists. If not, try to download it from the database. If the file is not found in the database it is fine, we do not even warn the user. Note that this function is used to get populations and transitions files, which are not common.

get_first_frame = <Task (firstframe)>
get_first_frame_file(parent) str[source]
get_input_structure_file() str[source]

Get the input pdb filename from the inputs. If the file is not found try to download it.

get_input_structure_filepath() str[source]

Set a function to get input structure file path

get_input_trajectory_filepaths() str[source]

Set a function to get input trajectory file paths.

get_input_trajectory_files() str[source]

Get the input trajectory filename(s) from the inputs. If file(s) are not found try to download it.

get_md_inputs() dict[source]

MD specific inputs.

get_pbc_residues() List[int][source]
get_pbc_selection() Selection[source]
get_populations() List[float][source]
get_processed_interactions = <Task (inter)>
get_protein_map() dict[source]
get_reference_bonds() List[List[int]][source]
get_reference_frame = <Task (reframe)>
get_snapshots = <Task (frames)>
get_structure() Structure[source]
get_structure_file() str[source]

Get the processed structure.

get_topology_file() str[source]
get_trajectory_file() str[source]

Get the processed trajectory.

get_transitions() List[List[float]][source]
property input_cg_selection

Selection of atoms which are not actual atoms but coarse grain beads (read only)

input_getter()[source]
property input_interactions

Interactions to be analyzed (read only)

property input_pbc_selection

Selection of atoms which are still in periodic boundary conditions (read only)

property input_structure_file: str

Input structure filename (read only)

property input_trajectory_files: str

Input trajectory filenames (read only)

property interactions

Processed interactions (read only)

is_trajectory_integral() bool | None[source]
property md_inputs: dict

MD specific inputs (read only)

pathify(filename_or_relative_path: str) str[source]
property pbc_residues: List[int]

Indices of residues in periodic boundary conditions (read only)

property pbc_selection: Selection

Periodic boundary conditions atom selection (read only)

property populations: List[float]

Equilibrium populations from a MSM (read only)

prepare_metadata = <Task (mdmeta)>
print_tests_summary()[source]
process_input_files = <Task (inpro)>
property protein_map: dict

Residues mapping (read only)

property reference_bonds: List[List[int]]

Atom bonds to be trusted (read only)

property reference_frame

Reference frame to be used to represent the MD (read only)

run_apl_analysis = <Task (apl)>
run_clusters_analysis = <Task (clusters)>
run_density_analysis = <Task (density)>
run_dihedral_energies = <Task (dihedrals)>
run_dist_perres_analysis = <Task (dist)>
run_energies_analysis = <Task (energies)>
run_hbonds_analysis = <Task (hbonds)>
run_helical_analysis = <Task (helical)>
run_lipid_interactions_analysis = <Task (linter)>
run_lipid_order_analysis = <Task (lorder)>
run_markov_analysis = <Task (markov)>
run_pca_analysis = <Task (pca)>
run_pockets_analysis = <Task (pockets)>
run_rgyr_analysis = <Task (rgyr)>
run_rmsd_pairwise_analysis = <Task (pairwise)>
run_rmsd_perres_analysis = <Task (perres)>
run_rmsds_analysis = <Task (rmsds)>
run_rmsf_analysis = <Task (rmsf)>
run_sas_analysis = <Task (sas)>
run_thickness_analysis = <Task (thickness)>
run_tmscores_analysis = <Task (tmscore)>
property snapshots

Trajectory snapshots (read only)

property structure: Structure

Parsed structure (read only)

property structure_file: str

Structure file (read only)

property topology_file: str

Topology filename from the project (read only)

property trajectory_file: str

Trajectory file (read only)

property transitions: List[List[float]]

Transition probabilities from a MSM (read only)