16
General Questions and Answers / Re: Error of VNL concerning band structure analyzer
« on: April 12, 2015, 12:26 »
OK. Thanks a lot.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
# -------------------------------------------------------------
# Bulk configuration
# -------------------------------------------------------------
# Set up lattice
lattice = SimpleTetragonal(3.9909999371*Angstrom, 36.2396011353*Angstrom)
# Define elements
elements = [Platinum, Platinum, Platinum, Platinum, Platinum, Platinum,
Platinum, Platinum, Platinum, Platinum, Platinum, Platinum,
Platinum, Platinum, Platinum, Platinum, Platinum, Platinum, Barium,
Barium, Barium, Barium, Titanium, Titanium, Titanium, Titanium,
Titanium, Oxygen, Oxygen, Oxygen, Oxygen, Oxygen, Oxygen, Oxygen,
Oxygen, Oxygen, Oxygen, Oxygen, Oxygen, Oxygen, Oxygen]
# Define coordinates
fractional_coordinates = [[ 0. , 0. , 0.054310001],
[ 0. , 0. , 0.162929997],
[ 0. , 0.5 , 0. ],
[ 0. , 0.5 , 0.108620003],
[ 0. , 0.5 , 0.217230007],
[ 0.5 , 0. , 0. ],
[ 0.5 , 0. , 0.108620003],
[ 0.5 , 0. , 0.217230007],
[ 0.5 , 0.5 , 0.054310001],
[ 0.5 , 0.5 , 0.162929997],
[ 0. , 0. , 0.945689976],
[ 0. , 0. , 0.837069988],
[ 0. , 0.5 , 0.891380012],
[ 0. , 0.5 , 0.782769978],
[ 0.5 , 0. , 0.891380012],
[ 0.5 , 0. , 0.782769978],
[ 0.5 , 0.5 , 0.945689976],
[ 0.5 , 0.5 , 0.837069988],
[ 0. , 0. , 0.331499994],
[ 0. , 0. , 0.443830013],
[ 0. , 0. , 0.556169987],
[ 0. , 0. , 0.668500006],
[ 0.5 , 0.5 , 0.276719987],
[ 0.5 , 0.5 , 0.389050007],
[ 0.5 , 0.5 , 0.501380026],
[ 0.5 , 0.5 , 0.613709986],
[ 0.5 , 0.5 , 0.726040006],
[ 0.5 , 0. , 0.275339991],
[ 0.5 , 0. , 0.38767001 ],
[ 0.5 , 0. , 0.5 ],
[ 0.5 , 0. , 0.612330019],
[ 0.5 , 0. , 0.724659979],
[ 0. , 0.5 , 0.275339991],
[ 0. , 0.5 , 0.38767001 ],
[ 0. , 0.5 , 0.5 ],
[ 0. , 0.5 , 0.612330019],
[ 0. , 0.5 , 0.724659979],
[ 0.5 , 0.5 , 0.331499994],
[ 0.5 , 0.5 , 0.443830013],
[ 0.5 , 0.5 , 0.556169987],
[ 0.5 , 0.5 , 0.668500006]]
# Set up configuration
bulk_configuration = BulkConfiguration(
bravais_lattice=lattice,
elements=elements,
fractional_coordinates=fractional_coordinates
)
# Add tags
bulk_configuration.addTags('Constraints')
# -------------------------------------------------------------
# Calculator
# -------------------------------------------------------------
#----------------------------------------
# Basis Set
#----------------------------------------
basis_set = [
GGABasis.Oxygen_DoubleZetaPolarized,
GGABasis.Titanium_DoubleZetaPolarized,
GGABasis.Barium_DoubleZetaPolarized,
GGABasis.Platinum_DoubleZetaPolarized,
]
#----------------------------------------
# Exchange-Correlation
#----------------------------------------
exchange_correlation = GGA.PBE
numerical_accuracy_parameters = NumericalAccuracyParameters(
k_point_sampling=(4, 4, 1),
)
calculator = LCAOCalculator(
basis_set=basis_set,
exchange_correlation=exchange_correlation,
numerical_accuracy_parameters=numerical_accuracy_parameters,
)
bulk_configuration.setCalculator(calculator)
nlprint(bulk_configuration)
bulk_configuration.update()
nlsave('fer_relax.nc', bulk_configuration)
constraints = [FixStrain(x=True, y=True, z=False), 2, 5]
bulk_configuration = OptimizeGeometry(
bulk_configuration,
max_forces=0.1*eV/Ang,
max_stress=0.05*eV/Ang**3,
max_steps=200,
max_step_length=0.2*Ang,
constraints=constraints,
trajectory_filename=None,
optimizer_method=LBFGS(),
)
nlsave('fer_relax.nc', bulk_configuration)
nlprint(bulk_configuration)
OptimizeGeometry(
configuration,
max_forces,
max_stress,
max_steps,
max_step_length,
scf_restart_step_length,
constraints,
trajectory_filename,
disable_stress,
optimizer_method
)
Yes and no.
It is not ATK - it is the functional itself.
The way they use in the paper originally, is that the optimize the structure using LDA and once they have optimized the structure they use their functional TB09
to recalculate the bandstructure etc.
The TB09 was constructed by the authors for giving accurate bandstructure (i.e. band gaps) of insulators and semi-conductors, it was never intended for giving good total energies and forces.
In order for a geometric optimization to be good, the total energy and forces ( the derivative with respect to the total energy) needs to be proper correlated. The exchange-correlation is part of this energy.
For the TB09 metaGGA which the one currently supported in ATK, it is not possible to define a proper derivative of the TB09 potential, and hence the total energy and the forces is not well correlated any more.
In the worst case, it can end up with having non-zero forces in the minimum or having zero forces in a non-extreme.