15
« on: June 1, 2011, 16:30 »
Dear all,
I got a problem, when the Equivalent Bulk calculation finished, it gives the following information:
File "Scf_NiCoCo.py", line 118, in ?
twoprobe_method
ATKError: inverse(DZMatrix const &) : Could not LU factorize!
As has been discussed, this may be related to the configuration of the system, but I cannot find the error with the configuration. I post the script below for help.
Here is a "two-probe" system. The left and reight Electrodes are of the same FCC(111) Cobalt buck of 3 layers, the Scattering regeion is 2-layer FCC(111) Cobalt surface + 1 Co adatom+ 36-atoms Nickel pyramidical tip+ 1 Co adatom + 2-layer FCC(111) Cobalt surface".
The script for the configuration, and the SCF calucation is given below.
File1, for construct the two-probe system
from ATK.TwoProbe import *
from numpy import *
path = '.'
# Li chain lattice constant
a = 3.52
d0 = a/1.414213562
b = 3.52
GRID_X = 2.44948974278*a/4.0
GRID_Y = 1.414213562373095*a/2.00
GRID_Z = 1.732050807568877*a/3.00
N_left=48
N_right=48
N_scatt=102
N_tip=36
# Construct the electrode unit cell
unit_cell = [ [4*GRID_X, 0.0, 0.0 ],
[0.0, 4*GRID_Y, 0.0 ],
[0.0, 0.0, 3*GRID_Z ] ] * Angstrom
unit_cell2 = [ [4*GRID_X, 0.0, 0.0 ],
[0.0, 4*GRID_Y, 0.0 ],
[0.0, 0.0, 3*GRID_Z ] ] * Angstrom
# Define the left electrode, the FCC Co(111) surf
electrode_left=array([
[ 2.8741, 1.2445, 0.0000],
[ 2.8741, 3.7335, 0.0000],
[ 2.8741, 6.2225, 0.0000],
[ 2.8741, 8.7116, 0.0000],
[ 5.0296, 0.0000, 0.0000],
[ 5.0296, 2.4890, 0.0000],
[ 5.0296, 4.9780, 0.0000],
[ 5.0296, 7.4670, 0.0000],
[ 7.1852, 1.2445, 0.0000],
[ 7.1852, 3.7335, 0.0000],
[ 7.1852, 6.2225, 0.0000],
[ 7.1852, 8.7116, 0.0000],
[ 0.7185, 0.0000, 0.0000],
[ 0.7185, 2.4890, 0.0000],
[ 0.7185, 4.9780, 0.0000],
[ 0.7185, 7.4670, 0.0000],
[ 0.0000, 1.2445, 2.0323],
[ 0.0000, 3.7335, 2.0323],
[ 0.0000, 6.2225, 2.0323],
[ 0.0000, 8.7116, 2.0323],
[ 2.1556, 0.0000, 2.0323],
[ 2.1556, 2.4890, 2.0323],
[ 2.1556, 4.9780, 2.0323],
[ 2.1556, 7.4670, 2.0323],
[ 4.3111, 1.2445, 2.0323],
[ 4.3111, 3.7335, 2.0323],
[ 4.3111, 6.2225, 2.0323],
[ 4.3111, 8.7116, 2.0323],
[ 6.4667, 0.0000, 2.0323],
[ 6.4667, 2.4890, 2.0323],
[ 6.4667, 4.9780, 2.0323],
[ 6.4667, 7.4670, 2.0323],
[ 1.4370, 1.2445, 4.0645],
[ 1.4370, 3.7335, 4.0645],
[ 1.4370, 6.2225, 4.0645],
[ 1.4370, 8.7116, 4.0645],
[ 3.5926, 0.0000, 4.0645],
[ 3.5926, 2.4890, 4.0645],
[ 3.5926, 4.9780, 4.0645],
[ 3.5926, 7.4670, 4.0645],
[ 5.7481, 1.2445, 4.0645],
[ 5.7481, 3.7335, 4.0645],
[ 5.7481, 6.2225, 4.0645],
[ 5.7481, 8.7116, 4.0645],
[ 7.9037, 0.0000, 4.0645],
[ 7.9037, 2.4890, 4.0645],
[ 7.9037, 4.9780, 4.0645],
[ 7.9037, 7.4670, 4.0645],
]
)
electrode_CoSub = PeriodicAtomConfiguration(
super_cell_vectors=unit_cell,
elements=N_left*[Cobalt],
cartesian_coordinates=electrode_left*Angstrom
)
# define the Co(001) sub-------------
eles=electrode_CoSub.elements()
print '\n','='*10, eles[1]
print '\n','='*10, eles[2]
# Electrode right, the Co(111) surf with a Co adatom Body Bulk---------
electrode_right=array([
[ 2.8741, 1.2445, 0.0000],
[ 2.8741, 3.7335, 0.0000],
[ 2.8741, 6.2225, 0.0000],
[ 2.8741, 8.7116, 0.0000],
[ 5.0296, 0.0000, 0.0000],
[ 5.0296, 2.4890, 0.0000],
[ 5.0296, 4.9780, 0.0000],
[ 5.0296, 7.4670, 0.0000],
[ 7.1852, 1.2445, 0.0000],
[ 7.1852, 3.7335, 0.0000],
[ 7.1852, 6.2225, 0.0000],
[ 7.1852, 8.7116, 0.0000],
[ 0.7185, 0.0000, 0.0000],
[ 0.7185, 2.4890, 0.0000],
[ 0.7185, 4.9780, 0.0000],
[ 0.7185, 7.4670, 0.0000],
[ 0.0000, 1.2445, 2.0323],
[ 0.0000, 3.7335, 2.0323],
[ 0.0000, 6.2225, 2.0323],
[ 0.0000, 8.7116, 2.0323],
[ 2.1556, 0.0000, 2.0323],
[ 2.1556, 2.4890, 2.0323],
[ 2.1556, 4.9780, 2.0323],
[ 2.1556, 7.4670, 2.0323],
[ 4.3111, 1.2445, 2.0323],
[ 4.3111, 3.7335, 2.0323],
[ 4.3111, 6.2225, 2.0323],
[ 4.3111, 8.7116, 2.0323],
[ 6.4667, 0.0000, 2.0323],
[ 6.4667, 2.4890, 2.0323],
[ 6.4667, 4.9780, 2.0323],
[ 6.4667, 7.4670, 2.0323],
[ 1.4370, 1.2445, 4.0645],
[ 1.4370, 3.7335, 4.0645],
[ 1.4370, 6.2225, 4.0645],
[ 1.4370, 8.7116, 4.0645],
[ 3.5926, 0.0000, 4.0645],
[ 3.5926, 2.4890, 4.0645],
[ 3.5926, 4.9780, 4.0645],
[ 3.5926, 7.4670, 4.0645],
[ 5.7481, 1.2445, 4.0645],
[ 5.7481, 3.7335, 4.0645],
[ 5.7481, 6.2225, 4.0645],
[ 5.7481, 8.7116, 4.0645],
[ 7.9037, 0.0000, 4.0645],
[ 7.9037, 2.4890, 4.0645],
[ 7.9037, 4.9780, 4.0645],
[ 7.9037, 7.4670, 4.0645],
]
)
#displace the Z coordinate of the electrode
electrode_right = electrode_right+[0,0,0]
electrode_NiBulk = PeriodicAtomConfiguration(
super_cell_vectors=unit_cell2,
elements=N_right*[Cobalt],
cartesian_coordinates=electrode_right*Angstrom
)
# Setup the two-probe scattering region
# The atoms in the central region
elements = 33*[Cobalt]+N_tip*[Nickel]+33*[Cobalt]
position2 = array([
[ 2.8741, 1.2445, 6.0968],
[ 2.8741, 3.7335, 6.0968],
[ 2.8741, 6.2225, 6.0968],
[ 2.8741, 8.7116, 6.0968],
[ 5.0296, 0.0000, 6.0968],
[ 5.0296, 2.4890, 6.0968],
[ 5.0296, 4.9780, 6.0968],
[ 5.0296, 7.4670, 6.0968],
[ 7.1852, 1.2445, 6.0968],
[ 7.1852, 3.7335, 6.0968],
[ 7.1852, 6.2225, 6.0968],
[ 7.1852, 8.7116, 6.0968],
[ 0.7185, 0.0000, 6.0968],
[ 0.7185, 2.4890, 6.0968],
[ 0.7185, 4.9780, 6.0968],
[ 0.7185, 7.4670, 6.0968],
[ 0.0000, 1.2445, 8.1291],
[ 0.0000, 3.7335, 8.1291],
[ 0.0000, 6.2225, 8.1291],
[ 0.0000, 8.7116, 8.1291],
[ 2.1556, 0.0000, 8.1291],
[ 2.1556, 2.4890, 8.1291],
[ 2.1556, 4.9780, 8.1291],
[ 2.1556, 7.4670, 8.1291],
[ 4.3111, 1.2445, 8.1291],
[ 4.3111, 3.7335, 8.1291],
[ 4.3111, 6.2225, 8.1291],
[ 4.3111, 8.7116, 8.1291],
[ 6.4667, 0.0000, 8.1291],
[ 6.4667, 2.4890, 8.1291],
[ 6.4667, 4.9780, 8.1291],
[ 6.4667, 7.4670, 8.1291],
[ 3.5926, 4.9780, 10.1614],
[ 3.5926, 4.9780, 16.1614],
[ 2.8741, 3.7335, 18.1936],
[ 2.8741, 6.2225, 18.1936],
[ 5.0296, 4.9780, 18.1936],
[ 2.1556, 2.4890, 20.2259],
[ 2.1556, 4.9780, 20.2259],
[ 2.1556, 7.4670, 20.2259],
[ 4.3111, 3.7335, 20.2259],
[ 4.3111, 6.2225, 20.2259],
[ 6.4667, 4.9780, 20.2259],
[ 1.4370, 1.2445, 22.2582],
[ 1.4370, 3.7335, 22.2582],
[ 1.4370, 6.2225, 22.2582],
[ 3.5926, 2.4890, 22.2582],
[ 3.5926, 4.9780, 22.2582],
[ 3.5926, 7.4670, 22.2582],
[ 5.7481, 3.7335, 22.2582],
[ 5.7481, 6.2225, 22.2582],
[ 0.7185, 2.4890, 24.2905],
[ 0.7185, 4.9780, 24.2905],
[ 2.8741, 1.2445, 24.2905],
[ 2.8741, 3.7335, 24.2905],
[ 2.8741, 6.2225, 24.2905],
[ 5.0296, 2.4890, 24.2905],
[ 5.0296, 4.9780, 24.2905],
[ 5.0296, 7.4670, 24.2905],
[ 0.0000, 3.7335, 26.3227],
[ 2.1556, 2.4890, 26.3227],
[ 2.1556, 4.9780, 26.3227],
[ 4.3111, 1.2445, 26.3227],
[ 4.3111, 3.7335, 26.3227],
[ 4.3111, 6.2225, 26.3227],
[ 1.4370, 3.7335, 28.3550],
[ 3.5926, 2.4890, 28.3550],
[ 3.5926, 4.9780, 28.3550],
[ 2.8741, 3.7335, 30.3873],
[ 2.8741, 3.7335, 36.3873],
[ 0.0000, 1.2445, 38.4195],
[ 0.0000, 3.7335, 38.4195],
[ 0.0000, 6.2225, 38.4195],
[ 0.0000, 8.7116, 38.4195],
[ 2.1556, 0.0000, 38.4195],
[ 2.1556, 2.4890, 38.4195],
[ 2.1556, 4.9780, 38.4195],
[ 2.1556, 7.4670, 38.4195],
[ 4.3111, 1.2445, 38.4195],
[ 4.3111, 3.7335, 38.4195],
[ 4.3111, 6.2225, 38.4195],
[ 4.3111, 8.7116, 38.4195],
[ 6.4667, 0.0000, 38.4195],
[ 6.4667, 2.4890, 38.4195],
[ 6.4667, 4.9780, 38.4195],
[ 6.4667, 7.4670, 38.4195],
[ 1.4370, 1.2445, 40.4518],
[ 1.4370, 3.7335, 40.4518],
[ 1.4370, 6.2225, 40.4518],
[ 1.4370, 8.7116, 40.4518],
[ 3.5926, 0.0000, 40.4518],
[ 3.5926, 2.4890, 40.4518],
[ 3.5926, 4.9780, 40.4518],
[ 3.5926, 7.4670, 40.4518],
[ 5.7481, 1.2445, 40.4518],
[ 5.7481, 3.7335, 40.4518],
[ 5.7481, 6.2225, 40.4518],
[ 5.7481, 8.7116, 40.4518],
[ 7.9037, 0.0000, 40.4518],
[ 7.9037, 2.4890, 40.4518],
[ 7.9037, 4.9780, 40.4518],
[ 7.9037, 7.4670, 40.4518],
]
)
# Combine electrode and scattering region
# into a two-probe system
#displace the Z coordinate of the electrode
two_probe = TwoProbeConfiguration(
electrodes = (electrode_CoSub,electrode_NiBulk),
scattering_region_elements = elements,
scattering_region_cartesian_coordinates = position2* Angstrom,
equivalent_atoms= [(0,0),(19,74)]
)
print
## Export the two-probe system to VNL file.
#vnl_file = VNLFile("F:\data\ATK\NiCoCoCu(111)\Scf\4.8\NiCoCo.vnl")
#vnl_file.addToSample(two_probe, "F:\data\ATK\NiCoCoCu(111)\Scf\4.8\NiCoCo")
vnl_file = VNLFile("./NiCoCo.vnl")
vnl_file.addToSample(two_probe, "./NiCoCo")
=====================================
file2 for SCF calculation
from ATK.TwoProbe import *
# -- Parameters --------------------------------
NumCoLeft=3*4*4
NumCo1Cent=4*4*2+1
NumCo2Cent=4*4*2+1
NumNiCent=36
NumNiRight=3*4*4
parallel_spin = True
# ----------------------------------------------
scf_kpoints = (3,3,100)
mesh_cutoff = 150.*Rydberg
xc = GGA.PBE
temperature = 1000.*Kelvin
tolerance = 1e-5
basis_set_parameters = [
# basisSetParameters(SingleZetaPolarized,element = Copper),
basisSetParameters(SingleZetaPolarized,element = Cobalt),
basisSetParameters(SingleZetaPolarized,element = Nickel)
]
# ----------------------------------------------
diagonal_mixing_parameter = 0.05
history_steps = 10
max_steps = 400
integral_lower_bound = 3.*Rydberg
circle_points = 30
real_axis_point_density = 0.005*electronVolt
# ----------------------------------------------
path = '.' # For parallel, set to absolute path, like '/home/user/FeMgO'
vnl_filename = "NiCoCo.vnl"
verbosity = 10
checkpoint_filename = "NiCoCoCheck.nc"
# ----------------------------------------------
vnl_file = VNLFile(path+'/'+vnl_filename)
NiCoSys = vnl_file.readAtomicConfigurations()
twoprobe_configuration = NiCoSys[NiCoSys.keys()[0]]
# Initial spins
left_electrode_initial_scaled_spin = [ 0.52,]*NumCoLeft
central_region_initial_scaled_spin =[ 0.52,]*NumCo1Cent+[ 0.32,]*NumNiCent+[ 0.52,]*NumCo2Cent
right_electrode_initial_scaled_spin = [0.32,]*NumNiRight
# Define electrode parameters
left_electrode_parameters = ElectrodeParameters(
brillouin_zone_integration_parameters = brillouinZoneIntegrationParameters(scf_kpoints),
electron_density_parameters = electronDensityParameters(
mesh_cutoff = mesh_cutoff,
initial_scaled_spin = left_electrode_initial_scaled_spin
),
iteration_mixing_parameters = iterationMixingParameters(
diagonal_mixing_parameter = diagonal_mixing_parameter,
history_steps = history_steps
),
iteration_control_parameters = iterationControlParameters(
tolerance = tolerance,
max_steps = max_steps
),
eigenstate_occupation_parameters = eigenstateOccupationParameters(
temperature = temperature
)
)
right_electrode_parameters = ElectrodeParameters(
brillouin_zone_integration_parameters = brillouinZoneIntegrationParameters(scf_kpoints),
electron_density_parameters = electronDensityParameters(
mesh_cutoff = mesh_cutoff,
initial_scaled_spin = right_electrode_initial_scaled_spin
),
iteration_mixing_parameters = iterationMixingParameters(
diagonal_mixing_parameter = diagonal_mixing_parameter,
history_steps = history_steps
),
iteration_control_parameters = iterationControlParameters(
tolerance = tolerance,
max_steps = max_steps
),
eigenstate_occupation_parameters = eigenstateOccupationParameters(
temperature = temperature
)
)
# Define two-probe method
twoprobe_method = TwoProbeMethod(
electrode_parameters = (left_electrode_parameters,right_electrode_parameters),
exchange_correlation_type = xc,
basis_set_parameters = basis_set_parameters,
electron_density_parameters = electronDensityParameters(
mesh_cutoff = mesh_cutoff,
initial_scaled_spin = central_region_initial_scaled_spin
),
iteration_mixing_parameters = iterationMixingParameters(
diagonal_mixing_parameter = diagonal_mixing_parameter,
history_steps = history_steps
),
iteration_control_parameters = iterationControlParameters(
tolerance = tolerance,
max_steps = max_steps
),
energy_contour_integral_parameters = energyContourIntegralParameters(
integral_lower_bound = integral_lower_bound,
circle_points = circle_points,
real_axis_point_density = real_axis_point_density
),
algorithm_parameters = twoProbeAlgorithmParameters(
# initial_density_type = InitialDensityType.NeutralAtom
)
)
import ATK
ATK.setVerbosityLevel(verbosity)
ATK.setCheckpointFilename(checkpoint_filename)
self_consistent_calculation = executeSelfConsistentCalculation(
twoprobe_configuration,
twoprobe_method
)
Thanks for any suggestions!