Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
3f5d8ab
Update SchaMinimizer.py
mesonepigreco Jul 20, 2020
eeeafc6
Improved the FAQ
mesonepigreco Jul 21, 2020
fb3dbfc
Worked on the FAQ guide.
mesonepigreco Jul 23, 2020
3bca380
Update README.md
mesonepigreco Jul 28, 2020
3491464
Something changed in the tutorials
mesonepigreco Aug 25, 2020
e83b86d
Add files via upload
ionerrea Aug 25, 2020
b34e095
Rename Tutorials/PbTe/PbTe.4x4x4.dyn0 to Tutorials/PbTe/toy_model_mat…
ionerrea Aug 25, 2020
28d657e
Rename Tutorials/PbTe/PbTe.4x4x4.dyn1 to Tutorials/PbTe/toy_model_mat…
ionerrea Aug 25, 2020
58b2b3b
Rename Tutorials/PbTe/PbTe.4x4x4.dyn2 to Tutorials/PbTe/toy_model_mat…
ionerrea Aug 25, 2020
1fa19c8
Rename Tutorials/PbTe/PbTe.4x4x4.dyn3 to Tutorials/PbTe/toy_model_mat…
ionerrea Aug 25, 2020
6197b07
Rename Tutorials/PbTe/PbTe.4x4x4.dyn4 to Tutorials/PbTe/toy_model_mat…
ionerrea Aug 25, 2020
32c9bf1
Rename Tutorials/PbTe/PbTe.4x4x4.dyn5 to Tutorials/PbTe/toy_model_mat…
ionerrea Aug 25, 2020
e4d26f1
Rename Tutorials/PbTe/PbTe.4x4x4.dyn6 to Tutorials/PbTe/toy_model_mat…
ionerrea Aug 25, 2020
52dc307
Rename Tutorials/PbTe/PbTe.4x4x4.dyn7 to Tutorials/PbTe/toy_model_mat…
ionerrea Aug 25, 2020
7d82662
Rename Tutorials/PbTe/PbTe.4x4x4.dyn8 to Tutorials/PbTe/toy_model_mat…
ionerrea Aug 25, 2020
23a9d08
Corrections on the PbTe tutorial
mesonepigreco Aug 25, 2020
efb5418
Removed adiabatic integral that is useless
mesonepigreco Sep 11, 2020
9a0b6ae
Spectral tutorial
rafbianco Sep 26, 2020
a69cec5
Merge pull request #30 from rafbianco/master
rafbianco Sep 26, 2020
f768290
Merge branch 'MPI_Lanczos' into master_for_lanczos
mesonepigreco Sep 30, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 0 additions & 68 deletions Modules/AdiabaticIntegral.py

This file was deleted.

2 changes: 1 addition & 1 deletion Modules/Relax.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ def vc_relax(self, target_press = 0, static_bulk_modulus = 100,



if static_bulk_modulus is not "recalc":
if static_bulk_modulus == "recalc":
# Rescale the static bulk modulus in eV / A^3
static_bulk_modulus /= sscha.SchaMinimizer.__evA3_to_GPa__

Expand Down
2 changes: 1 addition & 1 deletion Modules/SchaMinimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ def minimization_step(self, custom_function_gradient = None):

# Store the gradient in the minimization
self.__gc__.append(np.real(np.einsum("abc,acb", dyn_grad, np.conj(dyn_grad))))
self.__gc_err__.append(np.real(np.einsum("abc, acb", err, err)))
self.__gc_err__.append(np.real(np.einsum("abc, acb", err, np.conj(err))))

# Perform the step for the dynamical matrix respecting the root representation
new_dyn = PerformRootStep(np.array(self.dyn.dynmats, order = "C"), dyn_grad,
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ So, what are you waiting? Download and install python-sscha, and start enjoing t
## Requirements

The requirements of the python-sscha package are:
1. python >= 2.7 and < 3
1. python >= 2.7
2. numpy
3. matplotlib
3. Lapack
Expand Down
6 changes: 4 additions & 2 deletions SCHAModules/get_gradient_supercell.f90
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,8 @@ subroutine get_gradient_supercell( n_random, natsc, n_modes, ntyp_sc, rho, u_dis

! Perform the inverse preconditioning if required:
if (.not. precond) then
print *, "Computing the inverse preconditioning..."
print *, "Applying the dPsi/dPhi tensor to the gradient [This may require some time for system with more than 50 atoms]"
print *, "If it takes too long, turn on preconditioning."
call flush()
call multiply_lambda_tensor(n_modes, natsc, ntyp_sc, wr_sc, epols_sc, trans, &
mass, ityp_sc, T, grad, tmp, .false.)
Expand Down Expand Up @@ -491,7 +492,8 @@ subroutine get_gradient_supercell_new( n_random, natsc, n_modes, ntyp_sc, rho, u

! Perform the inverse preconditioning if required:
if (.not. precond) then
print *, "Computing the inverse preconditioning..."
print *, "Applying the dPsi/dPhi tensor to the gradient [This may require some time for system with more than 50 atoms]"
print *, "If it takes too long, turn on preconditioning."
call flush()
call multiply_lambda_tensor(n_modes, natsc, ntyp_sc, wr_sc, epols_sc, trans, &
mass, ityp_sc, T, grad, tmp, .false.)
Expand Down
12 changes: 5 additions & 7 deletions Tutorials/H3S/Automatic_Calculations.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"scrolled": false
},
"metadata": {},
"outputs": [],
"source": [
"# We reset the frequency array\n",
Expand Down Expand Up @@ -1199,9 +1197,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"display_name": "Python 3",
"language": "python",
"name": "python2"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -1213,9 +1211,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.0"
"version": "3.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
8 changes: 4 additions & 4 deletions Tutorials/LaH10/VariableCellRelaxation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -443,9 +443,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"display_name": "Python 3",
"language": "python",
"name": "python2"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -457,9 +457,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.0"
"version": "3.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
30 changes: 8 additions & 22 deletions Tutorials/PbTe/StructuralInstability.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -70,23 +70,9 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": null,
"metadata": {},
"outputs": [
{
"ename": "ValueError",
"evalue": "Error, file dyn_sscha1 does not exist.",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mValueError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-6-44b7e4f23edc>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0;31m# We load the SSCHA dynamical matrix for the PbTe (the one after convergence)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 2\u001b[0;31m \u001b[0mdyn_sscha\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mCC\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mPhonons\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mPhonons\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"dyn_sscha\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mnqirr\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;36m3\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 3\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0;31m# Now we load the ensemble\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0mensemble\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0msscha\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mEnsemble\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mEnsemble\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdyn_sscha\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mT0\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;36m1000\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0msupercell\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mdyn_sscha\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mGetSupercell\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m/home/pione/anaconda2/lib/python2.7/site-packages/cellconstructor/Phonons.pyc\u001b[0m in \u001b[0;36m__init__\u001b[0;34m(self, structure, nqirr, full_name, use_format)\u001b[0m\n\u001b[1;32m 99\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mtype\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mstructure\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0mtype\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"hello there!\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 100\u001b[0m \u001b[0;31m# Quantum espresso\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 101\u001b[0;31m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mLoadFromQE\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mstructure\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mnqirr\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mfull_name\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mfull_name\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0muse_format\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0muse_format\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 102\u001b[0m \u001b[0;32melif\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mtype\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mstructure\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0mtype\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mStructure\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mStructure\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 103\u001b[0m \u001b[0;31m# Get the structure\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m/home/pione/anaconda2/lib/python2.7/site-packages/cellconstructor/Phonons.pyc\u001b[0m in \u001b[0;36mLoadFromQE\u001b[0;34m(self, fildyn_prefix, nqirr, full_name, use_format)\u001b[0m\n\u001b[1;32m 166\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 167\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mos\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0misfile\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfilepath\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 168\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mValueError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"Error, file %s does not exist.\"\u001b[0m \u001b[0;34m%\u001b[0m \u001b[0mfilepath\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 169\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 170\u001b[0m \u001b[0;31m# Load the matrix as a regular file\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;31mValueError\u001b[0m: Error, file dyn_sscha1 does not exist."
]
}
],
"outputs": [],
"source": [
"# We load the SSCHA dynamical matrix for the PbTe (the one after convergence)\n",
"dyn_sscha = CC.Phonons.Phonons(\"dyn_sscha\", nqirr = 3)\n",
Expand Down Expand Up @@ -127,23 +113,23 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"display_name": "Python 3",
"language": "python",
"name": "python2"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.12"
"pygments_lexer": "ipython3",
"version": "3.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
Loading