Importing, adding, and exporting structures¶
There are several ways to insert new structures into the Builder. Most of them can be accessed using thebutton (see the image below) on the Stash menu.
The windows that opens when clicking thebutton shows the different options to add a new structure (see below).
Adding an already existing structure¶
Add a structure from a file¶
A structure can be added from a file by choosing Plugins section.. For a list of supported file formats, see the
If the file is a natively supported file format (currently ATK Python/NetCDF, 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 VNL) onto the open Builder window or onto the Builder icon on the toolbar in the main VNL 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.
If you select multiple files, they will be imported as individual Stash items.
VNL contains an internal database with several hundred crystals, molecules and fullerenes. To add a structure from this database, click, and select the relevant database from the menu (for example, ).
In the databases window, type the name of the desired structure in the search field to filter the list.
Crystallography Open Database¶
In addition to the internal database, the Crystallography Open Database (COD) plugin allows you to query the Crystallography Open Database for additional structures. This is particularly useful if the structure you are looking for is not in the VNL internal database. The COD plugin can be accessed by clicking on .
You can query the database by selecting different search options such as the elements in your structure and the structural parameters. Searching the COD will return a list of the structures matching your search parameters. For each structure, relevant information is shown such as the reference to the original paper in which the structure was reported. You can further refine your search by typing the name of the desired structure in the search field.
Once you have selected a structure, you can decide to either add it to the Stash, or download the .CIF file containing the structure.
A more extensive explanation on how to use the advanced features of the plugin can be found by in the Help section of the COD plugin window.
Creating a new structure¶
To create a brand new structure, click Molecular Builder.. 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
Each entry in themenu 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.
While other plugins normally operate on existing Stash item, these plugins create a new Stash item.
The Builder comes with the following built-in plugins:
- Crystal builder
- Magnetic Tunnel Junction
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 ;
- the Surface (cleave) plugin for cleaving a crystal, which can be accessed by clicking on.
Each plugin contains instructions explaining how to use it.
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 powerful way to interactively translate and rotate fragments. For more details, see the dedicated Move tool section.
Saving and exporting structures¶
Once you have created a structure, you may want to save it as an ATK Python/NetCDF file or export it to a non-ATK format.
To save the active Stash item into a Python or NetCDF file, press
S (or use
the menu ) and use the file dialog to specify the file
type and location.
When saving into NetCDF files, the structure is appended if the file exists.
To export the active Stash item to a non-ATK file format (like XYZ, CIF, etc), press
E, or use the menu .
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 VNL tools¶
As all instruments in VNL, the Builder window has a script drag button and a Send To button in the lower right-hand corner (see Fig. 5). 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.