chaithanyak4796 / graphlammps

A python based library for pre and post processing of files for LAMMPS simulations of gas-surface interactions.
MIT License
5 stars 2 forks source link

Bug in creating graphene sheets with ortho box #5

Open chaithanyak4796 opened 1 year ago

chaithanyak4796 commented 1 year ago

While creating a graphene sheet, the number of atoms per cell is not adjusted to 2. The system created is still graphene, but the number of atoms does not correspond to the expected number.

The fix should be easy. The same steps taken in non-ortho case should be applicable here.

chaithanyak4796 commented 1 year ago

After reviewing the code, I realized I'd used a particular convention. So this is not a bug, but a choice. The convention was to build a graphite structure as a sequence of graphene layers.

Non-orthogonal box

  1. The unit cell for graphite consists of 2 graphene layers. Therefore, in order to build the graphene sheet, one of these layers is "turned off"
  2. Therefore the number of atoms/unit cell are 4 for graphite and 2 for graphene.

Orthogonal box

  1. The unit cell is planar. I chose the same unit cell for graphene and graphite.
  2. Therefore the number of atoms/unit cell is 4 for graphene and graphite.

This discrepancy in the way the unit cell is treated for graphene might cause some confusion. It might make more sense to either clarify this with a warning or to fix it in create.py.