Table of Contents
The following example illustrates how to setup a Nudged Elastic Bands calculation with VASP using the VASP Scripter.
The example you will consider is the adsorption of a hydrogen molecule on a Si (100) 2x1 surface. The geometry can be built in a few easy steps with the Builder, which are are presented in a separate tutorial. Below is provided a ready version as a script, with hydrogen atoms added on the surface.
Start the Builder from the VNL main window.
Download and save the script (si100-2x1.py).
# Set up lattice
vector_a = [7.68, 0.00, 0.00]*Angstrom
vector_b = [0.00, 3.84, 0.00]*Angstrom
vector_c = [0.00, 0.00, 21.00]*Angstrom
lattice = UnitCell(vector_a, vector_b, vector_c)
# Define elements
elements = [Hydrogen, Hydrogen, Hydrogen, Hydrogen, Silicon, Silicon, Silicon,
Silicon, Silicon, Silicon, Silicon, Silicon, Silicon, Silicon,
Silicon, Silicon, Silicon, Silicon, Silicon, Silicon, Hydrogen,
Hydrogen]
# Define coordinates
cartesian_coordinates = [[ 3.48401409, 0.96500704, 0.503 ],
[ 1.06801409, 0.96500704, 0.503 ],
[ 7.32401409, 0.96500704, 0.503 ],
[ 4.90801409, 0.96500704, 0.503 ],
[ 2.27601409, 0.96500704, 1.358 ],
[ 6.11601409, 0.96500704, 1.358 ],
[ 2.27601409, 2.88500704, 2.715 ],
[ 6.11601409, 2.88500704, 2.715 ],
[ 0.35601409, 2.88500704, 4.073 ],
[ 4.19601409, 2.88500704, 4.073 ],
[ 0.35801409, 0.96400704, 5.417 ],
[ 4.27001409, 0.96400704, 5.423 ],
[ 2.31401409, 0.95900704, 6.683 ],
[ 6.16401409, 0.95800704, 6.856 ],
[ 2.32301409, 2.87900704, 7.997 ],
[ 6.17701409, 2.87800704, 8.252 ],
[ 0.52501409, 2.87600704, 9.499 ],
[ 4.14501409, 2.87700704, 9.469 ],
[ 1.15701409, 0.95500704, 10.705 ],
[ 3.55201409, 0.95700704, 10.686 ],
[ 0.63801409, 0.95900704, 12.12 ],
[ 4.12201409, 0.96100704, 12.082 ]]*Angstrom
# Set up configuration
bulk_configuration = BulkConfiguration(
bravais_lattice=lattice,
elements=elements,
cartesian_coordinates=cartesian_coordinates
)
To the left of the Stash in the Builder are a few buttons.
Click Add → From Files...
and import the file si100-2x1.py using the file browser.
|
|
Tip |
|---|---|
|
Alternatively, you can highlight the script text above and just drag and drop the text directly onto the Builder window. |
Select the inserted configuration and press the Copy button. This adds a copy of the configuration to the Stash. The new configuration is now the active configuration.
Next select the two upper hydrogen atoms (those on the bottom are just to passivate the inactive surface) by holding down Ctrl while clicking on them with the left mouse button.
Open the Translate tool in the tool panel on the right. Set the z-distance to 3 Ångström and press "Apply".
Next open the Edit Z-matrix tool (also on the tool panel). Set the distance between the hydrogen atoms to 0.7 Ångström - corresponding to a free hydrogen molecule - and press Enter. Note that the last selected atom moves, while the first remains fixed.
You have now defined the initial and final states of the reaction path. The next step is to set up the NEB configuration by inserting a number of images between these states.
To this end, open the Create Nudged Elastic Band tool under Builders in the right-hand panel.
Drag the two configurations into the "Initial" and "Final" boxes.
For this system the linear interpolation method works fine for generating the initial path, but for more complex situations the tool also offers advanced methods like the BC (bond conservation) method.
Set the maximum distance between images to 0.5 Ångström.
Press the Create NEB button.
The NEB object will now be built and added to the Stash. Push the Play button to see the different initial configurations in the reaction pathway.
To set up the a NEB calculation with VASP, open the VASP Scripter. Then drag the NEB configuration from the Stash onto the VASP Scripter.
Set up the appropriate calculation parameters on each tab.
When you are done, select the directory where the NEB calculation should be saved and
press "Save"
.
You are now ready to perform the NEB optimization using VASP.