Dear again,
My input file is attached:
# -*- coding: utf-8 -*-
# -------------------------------------------------------------
# Bulk Configuration
# -------------------------------------------------------------
# Set up lattice
lattice = Hexagonal(4.000000017612248*Angstrom, 30.000000132091856*Angstrom)
# Define elements
elements = [Tellurium, Iron, Germanium, Iron, Iron, Tellurium]
# Define coordinates
fractional_coordinates = [[ 0.333333331756, -0.333333331756, 0.086864976284],
[ 0. , 0. , 0.041338246485],
[-0.333333331756, 0.333333331756, 0. ],
[ 0.333333331756, -0.333333331756, 0. ],
[ 0. , 0. , -0.041338246485],
[ 0.333333331756, -0.333333331756, -0.086864976284]]
# Set up configuration
bulk_configuration = BulkConfiguration(
bravais_lattice=lattice,
elements=elements,
fractional_coordinates=fractional_coordinates
)
# -------------------------------------------------------------
# Calculator
# -------------------------------------------------------------
#----------------------------------------
# Exchange-Correlation
#----------------------------------------
exchange_correlation = SGGA.PBE
k_point_sampling = MonkhorstPackGrid(
na=12,
nb=12,
)
numerical_accuracy_parameters = NumericalAccuracyParameters(
density_mesh_cutoff=150.0*Hartree,
k_point_sampling=k_point_sampling,
occupation_method=FermiDirac(300.0*Kelvin*boltzmann_constant),
)
iteration_control_parameters = IterationControlParameters(
tolerance=1e-05,
max_steps=300,
)
calculator = LCAOCalculator(
exchange_correlation=exchange_correlation,
numerical_accuracy_parameters=numerical_accuracy_parameters,
iteration_control_parameters=iteration_control_parameters,
)
bulk_configuration.setCalculator(calculator)
nlprint(bulk_configuration)
bulk_configuration.update()
nlsave('analysis.hdf5', bulk_configuration)
# -------------------------------------------------------------
# Optimize Geometry
# -------------------------------------------------------------
bulk_configuration = OptimizeGeometry(
bulk_configuration,
max_forces=0.01*eV/Ang,
max_steps=300,
max_step_length=0.2*Ang,
trajectory_filename='analysis_trajectory.hdf5',
trajectory_interval=5.0*Minute,
restart_strategy=RestartFromTrajectory(),
disable_stress=True,
optimizer_method=LBFGS(),
enable_optimization_stop_file=True,
)
nlsave('analysis.hdf5', bulk_configuration)
nlprint(bulk_configuration)
# -------------------------------------------------------------
# Dynamical Matrix
# -------------------------------------------------------------
dynamical_matrix = DynamicalMatrix(
bulk_configuration,
filename='analysis.hdf5',
object_id='dynamical_matrix',
repetitions=(7, 7, 1),
atomic_displacement=0.01*Angstrom,
acoustic_sum_rule=True,
finite_difference_method=Central,
force_tolerance=1e-09*Hartree/Bohr**2,
processes_per_displacement=None,
log_filename_prefix='forces_displacement_',
use_wigner_seitz_scheme=True,
)
dynamical_matrix.update()
# -------------------------------------------------------------
# Phonon Bandstructure
# -------------------------------------------------------------
phonon_bandstructure = PhononBandstructure(
configuration=bulk_configuration,
dynamical_matrix=dynamical_matrix,
route=['G', 'K', 'M', 'G'],
points_per_segment=400,
number_of_bands=All
)
nlsave('analysis.hdf5', phonon_bandstructure)
The calculation for the dynamical matrix has been finished properly, but I got an error in plotting bands.
Best regards,
Dongzhe (CNRS, France)