Re: [Phonopy-users] freq vs q-distance as a table
Brought to you by:
atztogo
|
From: Iyad AL-Q. <iy...@gm...> - 2012-10-12 00:22:54
|
Dear Dr. Togo,
Using Phonopy-1.5 gives points, distances, frequencies, and polarization
vectors as a tuple.
How can I get the frequencies and polarization vectors as array, so I can
define each frequency by two indices, one for q number ( let us say i) and
the other for branch number ( let us say j), such that freq[i][j], That is,
in similar way to older versions. I need that so I can make direct
comparison with measured data or calculating differences.
Indeed, I highly apprecatie and aknowldge the new modiications and updates
in the latest version of phonopy.
Thanks a lot,
IYAD
On Wed, Oct 3, 2012 at 11:47 PM, Atsushi Togo <atz...@gm...> wrote:
> Hi,
>
> I'm sorry for that I didn't mention in detail about it. Currently,
> get_band_structure is defined as follows:
>
> def get_band_structure(self):
> band = self._band_structure
> return (band.get_qpoints(),
> band.get_distances(),
> band.get_frequencies(),
> band.get_eigenvectors())
>
> So, you would obtain a list (tuple) of qpoints, distances,
> frequencies, eigenvectors.
> Now each element of this list is a set of quantities of band segments.
> The unit conversion factor is multiplied in the phonopy module.
> VasptoTHz is the default value of it, so you don't need to multiply by
> yourself if your unit conversion factor is this.
>
> An example of code script is shown below.
>
> bands = phonon.get_band_structure()
> distances = bands[1]
> frequencies = bands[2]
> qpoints = bands[0]
> for (qs_at_segments,
> dists_at_segments,
> freqs_at_segments) in zip(qpoints, distances, frequencies):
>
> for q, d, f in zip(qs_at_segments,
> dists_at_segments,
> freqs_at_segments):
> print "# %f %f %f" % tuple(q)
> print d, ("%f " * len(f)) % tuple(f)
>
> I attach an example for workable with example/Al2O3, too.
>
> Togo
>
>
> On Thu, Oct 4, 2012 at 4:40 AM, Iyad AL-QASIR <iy...@gm...> wrote:
> > Dear Phonopy Users,
> >
> > Moving from Phonpy-1.3 to Phonopy-1.5 some changes ( toward better) have
> > been made.
> >
> > I am using mainly phonopy as a python module. In my *.py file to get the
> > phonon dispersions ( Freq vs q-distance), I had this part of code do that
> > (Thanks to A. Togo he helped in that),
> >
> > phonon.set_band_structure(bands,is_eigenvectors=True)
> > dispersion=phonon.get_band_structure()
> > phonon.write_yaml_band_structure()
> > distances=dispersion[0]
> > eigenvalues=dispersion[2]
> > for eigs_at_index in eigenvalues.T:
> > freq=[-np.sqrt(-x) if x<0 else np.sqrt(x) for x in eigs_at_index]
> > for d,f in zip(distances, freq):
> > print d,f*VasptoTHz
> > print
> > print
> >
> >
> > However, in Phonopy-1.5 this will not work since some changes made in
> order
> > of distances, eigen values, ...
> >
> > It would be grate if the above piece of code is corrected so it will
> give me
> > the dispersions in a table as a function of q-distance.
> >
> > Thanks,
> > ___________________________
> > IYAD I. AL-QASIR, PhD
> > Postdoc Research Associate
> >
> > X-Ray and Neutron Scattering and Spectroscopy Group
> > Materials Science and Technology Division
> > Oak Ridge National Lab
> > Oak Ridge, TN
> >
> >
> >
> ------------------------------------------------------------------------------
> > Don't let slow site performance ruin your business. Deploy New Relic APM
> > Deploy New Relic app performance management and know exactly
> > what is happening inside your Ruby, Python, PHP, Java, and .NET app
> > Try New Relic at no cost today and get our sweet Data Nerd shirt too!
> > http://p.sf.net/sfu/newrelic-dev2dev
> > _______________________________________________
> > Phonopy-users mailing list
> > Pho...@li...
> > https://lists.sourceforge.net/lists/listinfo/phonopy-users
> >
>
>
>
> --
> Atsushi Togo
> http://atztogo.users.sourceforge.net/
> atz...@gm...
>
--
___________________________
IYAD I. AL-QASIR, PhD
Postdoc Research Associate
X-Ray and Neutron Scattering and Spectroscopy Group
Materials Science and Technology Division
Oak Ridge National Lab
Oak Ridge, TN
|