Closed noahharrison64 closed 2 years ago
Hi @noahharrison64, thanks a lot for reporting this issue! Could you please post your PDB ID that has no MDA universe model in case you encountered this problem with public data?
Note to myself: We could move
reference = reference.models[0]
for mobile in mobiles:
mobile = mobile.models[0]
before the if
-else
loop (would reduce redundancy) and add here already the checks for existing models; show a warning if structures without models exist and drop them.
Hi @dominiquesydow
This issue arose while using custom PDBs rather than accessed directly from RCSB. Is there any reason to drop structures without models? The align function worked when I used these structures without models associated (post commenting out) so might be worth just checking if they exist and if not then using the structure directly
Thanks, @noahharrison64, very good point, no need to drop them after looking into the model "issue" a bit more.
I found an example for structures without models and suggest the following workaround to account for structures with and without MDA models: PR https://github.com/volkamerlab/opencadd/pull/149
If you can make the time, would you mind checking if this workaround works with your custom PDBs?
Hey @dominiquesydow Had a go with the update api.py file and it appears to be working no problem.
Thanks for fixing, Noah
Great news, thanks! I have merged the changes now to the master
branch. Thanks again, @noahharrison64, for bringing this issue to our attention.
Have been trying to use the align function to align a series of MDA Universes. These universes don't contain more than one model. In the align function models are attempted to be accessed, but if they don't exist the function produces an error.
I'd suggest checking to see if they exist prior to trying to assign to a variable. For now I've just commented out this line and it appears to be working no problem.