# [Pw_forum] Alpha-Beta-Gamma Angles after a VC-relaxation

Paolo Giannozzi p.giannozzi at gmail.com
Wed May 6 14:35:45 CEST 2015

```Maybe the question was about the definition of such matrix (since it is not
symmetric, it is a legitimate question). The three rows are the cartesian
coordinates of the three primitive vectors of the lattice. The following
piece of code I wrote some time ago should convert from lattice vectors to
crystalographic parameters (no warranty)

Paolo

subroutine cell2abc ( alat, at, a,b,c,cosab,cosac,cosbc )
!
!  returns crystallographic parameters a,b,c from lattice vectors
!
USE kind, ONLY: dp
IMPLICIT NONE
!
REAL(DP), INTENT (IN) :: alat, at(3,3)
REAL(DP), INTENT (OUT) :: a,b,c, cosab, cosac, cosbc
REAL(DP) :: norm1, norm2, norm3
!
!
norm1 = SQRT ( at(1,1)**2 + at(2,1)**2 + at(3,1)**2 )
norm2 = SQRT ( at(1,2)**2 + at(2,2)**2 + at(3,2)**2 )
norm3 = SQRT ( at(1,3)**2 + at(2,3)**2 + at(3,3)**2 )
!
a = alat * norm1 / bohr_radius_angs
b = alat * norm2 / bohr_radius_angs
c = alat * norm3 / bohr_radius_angs
!
cosab = (at(1,1)*at(1,2) + at(2,1)*at(2,2) + at(3,1)*at(3,2))/norm1/norm2
cosac = (at(1,1)*at(1,3) + at(2,1)*at(2,3) + at(3,1)*at(3,3))/norm1/norm3
cosbc = (at(1,3)*at(1,2) + at(2,3)*at(2,2) + at(3,3)*at(3,2))/norm3/norm2

!
END SUBROUTINE cell2abc

Paolo

On Wed, May 6, 2015 at 2:25 PM, Giuseppe Mattioli <
giuseppe.mattioli at ism.cnr.it> wrote:

>
> Dear Francesco
>
> > CELL_PARAMETERS (alat=  9.37304158)
> > *_0.998026269_*   0.000004734  -0.013893833
> >     0.000009261 _*1.956757114*_ -0.000006827
> >    -0.117999199  -0.000006751 *_1.878825464_*
>
> This is a matrix containing the projections of the optimized lattice
> parameters on the cartesian axes in alat units (alat=9.37304158 bohr). If
> you
> want your alpha-beta-gamma angles you can calculate them. If you are lazy
> (I usually am with nonorthogonal cells...) you may open the pw.x output with
> xcrysden and figure out the values with the angle-measurement tool.
>
> HTH
> Giuseppe
>
> On Wednesday, May 06, 2015 12:41:09 PM Francesco Pelizza wrote:
> > Hi to everyone,
> >
> > I am sorry to bother for such a simple question, but I need to be sure
> > about what QE is giving me in the OUTPUT file.
> >
> > After a VC-relaxation on a cell with angles with one or more of alpha
> > beta gamma angles different from 90°, the VC-relaxation OUTPUT file
> > gives out this:
> >
> > CELL_PARAMETERS (alat=  9.37304158)
> > *_0.998026269_*   0.000004734  -0.013893833
> >     0.000009261 _*1.956757114*_ -0.000006827
> >    -0.117999199  -0.000006751 *_1.878825464_*
> >
> > The Bold and underlined values are the new Alat, Blat and Clat factor to
> > multiplicate the old alat given, to have the new cell dimension in bohrs.
> >
> > But I guess the other numbers are giving me the alpha beta and gamma
> > angles (celldm 4-5-6)....
> >
> > But who is who?
> >
> > Thank you very much for reading!
> >
> > Francesco Pelizza
>
> ********************************************************
> - Article premier - Les hommes naissent et demeurent
> libres et ègaux en droits. Les distinctions sociales
> ne peuvent être fondèes que sur l'utilitè commune
> - Article 2 - Le but de toute association politique
> est la conservation des droits naturels et
> imprescriptibles de l'homme. Ces droits sont la libertè,
> la propriètè, la sùretè et la rèsistance à l'oppression.
> ********************************************************
>
>    Giuseppe Mattioli
>    CNR - ISTITUTO DI STRUTTURA DELLA MATERIA
>    v. Salaria Km 29,300 - C.P. 10
>    I 00015 - Monterotondo Stazione (RM), Italy
>    Tel + 39 06 90672836 - Fax +39 06 90672316
>    E-mail: <giuseppe.mattioli at ism.cnr.it>
>    http://www.ism.cnr.it/english/staff/mattiolig
>    ResearcherID: F-6308-2012
>
> _______________________________________________
> Pw_forum mailing list
> Pw_forum at pwscf.org
> http://pwscf.org/mailman/listinfo/pw_forum
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quantum-espresso.org/pipermail/users/attachments/20150506/23f0f593/attachment.html>
```