Importing, adding, and exporting structures

There are several ways to insert new structures into the Builder. Most of them can be accessed selecting add_icon Add highlighted in red on the Stash menu.

../../../_images/stashadd.png

The window highlighted in red, that opens when clicking the add_icon button, shows the different options to add a new structure.

../../../_images/stashmenu.png

Adding an already existing structure

Add a structure from a file

A structure can be added from a file by choosing Add ‣ From Files. For a list of supported file formats, see the Plugins section.

If the file is a natively supported file format (currently QuantumATK Python/HDF5, XYZ, CIF, CAR, VASP) you can also drag and drop the file from a file browser (like Explorer in Windows, or the built-in file browser in QuantumATK) onto the open Builder window or onto the Builder icon icon_builder on the toolbar in the main QuantumATK window to import the file.

It is also possible to drag and drop a Python script (as text), e.g. from an Editor, onto the Builder. Finally, you can paste a Python code from the clipboard into the Builder by choosing Add ‣ From Clipboard.

Tip

If you select multiple files, they will be imported as individual Stash Items.

Structure databases

QuantumATK contains an internal database with several hundred crystals, molecules and fullerenes. To add a structure from this database, click Add ‣ From Database, and select the relevant database from the tabs (for example, Crystals).

../../../_images/database_choose.png

Fig. 2 Use the tabs to select between the Crystal, Molecule, Fullerene, Zeolite and Monomer databases.

In the databases window, type the name of the desired structure in the search field to filter the list.

../../../_images/database_crystal.png

Fig. 3 The Crystal database. Use the search field to look for your desired crystal structure.

Once you have located and selected the desired structure, click the add_icon icon highlighted in red to add it as a new Stash Item. You can also double-click selection to add that structure.

Creating a new structure

New configuration

To create a brand new structure, click Add ‣ New Configuration. This will insert a molecule with a single hydrogen atom, and then you can manipulate this further by using a combination of the plugins available in the Builder such as the Molecular Builder.

Custom builders

Each entry in the Add ‣ From Plugin menu is associated with a plugin. These plugins can be simple and just take a few parameters, or use a very elaborate interface to create complicated structures.

Note

While other plugins normally operate on existing Stash Item, these plugins create a new Stash Item.

../../../_images/nanotube_builder.png

Fig. 4 Building a nanotube, also multiwall, in QuantumATK is very easy - just use Add ‣ From Plugin ‣ Nanotube.

The Builder comes with the following built-in plugins:

Tip

In addition to the built-in plugins, you can also write your own plugin or download and install new addons to extend the list, to make it easier to build a particular new type of structure.

Combining, modifying and converting structures

In many cases it is necessary to combine two structures into one, or to convert one type of configuration to another, e.g. bulk to device.

In the Builder there are plugins that can be used to modify or combine structures for special purposes. They are located in the plugin panel on the right-hand side of the Builder. Two examples are:

  • the Interface Builder, for combining two structure to form an interface, which can be accessed by clicking on Builders ‣ Interface;

  • the Surface (cleave) plugin for cleaving a crystal, which can be accessed by clicking on Builders ‣ Surface (Cleave).

Another possibility to is to drop a Stash Item from the Stash onto the 3D window; this will add the atoms of the dropped item to the active configuration (only the atomic positions are used, not unit cells or other properties). When you do this, the Builder activates the Move Tool, which is a powerful way to interactively translate and rotate fragments. For more details, see the dedicated Move tool section.

To convert a bulk structure to a device, use Device Tools ‣ Device From Bulk. Similarly, to convert a bulk structure or slab to a surface, use Device Tools ‣ Surface From Bulk. To go back, click the icon_bulk button on the toolbar. You can also convert a periodic structure to a molecule (removing the unit cell) using the icon_molecule button.

Saving and exporting structures

Once you have created a structure, you may want to save it as an QuantumATK Python/NetCDF file or export it to a non-ATK format.

Save

To save the active Stash Item into a Python or HDF5 file, press Ctrl + S (or use the menu File ‣ Save as…) and use the file dialog to specify the file type and location.

Warning

When saving into HDF5 files, the structure is appended if the file exists.

Export

To export the active Stash Item to a non-ATK file format (like XYZ, CIF, etc), press Ctrl + E, or use the menu File ‣ Export configuration.

Note

To save or export another Stash Item than the active one, right click it and choose Save as… or Export from the context menu.

Sending the structure to other QuantumATK tools

As all instruments in QuantumATK, the Builder window has a script drag icon_dragndrop button and Send To icon_sendto button in the lower right-hand corner (see Fig. 1). Using these, you can transfer the active structure to e.g. the Script Generator to set up a calculation. To send a particular Stash Item to e.g. the Editor, right-click it and choose Send To from the context menu.