ovilab / atomify

Atomify - a realtime LAMMPS visualizer
GNU General Public License v3.0
151 stars 21 forks source link

LAMMPS system might not have (0,0,0) as origo, system box is then moved #199

Closed andeplane closed 8 years ago

andeplane commented 8 years ago

System has a property origin that we can use to translate everything.

andeplane commented 8 years ago

This is actually solved because we displace it before uploading VBO:

m_atomData.positions[i][0] = position[0] - (lammps->domain->boxlo[0] + lammps->domain->prd_half[0]);
m_atomData.positions[i][1] = position[1] - (lammps->domain->boxlo[1] + lammps->domain->prd_half[1]);
m_atomData.positions[i][2] = position[2] - (lammps->domain->boxlo[2] + lammps->domain->prd_half[2]);