You can very conveniently use ATK, or more specifically the graphical user interface Virtual NanoLab (VNL), to build structures that will be used for computations in other programs. (You can also import external files into VNL.)
Built-in export filters (XYZ, CAR, CIF, ...)
- For molecular structures, you can directly export the geometry in an XYZ file, via the menu "File > Export configuration" in the Builder. Choose the XYZ format under "Files of type", enter the file name, and save the file.
- A similar approach is possible for exporting periodic structures (crystals, nanotubes, etc) to CIF or CAR files.
Exporting from scripts
The function "nlprint" is also a convenient tool for exporting structures:
Include this line in a script (referring to the correct variable for the structure), and pipe the output to a file when you run it:
There will be a few lines in the file file.xyz that you need to remove, but the format of the coordinate list is proper XYZ. If the structure is a two-probe or bulk, there will be some additional information about the unit cell too.
Custom export filters
Above we made use of the built-in functionality to export files. We can also use of the flexibility offered by writing plug-in scripts for the Custom Builder tool to provide additional, customized export filters. We will demonstrate this by providing a VASP exporter.
- First, download and save the VASP exporter script to your computer.
- Next, drop this Python file on the Custom icon on the main VNL toolbar
- Now transfer the structure you wish to export to the Custom exporter by grabbing the script icon in the lower right-hand corner of whichever tool you have used to build it (e.g. the Builder or another Custom builder, or even a script in the Editor), and drop it on the area "Drop configuration here" in the VASP Exporter window.
- The VASP "POSCAR" data is displayed in the log panel; just select and copy it from there, and paste it into any editor and save as a file.
- As shown above, you can choose whether you want to export it in direct (fractional) or Cartesian coordinates.
If you are interested in learning more about how to make your own Custom tools in VNL, see e.g. the example of the Li-H2-Li custom builder in the basic VNL tutorial.