|
There are many situations where one migh already have defined the atomic coordinates for a system in some other software. ATK can easily import a variety of external file fomats, so you don't have to type in the numbers again to use them in ATK!
The supported file formats are:
- XYZ
- CIF
- CAR
- and VASP "POSCAR" files
Importing in VNL
In the simplest case, all you actually have to do is to drop the file itself on one of the instruments in VNL, typically the Builder if you want to use the structure in a calculation, or the Viewer if you just want to visualize it.
Importing structures in a script
It is also possible to import and use external files directly in a script:
molecule = nlread('myfile.xyz')[0]
Note that "nlread" returns a list, normally only with one element, hence the [0]. The file formats are recognized by the extensions, so the same principle would apply to CIF, CAR, or POSCAR files alike.
Here is another way to use the XYZ format, if you prefer to just copy/paste the coordinate list
h2o = MoleculeConfiguration(xyz_format=
"""3
water
O 0.000 0.000 0.0
H 0.757 0.586 0.0
H -0.757 0.586 0.0""")
Note that the format must be that of a real XYZ file, with the two first lines specifying the number of atoms, and the comment/title. For more details, see the manual entry for the MolecularConfiguration class.
Exporting
It is of course also possible to export ATK structures to another formats.
|