Fortran Fortran code for geometry of fcc

AI Thread Summary
The discussion revolves around the request for Fortran code to describe a face-centered cubic (fcc) lattice, including the identification of neighbors for each site and the implementation of periodic boundary conditions. The original poster seeks assistance in applying these conditions, particularly how to connect the topmost and lowest points of the lattice. They mention their approach to defining lattice points using translation vectors and calculating neighbor indices but express uncertainty about incorporating periodic conditions in all three dimensions (x, y, z). Participants emphasize the need for the requester to clarify their understanding of fcc lattices and suggest that sharing foundational resources could facilitate better assistance.
quin
Messages
50
Reaction score
0
Hi friends . is there anybody 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.
 
Technology news on Phys.org
quin said:
Hi friends . is there anybody 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.

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.
 
yes dear, you are right but i want to write a code for geometry of fcc and i wrote it but i don't 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 don't 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 :
n=i+j*L+k*L^2

and i can calculate the "n" of all of 12 neighbours of each site. but i don't know how use peridic condition in all of 3 direction of x,y,z?
 
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.
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I have a quick questions. I am going through a book on C programming on my own. Afterwards, I plan to go through something call data structures and algorithms on my own also in C. I also need to learn C++, Matlab and for personal interest Haskell. For the two topic of data structures and algorithms, I understand there are standard ones across all programming languages. After learning it through C, what would be the biggest issue when trying to implement the same data...

Similar threads

Replies
6
Views
2K
Replies
5
Views
2K
Replies
4
Views
2K
Replies
1
Views
3K
Replies
4
Views
2K
Replies
9
Views
15K
Back
Top