I have another question regarding VNL 2008.10. I'm currently working my way through the tutorial and what I notice is that the calculated values I get from the simulator are always slightly off from those mentioned in the tutorial.
For instance when performing the bulk Si lattice constant variation I get the following results compared with those mentioned in the tutorial
from ATK.KohnSham import *
from ATK.MPI import processIsMaster
# Generate time stamp
if processIsMaster():
import platform, time
print '#',time.ctime()
print '#',platform.node(),platform.platform()+'\n'
# Opening vnlfile
if processIsMaster(): file = VNLFile('bulk_configuration_20091119142725.vnl')
# Select Bravais lattice and define lattice constants
bravais_lattice = FaceCenteredCubic(
a=5.000000 * Angstrom
)
# Define bulk elements and unit cell coordinates
elements = [Silicon, Silicon]
coordinates = [[ 0. , 0. , 0. ],
[ 1.25, 1.25, 1.25]]*Angstrom
# Set up bulk configuration
bulk_configuration = BulkConfiguration(
bravais_lattice,
elements,
cartesian_coordinates=coordinates
)
if processIsMaster(): nlPrint(bulk_configuration)
if processIsMaster(): file.addToSample(bulk_configuration, 'bulk_configuration')
######################################################################
# Parameters
######################################################################
exchange_correlation_type = LDA.PZ
iteration_mixing_parameters = iterationMixingParameters(
algorithm = IterationMixing.Pulay,
diagonal_mixing_parameter = 0.1,
quantity = IterationMixing.Hamiltonian,
history_steps = 6
)
eigenstate_occupation_parameters = eigenstateOccupationParameters(
temperature = 300.0*Kelvin
)
electron_density_parameters = electronDensityParameters(
mesh_cutoff = 150.0*Rydberg
)
basis_set_parameters = basisSetParameters(
type = DoubleZetaDoublePolarized,
radial_sampling_dr = 0.001*Bohr,
energy_shift = 0.01*Rydberg,
delta_rinn = 0.8,
v0 = 40.0*Rydberg,
charge = 0.0,
split_norm = 0.15
)
iteration_control_parameters = iterationControlParameters(
tolerance = 1e-05,
criterion = IterationControl.TotalEnergy,
max_steps = 100
)
brillouin_zone_integration_parameters = brillouinZoneIntegrationParameters(
monkhorst_pack_parameters = (5, 5, 5)
)
two_center_integral_parameters = twoCenterIntegralParameters(
cutoff = 2500.0*Rydberg,
points = 1024
)
######################################################################
# Initialize self-consistent field calculation
######################################################################
kohnsham_method = KohnShamMethod(
exchange_correlation_type = exchange_correlation_type,
iteration_mixing_parameters = iteration_mixing_parameters,
eigenstate_occupation_parameters = eigenstate_occupation_parameters,
electron_density_parameters = electron_density_parameters,
basis_set_parameters = basis_set_parameters,
iteration_control_parameters = iteration_control_parameters,
two_center_integral_parameters = two_center_integral_parameters,
brillouin_zone_integration_parameters = brillouin_zone_integration_parameters
)
if processIsMaster(): nlPrint(kohnsham_method)
runtime_parameters = runtimeParameters(
verbosity_level = 10,
checkpoint_filename = None
)
# Perform self-consistent field calculation
scf = executeSelfConsistentCalculation(
bulk_configuration,
kohnsham_method,
runtime_parameters = runtime_parameters
)
######################################################################
# Calculate physical properties
######################################################################
# Set verbosity level so that all energy components are printed
import ATK
verbosity_level=ATK.verbosityLevel()
ATK.setVerbosityLevel(10)
total_energy = calculateTotalEnergy(self_consistent_calculation = scf)
ATK.setVerbosityLevel(verbosity_level)
if processIsMaster(): nlPrint(total_energy,'Total energy')
if processIsMaster(): file.addToSample(total_energy, 'bulk_configuration', 'Total energy')
Could it be that the tutorial was calculated using a different version of ATK or with different method settings? I followed the tutorial when setting the method settings, which was leaving everything to its default value except for base type.