Hi Togo, Albert, On Tue, Mar 27, 2012 at 11:01 PM, Atz Togo <[email protected]> wrote: > On Wed, Mar 28, 2012 at 1:41 AM, David Lonie <[email protected]> wrote: >> Interesting -- It sounds like refine cell may be converting the >> primitive cell back to a conventional cell? > > Yes. It reduces to a conventional unit cell. A primitive lattice of a > conventional unit cell that has centring can be obtained by > multiplying a transformation matrix that is referred to the > International table of crystallography vol. A. Furthermore, when using > spg_refine_cell, the crystallographic axes are redefined in Cartesian > coordinates. So if the lattice vectors are stored in a 3x3 matrix in > Cartesian coordinates, they may be re-oriented. This re-orientation > does not happen in spg_find_primitive.
It's good to hear from you again -- thank you for the clarification. As the author of spglib, your guidance here is very useful. The current reduceToPrimitive function is here: http://github.com/dlonie/avogadro/blob/master/libavogadro/src/extensions/crystallography/avospglib.cpp#L226 What it does is: (1) Determine the spacegroup of the cell with spg_get_international (2) Clean up the structure with spg_refine_cell (3) Reduce the cell to it's primitive representation with spg_find_primitive (4) Update the molecule with the new cell matrix and coordinates The coordinates, lattice matrix, etc are kept in the same arrays throughout the process, so if refine_cell is changing the orientation, it should not matter since the reoriented matrix and refined coordinates are passed to the find_primitive function. I cannot see how calling the refine_cell function before the reduction would break the behavior, but I may be missing something. As a side note, I've recently started using your phonopy software after giving up a fight with PHON (it wouldn't recognize the symmetry, and doesn't seem to have an adjustable tolerance...). Phonopy is a wonderful tool, and I'm especially impressed by the matplotlib integration. I've been recommending it to my coworkers -- keep up the good work! :-) Dave ------------------------------------------------------------------------------ This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure _______________________________________________ Avogadro-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/avogadro-devel
