The NanoLanguage scripting environment
Simply speaking, NanoLanguage is a means of communication. On the surface, NanoLanguage is the input format which allows you to interact with the quantum-chemical models implemented in Atomistix ToolKit. But NanoLanguage is so much more.
NanoLanguage is a new way of thinking scientific computing and nothing but a shift in paradigm. Built on top of Python, one of the most popular programming and scripting languages, NanoLanguage combines the power of atomic-scale modeling techniques with the flexibility of a high-level object-oriented programming language.
NanoLanguage offers:
§ Transparency and control of the different parts of the simulation
§ Flexibility and modularization
§ Extended functionality with user-defined functions and classes
A NanoLanguage script is just a Python program. Take a look at the script in figure 1. These few lines define a water molecule and determine its energy.
NanoLanguage includes concepts and objects relevant to quantum physics and chemistry:
§ Functions for DFT and transport calculations
§ Constructors of atomic geometries
§ A unit system and a periodic table
In addition, NanoLanguage contains all the features available in Python:
§ Basic elements like loops over simulation control parameters
§ Manipulation of data arrays (the NumPy package)
§ Mathematical functions
§ Classes and objects
§ Dynamical type-checking and name resolution
Python’s syntax, similar to languages like C, is surprisingly easy to learn. The intuitive indentation scheme highlights the structure of the script.
Build new functionality into your scripts by extending NanoLanguage with your own functions and classes. It is straightforward to:
§ Check the convergence with respect to the mesh cut-off, the basis set size, and
other parameters
§ Solve the same problem with different methods or parameters to evaluate the
efficiency and/or accuracy
§ Investigate the properties of a system as a function of internal geometric
parameters like interatomic distances and angles