Bug found in Affine Transformation Feature

Quote from Mohammad Shahriar Hooshmand on January 8, 2020, 4:45 amHi Alex,
I just ran into a bug in AffineTransformationModifier within python package (Pypip). It turns out that given specificying either transfrom_box or transform_particles, script disregards these tags and transforms the structure with both to be true. Let's say you wanna create a vacuum on top of the cell. Using below script, this wouldn't work. Please let me know if there is anything that I am missing or this should be modified in the source code.
vacuum = AffineTransformationModifier(transform_box = True, transform_particles = False, target_cell = cell_transformed, relative_mode = False)Thanks,
-Shahriar
Hi Alex,
I just ran into a bug in AffineTransformationModifier within python package (Pypip). It turns out that given specificying either transfrom_box or transform_particles, script disregards these tags and transforms the structure with both to be true. Let's say you wanna create a vacuum on top of the cell. Using below script, this wouldn't work. Please let me know if there is anything that I am missing or this should be modified in the source code.
vacuum = AffineTransformationModifier(transform_box = True, transform_particles = False, target_cell = cell_transformed, relative_mode = False)
Thanks,
-Shahriar

Quote from Alexander Stukowski on January 8, 2020, 8:07 amHi Shahriar,
Indeed, this likely is a bug in the backward-compatibility layer of OVITO 3.0, which is there to mimic the programming interface of OVITO 2.9 to some extent. Assigning the value False to
transform_particles
fails and it always remains True.I am going to fix this issue soon. In the meantime, please update your code to use the new interface of OVITO 3.0. Here, the old
transform_particles
field has been deprecated. Instead you should now use the newAffineTransformationModifier.operate_on
field. You can find the current class documentation here.vacuum = AffineTransformationModifier(operate_on = {'cell'}, target_cell = cell_transformed, relative_mode = False)-Alex
Hi Shahriar,
Indeed, this likely is a bug in the backward-compatibility layer of OVITO 3.0, which is there to mimic the programming interface of OVITO 2.9 to some extent. Assigning the value False to transform_particles
fails and it always remains True.
I am going to fix this issue soon. In the meantime, please update your code to use the new interface of OVITO 3.0. Here, the old transform_particles
field has been deprecated. Instead you should now use the new AffineTransformationModifier.operate_on
field. You can find the current class documentation here.
vacuum = AffineTransformationModifier(operate_on = {'cell'}, target_cell = cell_transformed, relative_mode = False)
-Alex

Quote from Mohammad Shahriar Hooshmand on January 8, 2020, 7:02 pmThanks Alex for your kind directions. It's working for now.
Thanks again,
-Shahriar
Thanks Alex for your kind directions. It's working for now.
Thanks again,
-Shahriar
新的OVITO微信频道!
New for our users in China: OVITO on WeChat
Official OVITO WeChat channel operated by Foshan Diesi Technology Co., Ltd.
