Re: [Phonopy-users] Perturbing unstable eigenvectors
Brought to you by:
atztogo
|
From: Atz T. <atz...@gm...> - 2010-06-09 20:34:14
|
Hi,
I could not understand the last sentences.
I wrote a test code.
#!/usr/bin/env python
import cmath
import numpy as np
e1 = np.array( [[ 0.00000000000002+0.00000000000000j,
-0.00731599853904+0.00456016340607j,
0.02993282731211-0.01865754661099j ],
[ 0.00674464613322+0.00933695488771j,
0.04383463752977+0.06068250654663j,
-0.03315809715831-0.04590243153068j ]] )
e2 = np.array( [[ 0.04054024698562+0.00000000000000j,
0.07416862338915-0.00000000000000j,
0.06111288873978+0.00000000000002j ],
[ 0.00235794096104+0.03452541334947j,
0.00160483918707+0.02349835606957j,
0.00176561624071+0.02585248381233j ]] )
r1 = np.array( [ 0.0049224323852215,
0.7284792155317277,
0.7444415176574495 ] )
r2 = np.array( [ 0.0051550247106746,
0.2492388749580883,
0.7453873834532558 ] )
q = [ 0, 0.5, 0.5 ]
print "Phase at atom1"
print cmath.phase( np.exp( 2j * np.pi * np.dot( q, r1 ) ) )
print
print "Phase at atom2"
print cmath.phase( np.exp( 2j * np.pi * np.dot( q, r2 ) ) )
print
print "Phase difference r2 - r1"
print cmath.phase( np.exp( 2j * np.pi * np.dot( q, r2 - r1 ) ) )
print
print "Phase of e1 of atom1"
for x in e1[0]:
print cmath.phase(x)
print
print "Phase of e1 of atom2"
for x in e1[1]:
print cmath.phase(x)
print
print "Phase of e2 of atom1"
for x in e2[0]:
print cmath.phase(x)
print
print "Phase of e2 of atom2"
for x in e2[1]:
print cmath.phase(x)
Then the results are:
Phase at atom1
-1.65586835247
Phase at atom2
3.12471054649
Phase difference r2 - r1
-1.50260640821
Phase of e1 of atom1
0.0
2.58420675086
-0.557385902728
Phase of e1 of atom2
0.945220505487
0.945220505486
-2.1963721481
Phase of e2 of atom1
0.0
0.0
3.27263207687e-13
Phase of e2 of atom2
1.50260640822
1.50260640822
1.50260640821
The arguments are same in e1 of atom1, e1 of atom2, e2 of atom1, e2 of
atom2, respectively.
The phase difference between e1 and e2 are equivalent to the phase
difference of r2 and r1.
They are synchronized. The atoms in neighboring cells are OK because
phase difference is 0 or pi.
So for me, exp(2 * i * pi * (q . (rj-ro))) works fine.
Togo
On Wed, Jun 9, 2010 at 9:19 PM, Tim Mueller <tk...@mi...> wrote:
>
> For simplicity, I'll limit the example to two nitrogen atoms in a single
> unit cell. The cell vectors are:
>
> 15.2682821443268004 5.0608797202809503 0.0000000000000000
> 0.0000000000000000 5.0608797202809503 5.0736809633102506
> 0.0000000000000000 -5.0608797202809503 5.0736809633102506
>
> And the atomic positions (in reduced coordinates) are
>
> 0.0049224323852215 0.7284792155317277 0.7444415176574495
> 0.0051550247106746 0.2492388749580883 0.7453873834532558
>
> Both eigenvectors are at q = {0, 0.5, 0.5}.
>
> Eigenvector 1
> - # atom 1
> - [ 0.00000000000002, 0.00000000000000 ]
> - [ -0.00731599853904, 0.00456016340607 ]
> - [ 0.02993282731211, -0.01865754661099 ]
> - # atom 2
> - [ 0.00674464613322, 0.00933695488771 ]
> - [ 0.04383463752977, 0.06068250654663 ]
> - [ -0.03315809715831, -0.04590243153068 ]
>
> Eigenvector 2
> - # atom 1
> - [ 0.04054024698562, 0.00000000000000 ]
> - [ 0.07416862338915, -0.00000000000000 ]
> - [ 0.06111288873978, 0.00000000000002 ]
> - # atom 2
> - [ 0.00235794096104, 0.03452541334947 ]
> - [ 0.00160483918707, 0.02349835606957 ]
> - [ 0.00176561624071, 0.02585248381233 ]
>
> I have noticed that the x-value for the first atom is always real for all
> eigenvectors.
>
> The calculated perturbations are (in direct coordinates, in the format
> real:imaginary)
>
> Eigenvector 1
> atom 1
> [ 3.112366436743477E-4, 3.4233212304762397E-19 ]
> [ 0.0012405566164740995, -7.182599932451755E-13 ]
> [ 6.12726796579209E-6, -1.1892071478294953E-12 ]
> atom 2
> [ 2.1283155967655198E-4, -3.4817588977144754E-13 ]
> [ 4.2877847176448365E-4, -1.2617526449110357E-13 ]
> [ 1.6198341908329661E-4, 3.2950270557028944E-12 ]
>
> Eigenvector 2
> atom 1
> [ -1.6619897760245916E-12, -1.82803824701711E-27 ]
> [ 2.5652939078983205E-4, -1.345420763263826E-4 ]
> [ 4.2462233455171867E-4, -2.2270184674949242E-4 ]
> atom 2
> [ 1.2433864326331006E-4, -6.52119388802525E-5 ]
> [ 4.506971157670636E-5, -2.363773097428757E-5 ]
> [ -0.0011765484061515312, 6.17064815734937E-4 ]
>
> All of the perturbations are real for eigenvector 1. For eigenvector 2, the
> perturbation for atom 1 in the a direction is real (and nearly zero), and
> all others are complex, but can be made real by multiplication by a constant
> phase factor (proportional to approximately 2.5652 + 1.3454i). When there
> are more atoms, their perturbations are also complex and need to be
> multiplied by the same phase factor.
>
> I hope this is clear.
>
> Tim
>
> On 6/8/2010 1:53 PM, Atz Togo wrote:
>
> Hi,
>
> I want to understand more in detail. Could you demonstrate some
> example using numerical values?
>
> Togo
>
>
> On Tue, Jun 8, 2010 at 7:36 PM, Tim Mueller <tk...@mi...> wrote:
>
>
> Thank you for your quick reply. I think we're getting closer to figuring
> this out.
>
> The unstable eigenvector that produces a real-valued perturbation only does
> so if I set ro (the position of the first atom in the POSCAR file) as the
> origin.
>
> The other unstable eigenvector yields a perturbation that, when multiplied
> by a special phase factor, becomes real for almost every coordinate. The
> only coordinate that does not require this phase factor is the a-coordinate
> of the first atom in the cell. When I apply the special phase factor, the
> perturbation for this atom, which was originally real, becomes complex.
>
> I noticed that for every eigenvector in mesh.yaml, the value for the
> x-coordinate of the first atom in the cell is always real. Is it possible
> that a phase factor is somehow being applied to this coordinate, but no
> others?
>
> Tim
>
> On 6/8/2010 9:32 AM, Atz Togo wrote:
>
> Hi,
>
> Yes, you are right. It's not prepared!
> As you wrote, all displacements have to be real simultaneously in the
> correct supercell.
> What you did is correct. I don't know why it didn't work well.
>
> There is arbitrary phase factor multiplied to each set of
> eigenvectors, which is probably determined by lapack (I don't
> understand this well). So the arguments of complex values should be
> same after multiplying the phase factor you wrote, exp(2 * i * pi * (q
> . (rj-ro))), or maybe exp(2 * i * pi * (q . rj)) [ rj is the reduced
> atomic position in the unit cell. ]
>
> An other way is following.
> Because you have supercell force constants, it is easy to use the
> eigenvectors calculated for the supercell (not the unit cell) at
> Gamma. Phase factor is not needed.
> Then using numpy functions, the implementation would be easy, which may be
> like:
>
> positions = supercell.get_scaled_positions()
> displaced_positions = positions + np.dot( abs( eigenvectors_at_gamma
> ), np.linalg.inv( supercell.get_cell() ) ) / np.sqrt(
> supercell.get_masses() )
>
>
> The format of eigenvector is not written in document.
> I write the information here shortly, and will prepare the document.
>
> - The eigenvectors in yaml files are in Cartesian coordinates, and
> correspond to polarization vectors.
> - The values have to be divided by square root of atomic mass.
> - Amplitude is chosen arbitrary.
>
> Cheers!
>
> Togo
>
> On Tue, Jun 8, 2010 at 6:03 AM, Tim Mueller <tk...@mi...> wrote:
>
>
> I have a material with two unstable modes at q = {0, 0.5, 0.5}, and I would
> like to perturb the atomic positions along these modes and re-relax the
> perturbed supercell. From what I can tell, there is no way to do this
> automatically in Phonopy (please correct me if I'm wrong!), so I'm trying to
> write my own code to do it.
>
> I have extracted the eigenvectors for the unstable modes from mesh.yaml.
> The format of the eigenvectors appears to be:
>
> - # atom 1
> - [ real displacement in a direction, imaginary displacement in a
> direction ]
> - [ real displacement in b direction, imaginary displacement in b
> direction ]
> - [ real displacement in c direction, imaginary displacement in c
> direction ]
> - # atom 2
> ...
>
> To transform this into a real perturbation, I calculate the Bloch phase
> factor for each atom in the supercell as:
>
> exp(2 * i * pi * (q . (rj-ro)))
>
> where rj are the reduced coordinates for the jth atom and ro are the reduced
> coordinates for the first atom in the POSCAR file.
>
> I then calculate the perturbation for each atom as the phase factor times
> the appropriate component of the eigenvector.
>
> I believe the resulting perturbations should be real. The perturbations are
> real for all atoms for the first unstable mode, but I get complex
> perturbations for all atoms in the second unstable mode. Does anyone know
> why this might be?
>
> Thanks,
> Tim
>
>
>
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit. See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> Phonopy-users mailing list
> Pho...@li...
> https://lists.sourceforge.net/lists/listinfo/phonopy-users
>
>
>
>
>
>
>
>
--
Atsushi Togo
http://atztogo.users.sourceforge.net/
atz...@gm...
|