ReliaSolve / Molprobity2

0 stars 0 forks source link

Fix bogus unit cell volume when creating restraints manager #127

Closed russell-taylor closed 3 years ago

russell-taylor commented 3 years ago

I can test in the meantime using the translated atom names. With that hack, I've been able to load all of the models except for 7k00.cif (which fails for a different reason:

Sorry: Unit cell volume is incompatible with number of atoms.
  Unit cell parameters:Â Â Â  1.000Â Â Â  1.000Â Â Â  1.000Â Â  90.000Â Â  90.000Â Â  90.000
  Check CRYST1 record or other sources of crystal symmetry.

Dorothee reports: The issue most likely occurs when the restraints manager is created: model.process_input_model(make_restraints=True) # make restraints

You can create a bogus cell that is large enough to encompass the entire molecule by adding this code:

from cctbx.maptbx.box import shift_and_box_model
cs =model.crystal_symmetry()
if (cs is None) or (cs.unit_cell() is None):
  model = shift_and_box_model(model = model)
russell-taylor commented 3 years ago

Dorothee's fix worked.