ihmwg / python-ihm

Python package for handling IHM mmCIF and BinaryCIF files
MIT License
14 stars 7 forks source link

Make output from ligands_water.py example validate #76

Closed benmwebb closed 2 years ago

benmwebb commented 2 years ago

We don't currently generate valid mmCIF from the ligands_water.py example; running the output through our validator gives

Mandatory keyword pdbx_nonpoly_scheme.ndb_seq_num cannot be missing from the file

The following IDs referenced by _pdbx_nonpoly_scheme.asym_id were not defined in the parent category (_atom_site.label_asym_id): E, F, D

The following IDs referenced by _pdbx_nonpoly_scheme.entity_id were not defined in the parent category (_atom_site.label_entity_id): 5, 4

The following IDs referenced by _pdbx_nonpoly_scheme.mon_id were not defined in the parent category (_atom_site.label_comp_id): HOH, HEM

We should make this valid, and periodically test the outputs to make sure they validate.

  1. Add coordinates for the ligands and water so that the atom_site table is output.
  2. Add pdbx_nonpoly_scheme.ndb_seq_num. This appears to count sequentially from 1 in real PDB files, so we can just do that too.
benmwebb commented 2 years ago

@brindakv, does the pdbx_nonpoly_scheme table really depend on atom_site? What happens if we have a coarse-grained IHM model containing ligands? Can we just omit the pdbx_nonpoly_scheme table in this case, or would the PDBx dictionary need to be modified to make this work? (Fortunately there are currently no such models to my knowledge.)

brindakv commented 2 years ago

@benmwebb pdbx_nonpoly_scheme does depend upon atom_site. I'll discuss this with the PDBx/mmCIF developers.