You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that, while the documentation says the attachment ID is selected via the serial ID of an atom rather than atom index (https://rna-fretools.github.io/fretraj/getting_started/acv_calculation.html?highlight=serial), in the Volume class of cloud.py the atom index is used, leading to issues if the mdtraj atom_slice method is used or atoms are deleted from the trajectory and then AVs are calculated after, as the number of atoms changes.
For my purposes as a quick fix to make cloud.py use the serial IDs (which are maintained when doing atom_slice, while atom index is not), I edited line 823 of cloud.py to pull the atom index of the existing atom with atom.serial equal the supplied labels["Position"][site]["attach_id"]+1, and changed line 887 to this index-1. Without this change, ft.cloud.Volume returns an index error when the given serial ID is greater than the number of atoms in the atom_slice.
self.attach_id = [i.index for i in self.structure.top.atoms if i.serial == labels["Position"][site]["attach_id"]][0]+1
The text was updated successfully, but these errors were encountered:
It seems that, while the documentation says the attachment ID is selected via the serial ID of an atom rather than atom index (https://rna-fretools.github.io/fretraj/getting_started/acv_calculation.html?highlight=serial), in the Volume class of cloud.py the atom index is used, leading to issues if the mdtraj atom_slice method is used or atoms are deleted from the trajectory and then AVs are calculated after, as the number of atoms changes.
For my purposes as a quick fix to make cloud.py use the serial IDs (which are maintained when doing atom_slice, while atom index is not), I edited line 823 of cloud.py to pull the atom index of the existing atom with atom.serial equal the supplied labels["Position"][site]["attach_id"]+1, and changed line 887 to this index-1. Without this change, ft.cloud.Volume returns an index error when the given serial ID is greater than the number of atoms in the atom_slice.
self.attach_id = [i.index for i in self.structure.top.atoms if i.serial == labels["Position"][site]["attach_id"]][0]+1
The text was updated successfully, but these errors were encountered: