title: How to code an array of FCC, BCC and HCP lattices in C++
body: <p>How could these structures be represented in an array or vector while still maintaining the lengths between atoms in C++?</p>
  
  <p>I would like to construct a three dimensional vector to represent the configuration of:</p>
  
  <p>An FCC Lattice.
  <img src="https://i.stack.imgur.com/rebPC.png" alt="FCC"></p>
  
  <p>A BCC Lattice
  <img src="https://i.stack.imgur.com/MrFoN.png" alt="BCC"></p>
  
  <p>A HCP Lattice.
  <img src="https://i.stack.imgur.com/bxtxv.png" alt="HCP"></p>
  
  <p>A standard three dimensional vector is essentially a SC Lattice:
  <img src="https://i.stack.imgur.com/62cBK.png" alt="SC"></p>
  
  <p>The above are depictions of unit cells, the full lattices look like: 
  <img src="https://i.stack.imgur.com/uvwHn.jpg" alt="Structures">
  And for HCP:
  <img src="https://i.stack.imgur.com/2w1MB.jpg" alt="HCP structure"></p>
  
  <p>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.</p>