fix: avoid increasing the model number to match the one from the pdb #16
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi!
As always, I hope I didn't misunderstood something - I know you are very busy :)
I was trying to use the 5.0.0 version of extract_residues to find 3 residues from a PDB file. (find the PDB attached). This is the residue selection:
The std err yields the following:
ExtractResidues: The residues given by user were not found in input structure
The fact is that the biobb sums 1 to the model number when building the structure residues to compare with the user selection. We do this in line 179 of common.py:
"model": str(residue.get_parent().get_parent().get_id()+1),
If I change the model of my selection to 1 then the biobb finds the residues (meaning new_structure is not empty, see line 120 in extract_residues.py) but the corresponding output_residues_path is empty. This is because it tries to write residues of model 1 when the only existing model in the input structure is 0.
I'm not sure of the original reason to add 1 to the model of the residues built using create_biopython_residue(). But applying this change the biobb works as expected and finds the residues from model 0.