How to code an array of FCC, BCC and HCP lattices in C++

Viewed 7460

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. FCC

A BCC Lattice BCC

A HCP Lattice. HCP

A standard three dimensional vector is essentially a SC Lattice: SC

The above are depictions of unit cells, the full lattices look like: Structures And for HCP: HCP structure

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.

1 Answers
Related