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

Fortran code for geometry of fcc

  1. Oct 23, 2012 #1
    Hi friends . is there any body here who can give me a fortran code for describing fcc lattice and give us the neighbours of each site and also which pay attention to periodic condition ?
    thank you for your help my friends.
  2. jcsd
  3. Oct 23, 2012 #2


    Staff: Mentor

    I'll say the same thing I said in response to your other post: What have you tried? We are not going to write the code for you, if that's what you had in mind.
  4. Oct 23, 2012 #3
    yes dear, you are right but i wanna write a code for geometry of fcc and i wrote it but i dont know how can i apply periodic boundary condition on for cubic? i mean i must connect the topest point to lowest point of lattice i dont know how can i show this?

    but i supposed that each site has 12 neighbours and if take an array like this for nearest neighbours :
    (number of neighber ,number of site )
    foe example: (3,4) shows the third neughbour of 4th spin,
    and then try to fill it, i used this way :

    if i show each point of fcc with n=i*a1 + j*a2 + k*a3 in which, a1 ,a2, a3 are translation vector , then i ,j ,z are integer numbers
    then the cubic dimension is L*L*L and each site of lattice can be shown by :

    and i can calculate the "n" of all of 12 neighbours of each site. but i dont know how use peridic condition in all of 3 direction of x,y,z?
  5. Oct 23, 2012 #4


    Staff: Mentor

    Many of us here probably don't know what "fcc lattice" is, so if you can point us to something that describes it, we might be able to help.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Discussions: Fortran code for geometry of fcc
  1. Running a Fortran code (Replies: 4)

  2. Help with fortran code (Replies: 17)

  3. Help with fortran code (Replies: 4)