How could these structures be represented in an array or vector while still maintaining the lengths between atoms in C++?
I would like to construct a three dimensional vector to represent the configuration of:
An FCC Lattice.
A BCC Lattice
A HCP Lattice.
A standard three dimensional vector is essentially a SC Lattice:
The above are depictions of unit cells, the full lattices look like: And for HCP:
The reasons behind it is to more accurately represent the crystal structure of a material using an Ising Model. I would like the lattice to preserve lengths in order to give an accurate calculation of the exchange constant.
BCC is two SC lattices offset from each other. HCP is an SC lattice skewed.
You'll simply take the crystal structure into account for length calculations. Trying to make indices or memory address correspond to length is an exercise in futility. Just have a mapping function from indices to length.