This is the second time now i have ran an LDOS calculation, it ran for 10 hours, and it finished without giving results .. i dont understand it .. there are no error messages, and i am not sure what is going on .. it is like it just stops! attached is the log file
shown below is the calculation portion. ...
def doLDOS():
configuration = nlread(nc_files + outFileName, object_id="cfg")[0]
calculator = my_DeviceLCAOCalculator()
#configuration.setCalculator(calculator)
configuration.setCalculator(
calculator(electrode_voltages=(ldosBiasVoltage,0.0*Volt)),
initial_state=configuration)
metallic_region0 = configuration.metallicRegions()[0]
metallic_region1 = None
if doubleGate:
metallic_region1 = configuration.metallicRegions()[1]
configuration.setMetallicRegions([metallic_region0(value = ldosGateVoltage), metallic_region1(value = ldosGateVoltage)] )
else:
configuration.setMetallicRegions([metallic_region0(value = ldosGateVoltage)] )
configuration.update()
# Energies at which to compute the LDOS;
# arguments to linspace are (min, max, number of points)
energies = ldos_energies
# calculate ldos for each energy in the list
for energy in energies:
LDOS = LocalDeviceDensityOfStates(
configuration=configuration,
energy=energy,
kpoints=MonkhorstPackGrid(3,3),
contributions=All,
energy_zero_parameter=AverageFermiLevel,
infinitesimal=1e-06*eV,
self_energy_calculator=KrylovSelfEnergy(),
spin=Spin.Sum,
)
nlsave(nc_files + outFileName + '_ldos.nc', LDOS, object_id="LDOS at %s" % energy)
now = date.today()
nlprint("energy " + str(energy) + " done " + str(now.strftime("%m-%d-%y %I:%M %p")))
some values from my parameter file:
ldos_energies = numpy.linspace(-2,2,21)*eV
iteration_control_parameters = IterationControlParameters(number_of_history_steps=12, tolerance=1e-4)
numerical_accuracy_parameters = NumericalAccuracyParameters(k_point_sampling=(kPntsX, kPntsY, kPntsZ))
ldosBiasVoltage = 0.1*Volt
ldosGateVoltage = 0.0*Volt
its all part of a complicated script so i am pulling it apart
parameter file looks like this: (some not used in ldos)
# -------------------------------------------------------------
# setup parms
# -------------------------------------------------------------
from NanoLanguage import *
import numpy
import ase
logs = "../logs/"
nc_files = "../nc_files/"
plots = "../plots/"
# the number of carbon atoms to replace, every <dopingLvl> atoms
# or dope <dopingLvl>% of atoms when dopingType=2
dopingLvl = 2
dopingOn = True
dopingType = 3 # 1=edge, 2=random, 3=specific doping
outFileName = ""
outFileName2 = ""
# ran on stravinsky
gate_voltage_list = [0.01, 0.02, 0.03, 0.04, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.8, 1.0]*Volt #numpy.linspace(-0.2,0.5,15)*Volt
bias_voltage_list = [0.01, 0.025, 0.05, 0.1]*Volt
transSpecEnergies = numpy.linspace(-2,2,21)*eV
kPntsX = 1
kPntsY = 1 # don't need unless periodic here
kPntsZ = 1 #101 # always use odd so gamma point is included
ldos_energies = [1]*eV #numpy.linspace(-2,2,21)*eV
iteration_control_parameters = IterationControlParameters(number_of_history_steps=12, tolerance=1e-4)
numerical_accuracy_parameters = NumericalAccuracyParameters(k_point_sampling=(kPntsX, kPntsY, kPntsZ))
# bandstructure parms
pps=30 # points_per_segment
bafl=10 # bands_above_fermi_level
SCF = 1 # self consistent or not
ldosBiasVoltage = 0.1*Volt
ldosGateVoltage = 0.0*Volt
# set vacuum amount around device based on geometry, including gate
vac = 12.0*Ang
doubleGate = True
# atomic distances for length calcs
dist_1 = float(0.71043) * float(0.1)
dist_2 = float(3.55215) * float(0.1)
dist_3 = float(5.68344) * float(0.1) # atomic distances in nm
then the ldos calc:
def doLDOS():
configuration = nlread(nc_files + outFileName, object_id="cfg")[0]
calculator = my_DeviceLCAOCalculator()
#configuration.setCalculator(calculator)
configuration.setCalculator(
calculator(electrode_voltages=(ldosBiasVoltage,0.0*Volt)),
initial_state=configuration)
metallic_region0 = configuration.metallicRegions()[0]
metallic_region1 = None
if doubleGate:
metallic_region1 = configuration.metallicRegions()[1]
configuration.setMetallicRegions([metallic_region0(value = ldosGateVoltage), metallic_region1(value = ldosGateVoltage)] )
else:
configuration.setMetallicRegions([metallic_region0(value = ldosGateVoltage)] )
configuration.update()
# Energies at which to compute the LDOS;
# arguments to linspace are (min, max, number of points)
energies = ldos_energies
# calculate ldos for each energy in the list
for energy in energies:
LDOS = LocalDeviceDensityOfStates(
configuration=configuration,
energy=energy,
kpoints=MonkhorstPackGrid(3,3),
contributions=All,
energy_zero_parameter=AverageFermiLevel,
infinitesimal=1e-06*eV,
self_energy_calculator=KrylovSelfEnergy(),
spin=Spin.Sum,
)
nlsave(nc_files + outFileName + '_ldos.nc', LDOS, object_id="LDOS at %s" % energy)
now = date.today()
nlprint("energy " + str(energy) + " done " + str(now.strftime("%m-%d-%y %I:%M %p")))
and a supporting function:
def my_DeviceLCAOCalculator():
# -------------------------------------------------------------
# Calculator
# -------------------------------------------------------------
if SCF == 1:
#----------------------------------------
# Electrode Calculators
#----------------------------------------
left_electrode_calculator = LCAOCalculator(
numerical_accuracy_parameters=numerical_accuracy_parameters,
# set these for SCF
iteration_control_parameters=iteration_control_parameters,
)
right_electrode_calculator = LCAOCalculator(
numerical_accuracy_parameters=numerical_accuracy_parameters,
# set these for SCF
iteration_control_parameters=iteration_control_parameters,
)
#----------------------------------------
# Device Calculator
#----------------------------------------
calculator = DeviceLCAOCalculator(
# set these for SCF
numerical_accuracy_parameters=numerical_accuracy_parameters,
iteration_control_parameters=iteration_control_parameters,
electrode_calculators=
[left_electrode_calculator, right_electrode_calculator],
)
else:
#----------------------------------------
# Electrode Calculators
#----------------------------------------
left_electrode_calculator = LCAOCalculator(
iteration_control_parameters=NonSelfconsistent,
numerical_accuracy_parameters=numerical_accuracy_parameters,
)
right_electrode_calculator = LCAOCalculator(
iteration_control_parameters=NonSelfconsistent,
numerical_accuracy_parameters=numerical_accuracy_parameters,
)
#----------------------------------------
# Device Calculator
#----------------------------------------
device_algorithm_parameters = DeviceAlgorithmParameters(
initial_density_type=NeutralAtom(electrode_constraint_length=0.0*Ang),
)
calculator = DeviceLCAOCalculator(
numerical_accuracy_parameters=numerical_accuracy_parameters,
iteration_control_parameters=NonSelfconsistent,
device_algorithm_parameters = device_algorithm_parameters,
electrode_calculators= [left_electrode_calculator, right_electrode_calculator],
)
return calculator
Note SCF is 1
attached is the nc file with the device
I am wondering if this tells you anything that might help: the log file shows as below at the end, dont worry about the times those come from my script and they do not include time, but for at least 12 hours it has been on that last line stuck at 2.4eV .... not sure what is happening ... "top" command shows 2 processes at 100%, not much memory used about 8% total .. but it is just hanging ... any ideas? Again, i can't send the nc file because it is 4GB
| 79 H [ 12.000 , 16.368 , 30.708 ] 1.05825 0.05825 |
+------------------------------------------------------------------------------+
| 13 E = -93.1637 dE = 7.491420e-06 dH = 4.465593e-04 |
+------------------------------------------------------------------------------+
| Calculation Converged in 13 steps |
+------------------------------------------------------------------------------+
+------------------------------------------------------------------------------+
| |
| Device DFT Calculation [Finished Sat Mar 17 02:27:38 2012] |
| |
+------------------------------------------------------------------------------+
|--------------------------------------------------|
Calculating LDOS : ==================================================
energy -3.0 eV done 03-17-12 12:00 AM
|--------------------------------------------------|
Calculating LDOS : ==================================================
energy -2.8 eV done 03-17-12 12:00 AM
|--------------------------------------------------|
Calculating LDOS : ==================================================
energy -2.6 eV done 03-17-12 12:00 AM
|--------------------------------------------------|
Calculating LDOS : ==================================================
energy -2.4 eV done 03-17-12 12:00 AM
|--------------------------------------------------|
Calculating LDOS : ==================================================
energy -2.2 eV done 03-17-12 12:00 AM
|--------------------------------------------------|
Calculating LDOS : ==================================================
energy -2.0 eV done 03-17-12 12:00 AM
|--------------------------------------------------|
Calculating LDOS : ==================================================
energy -1.8 eV done 03-17-12 12:00 AM
|--------------------------------------------------|
Calculating LDOS : ==================================================
energy -1.6 eV done 03-17-12 12:00 AM
|--------------------------------------------------|
Calculating LDOS : ==================================================
energy -1.4 eV done 03-17-12 12:00 AM
|--------------------------------------------------|
Calculating LDOS : ==================================================
energy -1.2 eV done 03-17-12 12:00 AM
|--------------------------------------------------|
Calculating LDOS : ==================================================
energy -1.0 eV done 03-17-12 12:00 AM
|--------------------------------------------------|
Calculating LDOS : ==================================================
energy -0.8 eV done 03-17-12 12:00 AM
|--------------------------------------------------|
Calculating LDOS : ==================================================
energy -0.6 eV done 03-17-12 12:00 AM
|--------------------------------------------------|
Calculating LDOS : ==================================================
energy -0.4 eV done 03-17-12 12:00 AM
|--------------------------------------------------|
Calculating LDOS : ==================================================
energy -0.2 eV done 03-17-12 12:00 AM
|--------------------------------------------------|
Calculating LDOS : ==================================================
energy 0.0 eV done 03-17-12 12:00 AM
|--------------------------------------------------|
Calculating LDOS : ==================================================
energy 0.2 eV done 03-17-12 12:00 AM
|--------------------------------------------------|
Calculating LDOS : ==================================================
energy 0.4 eV done 03-17-12 12:00 AM
|--------------------------------------------------|
Calculating LDOS : ==================================================
energy 0.6 eV done 03-17-12 12:00 AM
|--------------------------------------------------|
Calculating LDOS : ==================================================
energy 0.8 eV done 03-17-12 12:00 AM
|--------------------------------------------------|
Calculating LDOS : ==================================================
energy 1.0 eV done 03-17-12 12:00 AM
|--------------------------------------------------|
Calculating LDOS : ==================================================
energy 1.2 eV done 03-17-12 12:00 AM
|--------------------------------------------------|
Calculating LDOS : ==================================================
energy 1.4 eV done 03-17-12 12:00 AM
|--------------------------------------------------|
Calculating LDOS : ==================================================
energy 1.6 eV done 03-17-12 12:00 AM
|--------------------------------------------------|
Calculating LDOS : ==================================================
energy 1.8 eV done 03-17-12 12:00 AM
|--------------------------------------------------|
Calculating LDOS : ==================================================
energy 2.0 eV done 03-17-12 12:00 AM
|--------------------------------------------------|
Calculating LDOS : ==================================================
energy 2.2 eV done 03-17-12 12:00 AM
|--------------------------------------------------|
Calculating LDOS : ==================================================
energy 2.4 eV done 03-17-12 12:00 AM
|--------------------------------------------------|
Calculating LDOS : ==================================================
In your routine doLDOS(), try replacing:
nlsave(nc_files + outFileName + '_ldos.nc', LDOS, object_id="LDOS at %s" % energy)
with
nlsave(nc_files + outFileName + '_ldos_%s.nc'%energy, LDOS, object_id="LDOS at %s" % energy)