Platform: Windows, Linux
Version: 2.14 and the latest IMP-develop branch
Description: The bounding_box option in the pmi.tools.shuffle_configuration does not work when gaussians are setup on the flexible beads (em_residues_per_gaussian is non-zero in a topology file). This is due to not decorating the flexible beads as a RigidBody before feeding it to the IMP.core.transform which requires input particles which are setup as RigidBody to be decorated as such.
Reproduce the issue: Use a minimal topology file below -> build the system (BuildSystem macro in pmi) -> call pmi.tools.shuffle_configuration on the root_hierarchy with bounding_box set to some arbitrary value to get the below error.
Topology file:
Traceback (most recent call last):
File "test_bug.py", line 27, in <module>
IMP.pmi.tools.shuffle_configuration(root_hierarchy, bounding_box=((15, 130, 15), (255, 220, 255)))
File "C:\Program Files\IMP-2.13.0\python\IMP\pmi\tools.py", line 1446, in shuffle_configuration
IMP.core.transform(d, -d.get_coordinates())
File "C:\Program Files\IMP-2.13.0\python\IMP\core\__init__.py", line 7714, in transform
return _IMP_core.transform(*args)
_IMP_kernel.UsageException: Usage check failure: Particle is also a RigidBody, so this function would do the wrong thing; decorate your Particle as a
RigidBody instead and call transform(RigidBody a, const algebra::Transformation3D &tr)
Attached are the files required to reproduce the bug (abc.fasta, topology.txt, test_bug.py)
files.zip
Opening a PR attempting to fix this by adding the required extra line in pmi/pyext/src/tools.py.
Platform: Windows, Linux Version: 2.14 and the latest IMP-develop branch
Description: The
bounding_box
option in thepmi.tools.shuffle_configuration
does not work when gaussians are setup on the flexible beads (em_residues_per_gaussian
is non-zero in a topology file). This is due to not decorating the flexible beads as aRigidBody
before feeding it to theIMP.core.transform
which requires input particles which are setup asRigidBody
to be decorated as such.Reproduce the issue: Use a minimal topology file below -> build the system (
BuildSystem
macro inpmi
) -> callpmi.tools.shuffle_configuration
on theroot_hierarchy
withbounding_box
set to some arbitrary value to get the below error. Topology file:Output:
Attached are the files required to reproduce the bug (
abc.fasta
,topology.txt
,test_bug.py
) files.zipOpening a PR attempting to fix this by adding the required extra line in
pmi/pyext/src/tools.py
.Thanks