Forum Navigation
You need to log in to create posts and topics.

Bug found in Affine Transformation Feature

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

 

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

Thanks Alex for your kind directions. It's working for now.

Thanks again,

-Shahriar