Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: avoid increasing the model number to match the one from the pdb #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PabloNA97
Copy link

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:

step_extract_residues:
  tool: extract_residues
  paths:
    input_structure_path: receptor.pdb 
    output_residues_path: pocket_residues.pdb
  properties:
    residues: [{'res_id': '37', 'model':'0'}, {'res_id': '49', 'model':'0'}, {'res_id': '112', 'model':'0'}]                            

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant