Back to main menu
atomsk --merge [x|y|z] <N> <file1>...<fileN> <outputfile> [<formats>] [options]
This mode merges several systems into one, either by gathering atoms from different systems into the same box or by juxtaposing several systems along an axis. The results are output in the specified <outputfile> and <formats>.
The integer <N> indicates how many systems must be merged. It is mandatory, and must be followed by the corresponding number of files names <file1> to <fileN>.
The direction [x|y|z] is an optional parameter. By default, when it is omitted, all atoms are merged into the box of the first system of the list (i.e. in the system <file1>). In other words, the final supercell is the union of all input systems. The final supercell vectors are equal to the box vectors of the first system.
When a direction is provided, it must be 'x', 'y' or 'z'. In this case, the systems are stacked on top of each other along the given direction. Along that given direction, the dimension of the final box is the sum of the dimensions of all stacked systems; in the other directions, the final box has the same size as the first system <file1>. Of course, this makes sense only if all systems have equal (or similar) dimensions normal to the given direction. Otherwise, the final result may not make much sense (e.g. when trying to stack rectangular and triclinic boxes of various shapes and sizes).
Beware that Atomsk does not "automagically" shift atomic positions, find the optimum interfaces or whatsoever. It is up to you to build, for instance, one system in one half of the supercell, the other system in the other half, and then use this mode to merge them. For quickly redefining the dimensions of the final system one can use the option
Auxiliary properties are conserved when merging systems, i.e. each atom keeps the auxiliary properties that are defined for it. If a property is defined in some files but not all of them, that property will be assigned a zero value for atoms for which it is not defined.
If you use this mode with one or several options they will be applied after the merge.
atomsk --merge 2 fccal_bottom.cfg bcciron_top.xsf interface.xyz xsf
This will merge all atoms
bcciron_top.xsf in the same box (the one defined in
fccal_bottom.cfg), and output the result in
atomsk --merge z 3 one.cfg two.xsf three.cfg final.xsf
This will stack the three systems
three.cfg along the Cartesian Z direction, and output the result in
atomsk --merge x 4 file.cfg file.cfg file.cfg file.cfg final.xsf
This will stack the file
file.cfg four times along X. This operation is equivalent to duplicating the system four times along X (i.e. "-duplicate 4 1 1").
You may also want to look at the scripts in the "examples" folder provided with the program. The folder "
Cu_Fe_interface" contains a bash script that builds two slabs, one of fcc copper and one of bcc iron, and merges them to form an interface.
Back to main menu