Merge pull request #4072 from RosettaCommons/roccomoretti/component_loading_both
Fix CCD component loading such that it is more complete.
We're now providing the CCD for reading of arbitrary wwPDB recognized ligands, but we're doing it incompletely.
Right now we have an odd system where we'll load a CCD version, but only if there isn't a Rosetta residue type which has the same three letter code. This is a bit silly, as there's a large number of Rosetta residue types with three letter codes which are not equivalent to the wwPDB residue with that three letter code, and these will obscure the CCD version.
We already have a mechanism for removing CCD types that are equivalent to Rosetta types. This is the exclude_pdb_component_list.txt in the Rosetta database. (And associated facilities for -extra_res_fa etc.) If a three letter code is listed there, we don't load the CCD version.
If the CCD version isn't excluded, and has the same three letter code as the (chemically non-equivalent) Rosetta version, we can load both and then let the atom name heuristic (or other such facility) pick the best residue type match. (The CCD types should come after the Rosetta types, so all else being equal, Rosetta should prefer the database version.)
If, for some reason, this behavior doesn't work for you, you can always add -check_all_PDB_components false (now defaults true) to the command line, or call rtf.set_no_CCD_on_name3_match(true) in-code for your ResidueTypeFinder, and this should re-enable the old behavior.
With this, I've dug through the centroid and fa_standard residue type sets, and updated their exclude_pdb_component_list.txt to be more complete.