Replies: 2 comments 2 replies
-
|
Hi, could you paste here the complete error stack? Otherwise it is difficult to see how it emerges |
Beta Was this translation helpful? Give feedback.
2 replies
-
|
Thanks a lot for your suggestions. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I am doing the SSCHA minimization for silicon. The relax calculation has converged, and I was proceeding for the harmonic phonon calculation, and came across the error 'TypeError: 'NoneType' object is not subscriptable' during the phonon calculation using finite displacement approach. I am using quantum espresso calculator. The error comes up during the execution of the command
si_harmonic_dyn = CC.Phonons.compute_phonons_finite_displacements (si_structure_relaxed, calculator, supercell = (2,2,2)The input python script is enclosed.
import sscha, sscha.Ensemble, sscha.SchaMinimizer
import sscha.Relax, sscha.Utilities
import cellconstructor as CC, cellconstructor.Phonons
import cellconstructor.Structure, cellconstructor.calculators
from cellconstructor.calculators import Espresso
import numpy as np, matplotlib.pyplot as plt
import sys, os
pseudos = {"Si": "Si.pbe-n-kjpaw_psl.1.0.0.UPF"}
input_params = { "control": {"calculation" :'relax',
"pseudo_dir" : "pseudos",
"tprnfor" : True,
"tstress" : True,
},
"system": {"ecutwfc" : 45,
"ecutrho" : 180,
"nat" : 4,
"ntyp" : 1,
"degauss" : 0.02,
"occupations" : 'smearing',
"smearing" : 'mv'
},
"electrons": {"conv_thr": 8e-10
},
"ions": {"ion_dynamics" : "bfgs"}
}`
`si_structure = CC.Structure.Structure()
si_structure.read_generic_file("Si.cif")
calculator = Espresso(input_data = input_params, pseudopotentials = pseudos) #, kspacing = 'k_spacing')
relax = CC.calculators.Relax(si_structure, calculator)
si_structure_relaxed = relax.static_relax()
si_harmonic_dyn = CC.Phonons.compute_phonons_finite_displacements (si_structure_relaxed, calculator, supercell = (2,2,2))
si_harmonic_dyn.Symmetrize()
si_harmonic_dyn.save_qe("harmonic_dyn")
si_harmonic_dyn.ForcePositiveDefinite()
TEMPERATURE = 300
N_CONFIGS = 50
MAX_ITERATIONS = 20
ensemble = sscha.Ensemble.Ensemble(si_harmonic_dyn, TEMPERATURE)
minim = sscha.SchaMinimizer.SSCHA_Minimizer(ensemble)
minim.set_minimization_step(0.01)
relax = sscha.Relax.SSCHA(minim, calculator, N_configs = N_CONFIGS,
max_pop = MAX_ITERATIONS)
ioinfo = sscha.Utilities.IOInfo()
ioinfo.SetupSaving("minim_info")
relax.setup_custom_functions(custom_function_post = ioinfo.CFP_SaveAll)
relax.relax(get_stress = True)
relax.minim.finalize()
relax.minim.dyn.save_qe("sscha_T{}_dyn".format(TEMPERATURE))
Any help on this is greatly appreciated. Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions