Importing and exporting your molecule#

Importing your molecule#

Importing from file: .ams, .t21, .xyz, .mol, .mol2, .pdb, .runkf, .adf, .band, .cif, .dmol, .rkf, .rxi, .rxkf …

Use File → Import Coordinates (System) → From File(s)… to import structures from files.

Many formats are handled explicitly. They are typically recognized by the file extension:

.ams, .band, .rxi

These files have been saved by AMSinput, BANDinput or ReaxFFinput. Every detail belonging to atoms or bonds will be imported: not only the coordinates and bonds, but also things like atom properties (for example the color, the force field atom type, number of connectors, bond orders, and so on).

.t21, .runkf, .rxkf, .rkf

These are all results files produced by the ADF package. The coordinates and bond information will be read, if present. The files are binary, and will be recognized even if having a different extension.

.pdb, .mol2

Importing from a .pdb or .mol2 file will get the coordinates and the protein information (residues, PDB atom names and so on). For PDB files, only the ATOM information is read, thus no bond information. For MOL2 files, also the bond information is read.

.mol

Importing from a .mol file will get the coordinates and bond information.

.cif

Importing from a .cif file (Crystallographic Information File) will import the proper crystal structure. No bonds will be read.

.dmol

Files from the DMol program can also be read, and atom positions and periodic information is properly handled. No bond information will be read.

.xyz, any file type not recognized

Importing from an unknown text file, or a file with .xyz extension is rather flexible: AMSinput needs three real numbers next to each other. These will be interpreted as x, y and z coordinate. One additional integer or the abbreviation of an element is also needed to identify the kind of atom.

To be recognized as real, the real number must contain a ‘.’ (dot), and at least one digit before or after the dot. Real numbers with exponents (E or D) are not recognized.

If an integer is used to specify the element (the nuclear charge), it may not contain a ‘.’ (dot).

No bond information is read.

If no bond information has been read, AMSinput tries to guess the bonds between the imported atoms. Guessed bonds might be completely wrong, or have the wrong bond order.

Z-matrix import (internal coordinates) is not available.

After import, the newly imported atoms are selected. You can reposition them relative to existing atoms or edit the guessed bonds.

If you are importing many atoms, the molecule visualization will switch to wire-frame for the newly imported atoms. By default this happens when importing 50 atoms or more. You can change this limit via the SCM → Preferences.

Copy/Paste between GUI modules, XYZ coordinates, SMILES or InChI strings#

When Copying or Pasting with AMSinput, you need to make sure that the molecule editor has focus. Otherwise you will be copying or pasting one of the text input fields. To be sure, just click once in the drawing area before pasting.

You can copy an XYZ-formatted geometry (for example from an ADF output file), and use the Edit → Paste command to import coordinates. Pasted text will be handled as when it had been import as .xyz or .cif file via the Import Coordinates command.

Copy/Paste also works between the GUI modules, for example if you have several AMSinput windows. This will copy all information about your molecule: xyz, bonds, but also things like color of atoms or number of connectors. Only selected atoms will be copied.

If you have the SMILES or InChI string of your molecule on your clipboard (for example, from wikipedia) you can just paste it in AMSinput. It will automatically be converted to a 3D structure (via OpenBabel). It works often, not always, so be sure to check your structure.

Exporting coordinates#

Choose a format from File → Export Coordinates (System). AMSinput offers .xyz, .mol, .mol2, .pdb, .sdf, .cif, .bgf, .poscar, .dmol, AMS .in system blocks, and Z-Matrix… for internal coordinates. The Via ASE submenu offers additional formats, including extended XYZ and ASE trajectories.

Starting with AMS2027, when several molecule tabs contain atoms, AMSinput asks Which molecules?. Choose Current to export the active tab or All to export every tab that contains atoms.

  • For formats that support multiple structures, choose a file name. The direct .xyz, .mol2, .sdf, .cif, .bgf, and .in commands can write all structures to one file. Multi-structure .xyz uses extended XYZ.

  • For formats that store one structure per file, choose a folder when exporting several structures. AMSinput names the files from the molecule tabs and adds a numeric suffix to avoid overwriting existing files.

Edit → Copy copies the selected atoms to the clipboard. The plain-text clipboard data includes any lattice vectors as VEC1, VEC2, and VEC3 entries.