Universes can come with or without models. Currently, we only consider universes with models in our superposition module: the first model is selected for the alignment. After this selection, the object type changes from an MDA Universe to AtomGroup.
Example:
# With models
structures = [Structure.from_pdbid("4y72"), Structure.from_pdbid("1xqz"), Structure.from_pdbid("1m17")]
align(structures, user_select=False, method=METHODS["mda"]);
# Without models (casting an MDA NoDataError)
f1, f2, f3 = ... # Path to PDB files*
structures = [Structure.from_string(f1), Structure.from_string(f2), Structure.from_string(f3)]
align(structures, user_select=False, method=METHODS["mda"]);
*Download PBD files (terminal):
for pdb in 4y72 1xqz 1m17; do wget https://www.rcsb.org/structure/$pdb -o $pdb.pdb; done
Solution
Cast all universes (regardless of whether they contain models or not) to AtomGroup objects.
Todos
[x] Add _universe_to_atomgroup function
[x] Apply function to reference and all mobile structures before the alignment
[x] [Off-topic] Make opencadd.structure.superposition.api.align parameter user_select optional (default is False); this will allow back-compatibility with earlier version when user_select was not a parameter, yet.
Merging #149 (656f6b3) into master (097e3b5) will decrease coverage by 0.02%.
The diff coverage is 83.33%.
:exclamation: Current head 656f6b3 differs from pull request most recent head 5c932d0. Consider uploading reports for the commit 5c932d0 to get more accurate results
Description
Universes can come with or without models. Currently, we only consider universes with models in our
superposition
module: the first model is selected for the alignment. After this selection, the object type changes from an MDAUniverse
toAtomGroup
.Example:
*Download PBD files (terminal):
Solution
Cast all universes (regardless of whether they contain models or not) to AtomGroup objects.
Todos
_universe_to_atomgroup
functionopencadd.structure.superposition.api.align
parameteruser_select
optional (default isFalse
); this will allow back-compatibility with earlier version whenuser_select
was not a parameter, yet.Status