Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Molecular Dynamics simulation of Zirconium

  1. Jun 9, 2010 #1
    I am trying to write a Fortran code to initialise the Cartesian coordinates for a MD simulation of a hcp crystal structure with periodic boundary conditions. Using orthogonal vectors for the unit cell, I have deduced the relative atomic positions as
    (0,0,0) (1/2,1/2,0) (1/2,1/6,1/2) (0,2/3,1/2). However, the code that I've attempted doesn't seem to work.

    p = 0 ! particle count/index
    Do i = 1,C1 ! C1 is no. of unit cells along x-axis
    Do j = 1,C2
    Do k = 1,C3
    p = p+1
    r(1,p) = i*a
    r(2,p) = j*b ! b is root 3 times a
    r(3,p) = k*c
    p = p+1
    r(1,p) = i*a + a/2
    r(2,p) = j*b + b/2
    r(3,p) = k*c
    p = p+1
    r(1,p) = i*a + a/2
    r(2,p) = j*b + b/6
    r(3,p) = k*c +c/2
    p = p+1
    r(1,p) = i*a
    r(2,p) = j*b + b*2/3
    r(3,p) = k*c + c/2
    End do
    End do
    End do
     
  2. jcsd
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted