Commonly-used Functions#

Dataset Preparation and Prediction for Parallel Processor#

utils.datasets.general.preprocess_workflow(traj_handler: TrajectoryHandler, pdb_path, ply_path, h5_path, frame, index_path, logger=None, with_label=False)[source]#

Preprocess workflow for each frame

Parameters
  • traj_handler – TrajectoryHandler object

  • pdb_path – path to save the pdb file

  • ply_path – path to save the ply file

  • h5_path – path to save the h5 file

  • frame – frame index

  • index_path – path to the index file

  • logger – logger object If None, no logging will be printed (default: None).

  • with_label – bool If True, the label will be added to the h5 file (default: False). Only used for holo conformation.

utils.datasets.general.apo_data_preparation_recipe(config)[source]#

Data preparation recipe for apo conformation

utils.datasets.general.holo_data_preparation_recipe(config)[source]#

Data preparation recipe for holo conformation

utils.datasets.general.checking_workflow(config)[source]#

Check the files

utils.datasets.general.read_model(model_ckpt_path, in_channels=4, out_channels=7, device='cpu')[source]#

Read the model

utils.datasets.general.add_prediction_to_ply(traj_handler, ply_path, h5_path, json_path, frame, logger, model_path, descriptor_only=False, **kwargs)[source]#

Add the prediction to the ply file and generate the descriptor to the json file

utils.datasets.general.run_prediction(config)[source]#

Run the prediction with parallel processing

Visualization: PSE File Generator#

utils.pymol_scripts.vis_pdb_ply.generate_pse(pdb_file, ply_file, pse_output, pymol_path, logger=None)[source]#

Generate a PyMOL session file (.pse) visualizing the PDB and PLY files.

Parameters
  • pdb_file (str) – Path to the PDB file.

  • ply_file (str) – Path to the PLY file.

  • pse_output (str) – Path to save the output .pse file.

  • pymol_path (str) – Path to the PyMOL executable.

  • logger (logging.Logger, optional) – Logger for logging messages. Defaults to None.

Returns

None

utils.pymol_scripts.vis_pdb_ply.merge_pse(pse_file_list: list, merged_pse_output: str, pymol_path: str, logger=None)[source]#

Merge multiple PyMOL session files into a single session file.

Parameters
  • pse_file_list (list) – List of paths to the .pse files to merge.

  • merged_pse_output (str) – Path to save a merged .pse file.

  • pymol_path (str) – Path to the PyMOL executable.

  • logger (logging.Logger, optional) – Logger for logging messages. Defaults to None.

Returns

None