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
Version: v1.4.79 Windows binaries provided here. Afaik this issue is also reproducible when compiling from current source.
Hello!
When using the python bindings, iterating over a system's molecules with molecules(system) returns molecules with inconsistent types. The following code snippet demonstrates this behavior, using the .pdb file with ID 1GZX (see here):
Even though we iterate over the same molecules both times, type(molecule) is returned as BALLCore.Molecule the first time and as BALLCore.Protein the second time. As far as I can tell, as soon as a molecule has been accessed and bound to a variable via system.getProtein() at some point, its type will remain BALLCore.Protein. Prior to this, however, Protein-type methods, i.e. getResidue(), are not available when iterating via molecules(system). This problem seems to be specific to the Python bindings and cannot be reproduced in C++ (according to @jeleclaire - my setup only allows me to use the python bindings, so I can't test this myself).
Expected behavior imo would be for a molecule's type to not depend on whether or not it has previously been accessed via system.getProtein(). Personally I feel that having it consistently be BALLCore.Protein (when it actually IS a protein) would be most useful, although that's not my call to make.
The text was updated successfully, but these errors were encountered:
Version: v1.4.79 Windows binaries provided here. Afaik this issue is also reproducible when compiling from current source.
Hello!
When using the python bindings, iterating over a system's molecules with
molecules(system)
returns molecules with inconsistent types. The following code snippet demonstrates this behavior, using the .pdb file with ID 1GZX (see here):Output:
Even though we iterate over the same molecules both times,
type(molecule)
is returned asBALLCore.Molecule
the first time and asBALLCore.Protein
the second time. As far as I can tell, as soon as a molecule has been accessed and bound to a variable viasystem.getProtein()
at some point, its type will remainBALLCore.Protein
. Prior to this, however, Protein-type methods, i.e.getResidue()
, are not available when iterating viamolecules(system)
. This problem seems to be specific to the Python bindings and cannot be reproduced in C++ (according to @jeleclaire - my setup only allows me to use the python bindings, so I can't test this myself).Expected behavior imo would be for a molecule's type to not depend on whether or not it has previously been accessed via
system.getProtein()
. Personally I feel that having it consistently beBALLCore.Protein
(when it actually IS a protein) would be most useful, although that's not my call to make.The text was updated successfully, but these errors were encountered: