LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] How to convert a triclinic simulation box into cubic
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] How to convert a triclinic simulation box into cubic


From: Axel Kohlmeyer <akohlmey@...24...>
Date: Wed, 1 Nov 2017 18:01:41 -0400



On Wed, Nov 1, 2017 at 12:55 PM, Khourshaei Shar, Ali <akhoursh@...6666...> wrote:

Dear LAMMPS users,

Hi,


Actually I'm a bit confused. In the following link which is manual of LAMMPS it says that " If the simulation box is currently triclinic and has non-zero tilt in xy, yz, or xz, then it cannot be converted to an orthogonal box ". 

http://lammps.sandia.gov/doc/change_box.html

On the other hand, some peopole on this forms suggested to use change_box command. What should I do ?! By the way, I have a triclinic simulation box and I should convert it into a cubic before doing my simulations.


​actually, what i recommended you to do is to build a supercell and *before* even LAMMPS gets involved.
what you are asking for and the procedure is not very smart. LAMMPS will not do the thinking for you.
there is no "magic" command (or sequence of commands) that will do what you need to do without you actually thinking and figuring out the process of what supercell you need.

  /--------/
 /​        /
/        /

i
​f you have a cell like shown above, then you need to replicate 3x in y direction. so that the periodicity for an orthogonal box with the same area matches that of the tilted box.

        /--------/
       /​        /
      /        / 
     /--------/
    /​        /
   /        /
  /--------/
 /​        /
/        /
        /--------/
       /​ 
​    ​
    /

      /        / 
     /--------/
    /​        /
   /        /
  /--------/
 /​        /
/        /

now you can wrap your coordinates back into an orthogonal box and the structure will fit properly. NOTE: this is *wrapping* the coordinates, not moving/deforming box and coordinates. you received these bad suggestions because of the very bad and incomplete description of your problem.

|--------|
|​        |
|        |
|--------|
|​        |
|        |
|--------|
|​        |
|        |
if you insist on (near) cubic, you can replicate in x as well.

this is easy to work out with a pencil, a piece of paper, an some thinking. it probably can also be done by using LAMMPS smartly, but unless you have worked out all the steps i already explained before, you'll never succeed. it is easier to do with some scripting outside of LAMMPS.

at any rate, this is basic geometry stuff and i feel a little embarrassed to have to explain this at this level of detail.

​axel.​



 

Sincerely,

Ali




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
lammps-users mailing list
lammps-users@...6297....sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lammps-users




--
Dr. Axel Kohlmeyer  akohlmey@...24...  http://goo.gl/1wk0
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.