Hello LAMMPS users/developers,
I was looking through the code for the fix npt/etc. style and came across the line which sets the default value for fixedpoint. According to the documentation, this point should be the center of the cell
“The fixedpoint keyword specifies the fixed point for barostat volume changes. By default, it is the center of the box”
This is from the most recent version on github as of yesterday 9/20/14.
fix_nh.cpp: 94-96
fixedpoint[0] = 0.5*(domain->boxlo[0]+domain->boxhi[0]);
fixedpoint[1] = 0.5*(domain->boxlo[1]+domain->boxhi[1]);
fixedpoint[2] = 0.5*(domain->boxlo[2]+domain->boxhi[2]);
I believe that this won’t be the center of a triclinic box. I think the following might make more sense just in case anyone is relying on the description of the default behavior:
fixedpoint[0] = 0.5*(domain->boxlo[0]+domain->boxhi[0]+domain->xz+domain->xy);
fixedpoint[1] = 0.5*(domain->boxlo[1]+domain->boxhi[1]+domain->yz);
fixedpoint[2] = 0.5*(domain->boxlo[2]+domain->boxhi[2]);
Or, if the tilt factors are not well-defined for orthogonal boxes, there could be a separate case for triclinic and orthogonal.
Please let me know if this makes sense or if I am missing something.
Thanks,
-David