keitaroyam / servalcat

Structure refinement and validation for crystallography and single particle analysis
Mozilla Public License 2.0
23 stars 3 forks source link

Distance restraints does not work with residue IDs over 9999 #16

Open daniel-s-d-larsson opened 3 months ago

daniel-s-d-larsson commented 3 months ago

I cannot get refinement to work when the residue ID is larger than 9999 for one of the linked atoms. For example, with PDB 7K00, the link between MG and HOH in chain 'a' causes this error.

Command:

servalcat refine_spa --map emd_22586.mrc --model 7k00.cif --resolution 1.95

Error:

 Error: At least one of the atoms from the restraints could not be found:
 ==> exte dist first chain a resi 6088 ins . atom MG seco chain a resi 10122 ins . atom O valu 2.0260 sigm 0.0681 type 1 aa**** O   . 
keitaroyam commented 2 months ago

Refmac itself cannot handle residue numbers > 9999. Servalcat internally adjusts the residue numbers in the model for Refmac but does not modify the user's instructions (although this instruction seems to have been generated internally).

I will try to fix this issue. In the meantime, could you try refine_spa_norefmac instead of refine_spa? This is Servalcat's own implementation and does not rely on Refmac.

daniel-s-d-larsson commented 2 months ago

Yes, running with refine_spa_norefmac worked.

keitaroyam commented 2 months ago

Great! Are you happy with the result? Please let me know if you have any issues with it. The refine_spa command may become obsolete in the future.

daniel-s-d-larsson commented 2 months ago

I think Servalcat works great so far, but it is always tricky with large structures and to get modified residues properly recognised. I am not sure if I get the harmonic restraints to works as I want, but that is a different topic.

keitaroyam commented 2 months ago

Indeed, it could be tricky. Perhaps I should write an article on how to refine the 7k00 structure. By the "harmonic" restraints, did you mean Refmac's harmonic restraints (a type of external restraint used to maintain atomic positions), or something else?

daniel-s-d-larsson commented 2 months ago

With the most recent version of CCP4/servelcat it seems to work out of the box with the norefmac binary. (Other softwares seems to have more problems with these edge cases, such as COOT, phenix, Isolde, ChimeraX and PyMOL.)

Yes, I was referring the harmonic restraints in Refmac, but I have not tested them extensively and if I have to use the norefmac binary, perhaps they are not compatible? Anyway, --jellybody seems to be a superior option in most cases.

keitaroyam commented 2 months ago

That's great, particularly if you refer to CCP4 9. I'd be interested in what is causing issues in COOT and PyMOL..

Harmonic restraints are also supported by norefmac. But yes, the jelly body restraints should be used in most cases.