transform — A transformation on a particle set.
transform ::= (parameter*)
The transform element contains the instructions on a transformation on the particleset referenced by target.
Transform a particle set. Transformations are loosely defined as any change on the configuration of the particle set.
Required, (translate | expand ), the action the transform will take.
Optional, the particle set to be transformed. Only required when there are more than one particlesets.
Optional, constraints on the transform. The exact meaning depends on the role.
Reserved.
Table 3. Transformations on the particle sets
Currently available transformation functions in ohmms applications are:
| role | Valid parameters | What to expect |
| expand | <parameter name="uc_grid"> n1 n2 n3 </parameter> | Duplicate (expand) the supercell by n1 by n2 by n3. Only integer values are accepted for n1, n2 and n3. |
| translate | <parameter name="displacement" condition="(0|1)"> x y z </parameter> | Move all the particle positions by x y z. If condition="0" (Default), the displacement is a Cartesian vector as defined by unitcell/@condition, typically AA. If condition="1", the displacement is in the unitcell unit. |
This example shows how to translate a particle set of H2 molecule by (1,1,1) AA.
<particlesets>
<particleset name="H2" size="2">
<attrib name="position" condition="0" datatype="posArray">
-1.0 0 0
1.0 0 0
</attrib>
<attrib name="ionid" datatype="stringArray">
H H
</attrib>
</particleset>
<transform role="translate">
<!-- translate H2 by (1,1,1) AA -->
<parameter name="displacement" condition="0">
1.0 1.0 1.0
</parameter>
</transform>
</particlesets>