pdbtbx icon indicating copy to clipboard operation
pdbtbx copied to clipboard

Add ReadOptions implementation

Open y1zhou opened this issue 9 months ago • 10 comments

This is to address #125, where we pass in ReadOptions to the open() functions instead of just StrictnessLevel for future extensibility.

  • [x] PDB parser with ReadOptions
  • [x] mmCIF parser with ReadOptions
  • [x] Route to open_gz when options.decompress is true
  • [x] Remove hydrogens from the model when options.discard_hydrogens is true
  • [x] Skip other models when options.only_first_model is true
  • [x] Only parse ATOM records when options.only_atomic_coords is true

Some things up for discussion:

  1. What is the intention of capitalise_chains? If I recall correctly all uppercase letters, lowercase letters, and numbers are valid chain identifiers.
  2. Can I modify the signatures of open_pdb_raw and open_mmcif_raw? They are public functions but it seems they are only meant to be called by open_pdb and open_mmcif. If we maintain open_pdb_raw_with_options and open_mcif_raw_with_options there's going to be a lot of duplicated code (or we extract common methods into another core function).

y1zhou avatar May 16 '24 15:05 y1zhou