O2 Molecule Bond Length Result is Incorrect

Queries about input and output files, running specific calculations, etc.


Moderators: Global Moderator, Moderator

Post Reply
Message
Author
chulho_lee
Newbie
Newbie
Posts: 1
Joined: Tue Jun 25, 2024 5:18 am

O2 Molecule Bond Length Result is Incorrect

#1 Post by chulho_lee » Fri Nov 15, 2024 2:42 am

Dear VASP developers,

Hello, I am a graduate student new to VASP.
I am working through the tutorial, specifically on the "Bond length of the O2 molecule" section.

This tutorial is about finding the stable bond length of an oxygen molecule.
As shown in the POSCAR below, one oxygen atom is set at the origin, and the other is 1.22 Å along the z-axis.

POSCAR

Code: Select all

O2 molecule in a box
 1.0          ! universal scaling parameters
 8.0 0.0 0.0  ! lattice vector  a(1)
 0.0 8.0 0.0  ! lattice vector  a(2)
 0.0 0.0 8.0  ! lattice vector  a(3)
2             ! number of atoms
cart          ! positions in cartesian coordinates
 0 0 0        ! first atom
 0 0 1.22     ! second atom:

The INCAR setup I used is below

INCAR

Code: Select all

 SYSTEM = O2 dimer in a box
 ISMEAR = 0 ! Gaussian smearing
 ISPIN  = 2 ! spin-polarized calculation
 NSW    = 5 ! 5 ionic steps
 IBRION = 2 ! use the conjugate-gradient algorithm

This should find the best bond length. But, when I ran the simulation, I got strange results.

My Results:

Code: Select all

O2
1.0000000000000000
8.0000000000000000 0.0000000000000000 0.0000000000000000
0.0000000000000000 8.0000000000000000 0.0000000000000000
0.0000000000000000 0.0000000000000000 8.0000000000000000
O
2
Direct
0.0000000000000000 0.0000000000000000 0.9990878682898270
0.0000000000000000 0.0000000000000000 0.1534121317101765

The second oxygen atom's position looks correct at about 1.224 Å.
But the first oxygen atom has moved from 0 Å to 8 Å, which seems incorrect.

This gives a bond length of 8 Å - 1.224 Å = 6.776 Å, which is much longer than expected.

The tutorial solution shows the first oxygen atom should be near the origin:

Tutorial Solution:

Code: Select all

O2
1.0
8.0000000000000000    0.0000000000000000    0.0000000000000000
0.0000000000000000    8.0000000000000000    0.0000000000000000
0.0000000000000000    0.0000000000000000    8.0000000000000000
O
2
Direct
0.0000000000000000    0.0000000000000000   -0.0009121317112740
0.0000000000000000    0.0000000000000000    0.1534121317112774

I don’t know what went wrong.
I followed the tutorial files exactly.
I searched the VASP forum to see if anyone else had experienced the same problem, but I couldn’t find anything.

I am attaching my INPUT and OUTPUT files.
Could you please help?

Thank you

You do not have the required permissions to view the files attached to this post.

leszek_nowakowski
Newbie
Newbie
Posts: 4
Joined: Fri Mar 15, 2024 10:35 am

Re: O2 Molecule Bond Length Result is Incorrect

#2 Post by leszek_nowakowski » Sun Nov 17, 2024 9:43 pm

Hello,

The POSCAR that You've shown has a cartesian coordinates, which is fine. But VASP always outputs in direct coordinates, e.g. in internal basis vectors coordinates.
Direct (also called fractional or internal) coordinates scales from 0 to 1, when 0 is the origin of the grid, and 1 is the opposite side.
Further reading of fractional coordinates: https://en.wikipedia.org/wiki/Fractional_coordinates
Also, please read the POSCAR wiki: https://www.vasp.at/wiki/index.php/POSCAR

So, in Your example, You have one oxygen atom almost it the center (0.999 is very close to 1, and 1 in fractional coordinates is the same as 0), and another one is 0.15..*8 A above, which is exactly 1.227 A, so the result is correct.

Be careful! If Your unit cell is not parallelopipe, it is not so easy to transfer to cartesian coordinates, it needs some basic algebra.

Last edited by leszek_nowakowski on Sun Nov 17, 2024 9:45 pm, edited 1 time in total.

xin_zhao
Newbie
Newbie
Posts: 2
Joined: Wed Nov 13, 2024 10:01 am

Re: O2 Molecule Bond Length Result is Incorrect

#3 Post by xin_zhao » Sun Nov 17, 2024 11:47 pm

VASP uses periodic boundary conditions when doing calculation. Under these conditions, atoms that differ by an integer number of lattice periodic coordinates are identical. For example, the positions specified by the fractional coordinates (0,0,0.9) and (0,0,-0.1) are identical. When calculating the spacing between atoms, especially those at the lattice boundaries, you need to take the periodicity into account.

It is also very easy to eliminate the periodicity. You only need to put the initial structure in the middle of the unit cell, that is, add (0.5,0.5,0.5) to your original atomic fractional coordinates. At this time, atoms will not cross the boundary, and the corresponding problem does not need to be considered.


Post Reply