Back to main menu

Mode: Copy Properties

Syntax

atomsk --copy-properties <file1> <file2> [options] [<outputfile>] [formats]

Description

This mode copies auxiliary properties from <file1> into <file2>.

This mode copies all auxiliary properties of <file2> (if any), and then copies the properties from <file1>. If a property has the same name in both systems, then values from <file2> are overwritten by values from <file1>. Otherwise, a new column is created to store the data.

The two files must contain the same number of atoms for the properties to be copied for all atoms. Otherwise, if <file1> and <file2> contain different numbers of atoms N1 and N2, then properties are copied only for the smallest number of atoms. If N1 > N2, then some properties from <file1> can not be copied and are lost. If N1 < N2, then atoms with an index greater than N1 will have a value equal to zero for copied properties.

The final system contains the atom positions and auxiliary properties of <file2>, and additionaly the auxiliary properties copied from <file1>.

If you use this mode with one or several options they will be applied to the <file2> before the properties are copied.

If a selection was defined (with the option -select), then auxiliary properties are copied only for the selected atoms. Other (unselected) atoms will keep the previous values of the properties that were defined in <file2>, or be assigned a zero value for properties that did not exist in <file2>.

Examples

Back to main menu