Code Monkey home page Code Monkey logo

qe-doc's Introduction

QE-doc DOI

This work was supported in part by a grant from the National Sciences and Engineering Research Council of Canada, University of Saskatchewan, and the Department of Computational Material Science of the Institute of Nuclear Physics, PAN, Cracow, Poland. The access to high performance supercomputers provided by Compute Canada (CLUMEQ and Westgrid) is acknowledged.

QE-doc is a set of tutorials for Quantum-Espresso environment inside iPython notebooks developed as a colaborative project between the Institute of Nuclear Physics and the University of Saskachwan.

The tutorials use QE-util and Elastic packages for the ASE system.

The docs and examples in the form of a series of iPython notebooks are viewable from the links below. If you open the links you can download the source from the page itself (icon in the top-right corner of the page). The support files as well as source for the tutorials are stored in the repository and can be cloned or directly downloaded as a zip archive.

Obviously, to get any use from these tutorials and to further use the software in the QE-util and Elastic packages you need to have at least cursory knowledge of the python language and iPython notebook environment. Go ahead and to the iPython website to teach yourself - if you need to.

But: no advanced knowledge of python is required for understanding the tutorials and you will pick up the required skills quickly when you start to experiment with the materials.

You will also need to understand at least the basics of the Quantum Espresso package. There is a large body of documents on the Quantum Espresso website as well as in other places (e.g. Tutorials prepared by the Q-E group). Since the whole system is based on the excellent ASE library you should study the documentation on their website at some point in time as well. This may wait until you start more serious experimentation. You should understand the tutorials without detailed knowledge of the ASE system. Finally, of course you will need understand the physics behind it all.

Installation

You can view the tutorials with just your browser (just click the links below), but to work on them (which is a whole point of having a tutorial!) you need a working environment - so you need to build and configure one.

The Installation document will help with this task. Do not be scared off by the multiple steps in the procedure. All should work quite smoothly, and at the end you will have an environment useful not only for viewing and experimenting with the tutorials but suitable for the day-to-day research work (it is actually a slimmed down and cleaned up version of my working environment).

The information concerned with local configuration at the University of Saskatchewan is included on the USASK NiPy page.

Alternatively, we have prepared a VirtualBox image of a fully installed and configured system. Ready to be imported into the virtualization software (README for the image). It is not the most effective way to use the software - but it is definitively the fastest one (it takes 3-5 minutes from downloading the image to opening first tutorial).

Then proceed to the tutorials - view them from the links below, download them (the download link is in the upper right corner of the tutorial page) and play with them - this is the fastest way to get a grip on the software.

Note: The software is under active development, so do expect some changes in the api from time to time.

Tutorials

Here is the list of tutorials. It will probably grow in time a little. If you wish to include your tutorial in the list we will be happy to add any material which concerned with similar tasks.

  • Crystal structure - introduces the basic ideas of the system and presents a set of basic static calculations. This example uses a local installation of Quantum Espresso. Without such installation you will not be able to execute this tutorial However, you can still read it and lern from it. The rest of the tutorials are configured for remote execution.
  • Remote execution - shows how to set-up the remote execution of the Qeuantum Espresso over the network (e.g. in some supercomputing center).
  • Primitive unit cells - demonstrates the concept of the primitive unit cell and shows a way the system deals with them.
  • Structure optimization - shows how to find minimum of energy of the system with more degrees of freedom (low symmetry structures etc.). The example of structure minimization for a simple structure is included in the first tutorial.
  • Electronic structure - shows how to extract the basic properties of the electronic structure of the crystal (band structure, band gap, electronic DOS) from the data produced by the calculation.
  • Elastic constants - introduces the Elastic package and shows the calculation of elastic constants using this tool.
  • Lattice dynamics - shows the use of DFPT module in Quantum Espresso for calculation of vibration modes in the crystal as well as use of utility functions in the QE-util for easier analysis of the obtained data.
  • Quasi-Harmonic Approximation - explains the procedure of calculating temperature-dependent behaviour in the framework of the QHA using the tools provided within the QE-util package.

qe-doc's People

Contributors

jochym avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

qe-doc's Issues

crystal_structure problem: 'could not convert string to float: (ev)'

Hi,
I was going through the first tutorial, crystal_structure. When I run this command:
print "Stress tensor (Voigt notation eV/A^3):", cryst.get_stress()

I get the following error:

ValueError Traceback (most recent call last)
in ()
20
21 # Calculate energy and stress and store the results in the result list
---> 22 result.append([x, x*cryst.get_cell()[0,0], cr.get_potential_energy()])
23
24 # Print it as well

/home/alarcj/miniconda/lib/python2.7/site-packages/ase/atoms.pyc in get_potential_energy(self, force_consistent, apply_constraint)
641 self, force_consistent=force_consistent)
642 else:
--> 643 energy = self._calc.get_potential_energy(self)
644 if apply_constraint:
645 for constraint in self.constraints:

/home/alarcj/miniconda/lib/python2.7/site-packages/ase/calculators/calculator.pyc in get_potential_energy(self, atoms, force_consistent)
346
347 def get_potential_energy(self, atoms=None, force_consistent=False):
--> 348 energy = self.get_property('energy', atoms)
349 if force_consistent:
350 return self.results.get('free_energy', energy)

/home/alarcj/miniconda/lib/python2.7/site-packages/ase/calculators/calculator.pyc in get_property(self, name, atoms, allow_calculation)
385 return None
386 try:
--> 387 self.calculate(atoms, [name], system_changes)
388 except Exception:
389 self.reset()

/home/alarcj/miniconda/lib/python2.7/site-packages/qeutil/init.pyc in calculate(self, atoms, properties, system_changes)
186
187 self.command=self.build_command(properties,self.parameters)
--> 188 self.run_calculation(atoms, properties, system_changes)
189
190 def write_input(self, atoms=None, properties=None, system_changes=None):

/home/alarcj/miniconda/lib/python2.7/site-packages/qeutil/init.pyc in run_calculation(self, atoms, properties, system_changes)
172 if self.restart : return
173
--> 174 FileIOCalculator.calculate(self, atoms, properties, system_changes)
175
176 def calculate(self, atoms=None, properties=['energy'],

/home/alarcj/miniconda/lib/python2.7/site-packages/ase/calculators/calculator.pyc in calculate(self, atoms, properties, system_changes)
538 raise RuntimeError('%s returned an error: %d' %
539 (self.name, errorcode))
--> 540 self.read_results()
541
542 def write_input(self, atoms, properties=None, system_changes=None):

/home/alarcj/miniconda/lib/python2.7/site-packages/qeutil/init.pyc in read_results(self)
227 if ln.find('JOB DONE.')>-1 :
228 # Job is done we can read the output
--> 229 r=read_quantumespresso_textoutput(fn)
230 self.results.update(r)
231 self.results_xml={}

/home/alarcj/miniconda/lib/python2.7/site-packages/qeutil/qeio.pyc in read_quantumespresso_textoutput(filename, verbose)
186 if l.rfind('highest occupied') > -1 :
187 t = l.split()
--> 188 Results['HOL'] = float(t[-2])
189 Results['LUL'] = float(t[-1])
190

ValueError: could not convert string to float: (ev):

I checked the out

output.txt

put files and the calculation does run and finishes properly.
regards,
Jorge

Error in routine divide_class (1): > Wrong classes for C_3v

Dear Dr. Jochym

I was trying to do lattice dynamic calculation of Hexagonal Silicon carbide. The lattice dynamics for 2H hexagonal symmetry was working fine. But the the lattice dynamics for the 4H hexagonal symmetry is giving me an error "Error in routine divide_class (1): > Wrong classes for C_3v" and the calcuation fails without producing matdyn files.
I understand that the error is problem with conflict in symmetry. Can you please guide me how can i rectify this problem. Please find the python scripts used

Import the basic libraries

from future import division

ASE system

import ase
from ase import Atom, Atoms
from ase import io
from ase.lattice.spacegroup import crystal

Spacegroup/symmetry library

from pyspglib import spglib

iPython utility function

from IPython.core.display import Image

Import the remote execution tools from the qe-util package

from qeutil import QuantumEspresso, RemoteQE

Utility function for plotting standard phonon plots

from qeutil.analyzers import plot_phonons, get_thermodynamic_functions

a=3.081
c=10.084
SiC= crystal(['Si', 'C'],
[(1/3., 2/3., 0), (2/3., 1/3., -1/8.)],
spacegroup=186,
cellpar=[a, a, c, 90, 90, 120])

spglib.get_spacegroup(SiC)

qe=RemoteQE(label='SiC-LatDyn',
kpts=[4,4,2], # Sampling grid in the reciprocal space for the electronic calculation
qpts=[4,4,2], # Sampling grid in the reciprocal space for the phonon calculation
xc='pz', # Exchange functional type in the name of the pseudopotentials
pp_type='vbc', # Variant of the pseudopotential
pp_format='UPF',
ecutwfc=70,
pseudo_dir='../pspot',
use_symmetry=False,
procs=4) # Use 4 cores for the calculation

Check where the calculation files will reside on the local machine.

print qe.directory

qe.calculate(SiC,['energy','d2'])

qe.read_results()

Assign the calculator to our system

SiC.set_calculator(qe)
G1=[0,0,0]
A=[0,0,0.5]
H=[-1/3.,2/3.,1/2]
K=[-1/3.,2/3.0]
G2=[0,0,0]
M=[0,0.5,0]
L=[0,0.5,0.5]
H=[-1/3.,2/3,1/5]

Set the path along which we would like to plot the phonon dispersion curves

qpath=array([G1,H,G2,A])

Name the special points for plotting

qpname=[u'ฮ“','X',u'ฮ“','L']

Put the parameters into the calculator

qe.set(qpath=qpath) # The path in the brillouin zone
qe.set(points=300); # Number of plot points between the special points along the dispersion curves
qe.set(nkdos=[15,15,15]) # Sampling grid in the reciprocal space for the PDOS integration
qe.set(ndos=200);
SiC.set_calculator(qe)

qe.calculate(SiC,['phdos','frequencies'])

With regards

Linu

Structural optimization of BeO (HCP structure)

Hi Dr. Jochym

I was trying to do structural optimization of BeO with a space group of 186. But i was not able to optimize it to the same space group. Can you please go through the code i have used ( shown below) and guide me to know where i am committing mistake and what things should i do different.

{
"metadata": {
"name": "",
"signature": "sha256:1f946d3105d54e3c0582e10bc0200c4465e0d176d8bbc8d7352cc9625d0ae451"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Import the basic libraries\n",
"\n",
"# ASE system\n",
"import ase\n",
"from ase import Atom, Atoms\n",
"from ase import io\n",
"from ase.lattice.spacegroup import crystal\n",
"from ase.units import GPa, Bohr, Rydberg\n",
"\n",
"# Spacegroup/symmetry library\n",
"from pyspglib import spglib\n",
"\n",
"# iPython utility function\n",
"from IPython.core.display import Image\n",
"\n",
"# Import the remote execution tools from the qe-util package\n",
"from qeutil import RemoteQE\n",
"\n",
"import warnings\n",
"warnings.filterwarnings('ignore')\n",
"\n",
"# Access info\n",
"import hostp\n",
"\n",
"qe=RemoteQE(label='BeO-structure', # A name for the project\n",
" kpts=[3,3,3], # k-space grid\n",
" xc='pw91', # Exchange functional type in the name of the pseudopotentials\n",
" pp_type='van', # Variant of the pseudopotential\n",
" pp_format='UPF', # Format of the pseudopotential files\n",
" ecutwfc=70, # Energy cut-off\n",
" pseudo_dir='../pspot',\n",
" use_symmetry=False,\n",
" procs=16) # Use 8 cores for the calculation\n",
"\n",
"print qe.directory"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"calc/BeO-structure.f33j3k\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"a=2.7\n",
"c=4.4199\n",
"cryst= crystal(['Be', 'O'],\n",
" [(1/3., 2/3., 0), (2/3., 1/3., -1/8.)],\n",
" spacegroup=186,\n",
" cellpar=[a, a, c, 90, 90, 120])\n",
"# Assign the calculator to our system\n",
"cryst.set_calculator(qe)\n",
"\n",
"# Verify the symmetry\n",
"print "Symmetry group:", spglib.get_spacegroup(cryst)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Symmetry group: P6_3mc (186)\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"print "Stress tensor (Voigt notation, GPa):\n", cryst.get_stress()/GPa\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Stress tensor (Voigt notation, GPa):\n",
"[-1.853 -1.853 2.58 -0. -0. -0. ]"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n"
]
}
],
"prompt_number": 3
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"cryst.rattle(stdev=0.05)\n",
"cryst.set_cell(diag(1+0.01_randn(3))_cryst.get_cell(), scale_atoms=True)"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 4
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Verify that indeed we have a low symmetry structure\n",
"print "Symmetry group:", spglib.get_spacegroup(cryst)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Symmetry group: P1 (1)\n"
]
}
],
"prompt_number": 5
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Display the structure\n",
"ase.io.write('crystal.png', cryst, format='png', show_unit_cell=2, rotation='115y,25x', scale=30)\n",
"Image(filename='crystal.png')"
],
"language": "python",
"metadata": {},
"outputs": [
{
"metadata": {},
"output_type": "pyout",
"png": "iVBORw0KGgoAAAANSUhEUgAAAKYAAAB7CAYAAAD+KPuGAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHE5JREFUeJztnXeYU1UWwH/vvfSZAVSKiBSli4A4VGm6FrCADQu2ZbE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IIKhLkSarh6Nc043q\nWQ2y1HKaASOjvB7vdBlts/EGMnhsGjIAv1+cbWaxmExbY1aEhhSwEFWHVhyFNFbvcetvjvQhLF8F\n1Aa1u8pwTaemmC6uRnrG5JR7zYm0CUZmVu+FFMw1wGhkuY/I0rRZocySFOzAZPZls1iEPDdegozz\nzpIlbSjIlDQfAT2QdsQsWbJkyZLlIOf/g9iDbu/M2yUAAAAASUVORK5CYII=\n",
"prompt_number": 6,
"text": [
"<IPython.core.display.Image at 0xa7f9f0c>"
]
}
],
"prompt_number": 6
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"print "Stress tensor (Voigt notation, GPa):\n", cryst.get_stress()/GPa\n",
"\n",
"# Print also the forces (eV/A)\n",
"\n",
"print "\nForces on atoms (eV/A)"\n",
"print "======================"\n",
"print cryst.get_forces()"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Stress tensor (Voigt notation, GPa):\n",
"[ -8.022 -84.177 -12.79 2.087 -0.245 49.47 ]"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
"Forces on atoms (eV/A)\n",
"======================\n",
"[[-0.00456724 0.00399573 0.0021234 ]\n",
" [ 0.00512782 -0.00498257 0.00401369]\n",
" [ 0.00560462 -0.00496495 -0.00302884]\n",
" [-0.0061652 0.00595179 -0.00310826]]\n"
]
}
],
"prompt_number": 7
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Switch to the atomic position relaxation mode\n",
"qe.set(calc='relax')\n",
"\n",
"# Switch off the use of symmetries. \n",
"qe.set(use_symmetry=False)\n",
"\n",
"# Force recalculation by clearing the results from the previous calculation.\n",
"qe.reset()"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 8
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"\n",
"# Run the calculation and get the stresses and forces at the end.\n",
"# The structure in cryst is not modified\n",
"print "Stress:\n", cryst.get_stress()/GPa\n",
"print "\nForces:\n", cryst.get_forces()\n",
"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Stress:\n",
"[ 14.82 -78.361 38.072 -2.042 2.902 -0.593]"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
"Forces:\n",
"[[-0.0003558 0.00047606 0.00075467]\n",
" [-0.00144971 0.00085408 -0.00112689]\n",
" [ 0.00055243 -0.00031167 -0.002229 ]\n",
" [ 0.00125308 -0.00101846 0.00260122]]\n"
]
}
],
"prompt_number": 9
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"qe.set(forc_conv_thr=1e-8*Rydberg/Bohr)\n",
"qe.reset()\n"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 10
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"print "Stress:\n", cryst.get_stress()/GPa\n",
"print "\nForces:\n", cryst.get_forces()"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Stress:\n",
"[ 1.71940000e+01 -7.72210000e+01 4.11520000e+01 -0.00000000e+00\n",
" 1.10000000e-02 0.00000000e+00]"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
"Forces:\n",
"[[ 8.01212231e-07 2.37252165e-07 -8.82889205e-07]\n",
" [ 9.80123699e-08 -2.25584026e-07 -2.49892650e-06]\n",
" [ 1.32900106e-06 -2.01236509e-06 -2.43202916e-06]\n",
" [ -2.22822566e-06 2.00108589e-06 5.81345593e-06]]\n"
]
}
],
"prompt_number": 11
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Update the positions using calculated values\n",
"cryst.set_scaled_positions(qe.results['atomic_positions'])\n",
"\n",
"# Check the symmetry. Probably not the F-43m !\n",
"print "Symmetry group:", spglib.get_spacegroup(cryst,symprec=1e-4)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Symmetry group: P1 (1)\n"
]
}
],
"prompt_number": 12
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"qe.set(calc='vc-relax')\n",
"qe.reset()"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 13
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"print "Stress:\n", cryst.get_stress()/GPa\n",
"print "\nForces:\n", cryst.get_forces()"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Stress:\n",
"[-0.183 -0.304 -0.3 0.001 -0.002 0.002]"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
"Forces:\n",
"[[ -1.50433430e-05 -1.17996003e-05 -1.90416254e-05]\n",
" [ 1.54653407e-05 1.14958398e-05 1.40694423e-05]\n",
" [ 1.89762838e-06 -7.93044533e-07 2.59032692e-06]\n",
" [ -2.31962609e-06 1.09680509e-06 2.38146723e-06]]\n"
]
}
],
"prompt_number": 14
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Update the crystal\n",
"cryst.set_cell(qe.results['cell'])\n",
"cryst.set_scaled_positions(qe.results['atomic_positions'])\n",
"\n",
"# Check the symmetry\n",
"print "Symmetry group:", spglib.get_spacegroup(cryst,symprec=1e-4)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Symmetry group: Pm (6)\n"
]
}
],
"prompt_number": 15
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"qe.set(calc='vc-relax')\n",
"qe.reset()"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 16
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"print "Stress:\n", cryst.get_stress()/GPa\n",
"print "\nForces:\n", cryst.get_forces()"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Stress:\n",
"[ 0.048 0.052 0.06 0. -0.001 0. ]"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
"Forces:\n",
"[[ -6.22300762e-07 -1.26793780e-07 -7.16034814e-07]\n",
" [ 3.67935325e-07 3.77269837e-07 2.17921948e-06]\n",
" [ 2.12749073e-07 -2.85480474e-07 -7.25758263e-07]\n",
" [ 4.16163634e-08 3.53933558e-08 -7.37815340e-07]]\n"
]
}
],
"prompt_number": 17
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Update the crystal\n",
"cryst.set_cell(qe.results['cell'])\n",
"cryst.set_scaled_positions(qe.results['atomic_positions'])\n",
"\n",
"# Check the symmetry\n",
"print "Symmetry group:", spglib.get_spacegroup(cryst,symprec=1e-4)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Symmetry group: P2_1 (4)\n"
]
}
],
"prompt_number": 18
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"qe.set(calc='vc-relax')\n",
"qe.reset()"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 19
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"print "Stress:\n", cryst.get_stress()/GPa\n",
"print "\nForces:\n", cryst.get_forces()"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Stress:\n",
"[ 0.195 0.197 0.199 0. -0. 0. ]"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
"Forces:\n",
"[[ -4.46111858e-07 -1.12403075e-07 -2.17416329e-07]\n",
" [ 3.03760559e-07 2.69534017e-07 1.11858562e-06]\n",
" [ 1.51685811e-07 -2.11193321e-07 -4.56224246e-07]\n",
" [ -8.94557345e-09 5.36734407e-08 -4.44945045e-07]]\n"
]
}
],
"prompt_number": 20
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Update the crystal\n",
"cryst.set_cell(qe.results['cell'])\n",
"cryst.set_scaled_positions(qe.results['atomic_positions'])\n",
"\n",
"# Check the symmetry\n",
"print "Symmetry group:", spglib.get_spacegroup(cryst,symprec=1e-4)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Symmetry group: P2_1 (4)\n"
]
}
],
"prompt_number": 21
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"qe.set(calc='vc-relax')\n",
"qe.reset()"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 22
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"print "Stress:\n", cryst.get_stress()/GPa\n",
"print "\nForces:\n", cryst.get_forces()"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Stress:\n",
"[ 0.276 0.278 0.28 0. -0. 0. ]"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
"Forces:\n",
"[[ -4.65169819e-07 -7.50650294e-08 -1.61798198e-07]\n",
" [ 3.07649939e-07 2.03025623e-07 9.29950701e-07]\n",
" [ 1.80856159e-07 -1.59075632e-07 -3.99050363e-07]\n",
" [ -2.29473406e-08 3.11150381e-08 -3.69102139e-07]]\n"
]
}
],
"prompt_number": 23
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Update the crystal\n",
"cryst.set_cell(qe.results['cell'])\n",
"cryst.set_scaled_positions(qe.results['atomic_positions'])\n",
"\n",
"# Check the symmetry\n",
"print "Symmetry group:", spglib.get_spacegroup(cryst,symprec=1e-4)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Symmetry group: P2_1 (4)\n"
]
}
],
"prompt_number": 24
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"qe.set(calc='vc-relax')\n",
"qe.reset()"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 25
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"print "Stress:\n", cryst.get_stress()/GPa\n",
"print "\nForces:\n", cryst.get_forces()"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Stress:\n",
"[ 0.011 0.011 0.014 0. 0. 0. ]"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
"Forces:\n",
"[[ -1.87079166e-07 -8.40106028e-08 7.00088357e-08]\n",
" [ 1.52463687e-07 1.23682276e-07 1.77744655e-07]\n",
" [ 7.38982154e-08 -8.47884788e-08 -1.22126524e-07]\n",
" [ -3.96716736e-08 4.51168052e-08 -1.25626966e-07]]\n"
]
}
],
"prompt_number": 26
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Update the crystal\n",
"cryst.set_cell(qe.results['cell'])\n",
"cryst.set_scaled_positions(qe.results['atomic_positions'])\n",
"\n",
"# Check the symmetry\n",
"print "Symmetry group:", spglib.get_spacegroup(cryst,symprec=1e-4)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Symmetry group: P2_1 (4)\n"
]
}
],
"prompt_number": 27
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"qe.set(calc='vc-relax')\n",
"qe.reset()"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 28
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"print "Stress:\n", cryst.get_stress()/GPa\n",
"print "\nForces:\n", cryst.get_forces()"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Stress:\n",
"[ 0.068 0.069 0.067 0. 0. 0. ]"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
"Forces:\n",
"[[ -8.63442307e-08 -6.41747660e-08 3.96716736e-08]\n",
" [ 7.07867116e-08 7.23424635e-08 3.07261001e-08]\n",
" [ 4.58946812e-08 -3.65601697e-08 -3.65601697e-08]\n",
" [ -3.03371621e-08 2.83924722e-08 -3.38376039e-08]]\n"
]
}
],
"prompt_number": 29
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Update the crystal\n",
"cryst.set_cell(qe.results['cell'])\n",
"cryst.set_scaled_positions(qe.results['atomic_positions'])\n",
"\n",
"# Check the symmetry\n",
"print "Symmetry group:", spglib.get_spacegroup(cryst,symprec=1e-4)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Symmetry group: C222_1 (20)\n"
]
}
],
"prompt_number": 30
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"qe.set(calc='vc-relax')\n",
"qe.reset()"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 31
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"print "Stress:\n", cryst.get_stress()/GPa\n",
"print "\nForces:\n", cryst.get_forces()"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Stress:\n",
"[ 0.438 0.438 0.433 0. -0. 0. ]"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
"Forces:\n",
"[[ -6.10632622e-08 -4.04495495e-08 2.52809684e-08]\n",
" [ 7.97322851e-08 5.56181306e-08 -5.05619369e-09]\n",
" [ 2.02247748e-08 -1.82800849e-08 -1.28349532e-08]\n",
" [ -3.88937976e-08 3.11150381e-09 -7.77875952e-09]]\n"
]
}
],
"prompt_number": 32
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Update the crystal\n",
"cryst.set_cell(qe.results['cell'])\n",
"cryst.set_scaled_positions(qe.results['atomic_positions'])\n",
"\n",
"# Check the symmetry\n",
"print "Symmetry group:", spglib.get_spacegroup(cryst,symprec=1e-4)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Symmetry group: C222_1 (20)\n"
]
}
],
"prompt_number": 33
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"qe.set(calc='vc-relax')\n",
"qe.reset()"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 34
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"print "Stress:\n", cryst.get_stress()/GPa\n",
"print "\nForces:\n", cryst.get_forces()"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Stress:\n",
"[ 0.394 0.394 0.387 0. 0. 0. ]"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
"Forces:\n",
"[[ -5.25066268e-08 -4.23942394e-08 2.52809684e-08]\n",
" [ 4.74504331e-08 5.71738825e-08 -1.94468988e-09]\n",
" [ 3.30597280e-08 -2.02247748e-08 -1.43907051e-08]\n",
" [ -2.80035343e-08 5.05619369e-09 -8.55663547e-09]]\n"
]
}
],
"prompt_number": 35
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Update the crystal\n",
"cryst.set_cell(qe.results['cell'])\n",
"cryst.set_scaled_positions(qe.results['atomic_positions'])\n",
"\n",
"# Check the symmetry\n",
"print "Symmetry group:", spglib.get_spacegroup(cryst,symprec=1e-4)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Symmetry group: C222_1 (20)\n"
]
}
],
"prompt_number": 36
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"qe.set(calc='vc-relax')\n",
"qe.reset()"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 37
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"print "Stress:\n", cryst.get_stress()/GPa\n",
"print "\nForces:\n", cryst.get_forces()"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Stress:\n",
"[ 0.396 0.396 0.389 0. 0. 0. ]"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
"Forces:\n",
"[[ -5.25066268e-08 -4.20053014e-08 3.07261001e-08]\n",
" [ 4.74504331e-08 5.71738825e-08 -4.27831774e-09]\n",
" [ 3.30597280e-08 -2.02247748e-08 -1.59464570e-08]\n",
" [ -2.80035343e-08 5.05619369e-09 -1.05013254e-08]]\n"
]
}
],
"prompt_number": 38
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Update the crystal\n",
"cryst.set_cell(qe.results['cell'])\n",
"cryst.set_scaled_positions(qe.results['atomic_positions'])\n",
"\n",
"# Check the symmetry\n",
"print "Symmetry group:", spglib.get_spacegroup(cryst,symprec=1e-4)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Symmetry group: C222_1 (20)\n"
]
}
],
"prompt_number": 39
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"qe.set(calc='vc-relax')\n",
"qe.reset()"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 40
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"print "Stress:\n", cryst.get_stress()/GPa\n",
"print "\nForces:\n", cryst.get_forces()"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Stress:\n",
"[ 0.141 0.141 0.137 0. -0. 0. ]"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
"Forces:\n",
"[[ -6.96198977e-08 -1.20570773e-08 1.24460152e-08]\n",
" [ 6.22300762e-08 2.45030925e-08 4.66725571e-09]\n",
" [ 6.02853863e-08 8.55663547e-09 -2.87814102e-08]\n",
" [ -5.28955647e-08 -2.10026507e-08 1.16681393e-08]]\n"
]
}
],
"prompt_number": 41
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Update the crystal\n",
"cryst.set_cell(qe.results['cell'])\n",
"cryst.set_scaled_positions(qe.results['atomic_positions'])\n",
"\n",
"# Check the symmetry\n",
"print "Symmetry group:", spglib.get_spacegroup(cryst,symprec=1e-4)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Symmetry group: C222_1 (20)\n"
]
}
],
"prompt_number": 42
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"\n",
"# Round the sizes and positions to get to the high-symmetry structure\n",
"cryst.set_cell(np.round(qe.results['cell'],4))\n",
"cryst.set_scaled_positions(np.round(qe.results['atomic_positions'],3))\n",
"\n",
"# See the structure\n",
"print "Unit cell:\n", cryst.get_cell()\n",
"print "\nAtomic positions:\n", cryst.get_scaled_positions()\n",
"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Unit cell:\n",
"[[ 2.7155 -0. 0. ]\n",
" [-0. 2.7155 -0. ]\n",
" [-0. 0. 3.7903]]\n",
"\n",
"Atomic positions:\n",
"[[ 0.769 0.749 0.061]\n",
" [ 0.269 0.25 0.561]\n",
" [ 0.769 0.25 0.811]\n",
" [ 0.269 0.75 0.311]]\n"
]
}
],
"prompt_number": 43
},
{
"cell_type": "code",
"collapsed": false,
"input": [],
"language": "python",
"metadata": {},
"outputs": []
}
],
"metadata": {}
}
]
}

Regards
Linu

Problem With the Calculation of Heat Capacity.

Dear Dr Jochym

I went through the example provided in your tutorials for Lattice dynamics and found that the graph that plotted the Cv Vs Temp is having different values from that reported in the Literature. The graph that we are getting from the Lattice dynamics calculation is giving results with a multiplication factor of e20 ( which is the same when i am trying to redo the same calculation). But the calculations that you provided earlier was correct and was similar to that reported in literature.

Can you please guide to solve this issue.

please compare these two graph

http://nbviewer.ipython.org/github/jochym/qe-doc/blob/master/Lattice_dynamics.ipynb
http://nbviewer.ipython.org/url/homepage.usask.ca/~bas627/nipy/html-nipy/Lattice%20dynamics.ipynb?create=1

Regards

Linu

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.