Author Topic: no results for ldos  (Read 22804 times)

0 Members and 1 Guest are viewing this topic.

Offline esp

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 318
  • Country: us
  • Reputation: 3
    • View Profile
    • University of Minnesota
no results for ldos
« on: February 14, 2012, 21:38 »
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. ...
Code
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:
Code

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

« Last Edit: February 14, 2012, 21:43 by esp »

Offline esp

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 318
  • Country: us
  • Reputation: 3
    • View Profile
    • University of Minnesota
Re: no results for ldos
« Reply #1 on: February 15, 2012, 00:30 »
oh by the way, there was simply no output .. no (nc) file at all ... when i ran my script i directed that output to a file .. that file simply has "ldos done" in it, which is what i printed after the call to atk ... as i said, mysterious
« Last Edit: February 15, 2012, 00:37 by esp »

Offline esp

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 318
  • Country: us
  • Reputation: 3
    • View Profile
    • University of Minnesota
Re: no results for ldos
« Reply #2 on: February 15, 2012, 01:24 »
also fyi just for reference maybe this helps .. trans calcs took about 15 minutes per calc for this same structure

Offline Nordland

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 812
  • Reputation: 18
    • View Profile
Re: no results for ldos
« Reply #3 on: February 15, 2012, 09:37 »
Could you try running the script with stupid parameters to see if the logic works or you have encounter a deeper problem?

Reduced the energies to a single point, make the LDOS using only 1,1,1 kpoint and see if it is able to run?

Offline esp

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 318
  • Country: us
  • Reputation: 3
    • View Profile
    • University of Minnesota
Re: no results for ldos
« Reply #4 on: February 15, 2012, 09:51 »
The simplest things escape me ... i am running now will post in a few minutes (hopefully)

Offline esp

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 318
  • Country: us
  • Reputation: 3
    • View Profile
    • University of Minnesota
Re: no results for ldos
« Reply #5 on: February 15, 2012, 10:12 »
My pc is totally unresponsive .. I have to wait or kill everything ... I think ldos does not work .... I am writin from my phone because it totally crashed my pc

Offline esp

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 318
  • Country: us
  • Reputation: 3
    • View Profile
    • University of Minnesota
Re: no results for ldos
« Reply #6 on: February 15, 2012, 10:28 »
ok back up again ... that kind of sucked .. as i watched control slowly slip away, i was hoping i would not lose my matlab program for VLSI CAD  ... my heart pounded faster and faster ... i tried to click the desktop, maybe start the task manager .. ... oh no .. how about that old "Break" key ... I dont have one!!! oh boy ... ok so killed the whole deal, matlab and all .. ouch


so i think what happened is that it was in an infinite loop, kept printing out "Converged in 17 steps", then restarting calculations ... memory was being sucked up, then my computer crashed .. seems like memory to me .. note that i have seen 100% memory utilization before on lab servers .. 3 different machines i have tried, never got a result ...
« Last Edit: February 15, 2012, 10:35 by esp »

Offline Nordland

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 812
  • Reputation: 18
    • View Profile
Re: no results for ldos
« Reply #7 on: February 15, 2012, 10:48 »
Can you send the script to me then I can try to run it here?

Offline esp

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 318
  • Country: us
  • Reputation: 3
    • View Profile
    • University of Minnesota
Re: no results for ldos
« Reply #8 on: February 15, 2012, 20:25 »
its all part of a complicated script so i am pulling it apart parameter file looks like this:  (some not used in ldos)
Code

# -------------------------------------------------------------
# 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:
Code

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:
Code

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

Offline esp

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 318
  • Country: us
  • Reputation: 3
    • View Profile
    • University of Minnesota
Re: no results for ldos
« Reply #9 on: February 15, 2012, 20:26 »
and note that the gate and bais voltages during the ldos calc i added only recently, not sure if that is ok or valid, seems reasonable to me (i want to see ldos under bias), but i had this problem also before i added those

Offline esp

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 318
  • Country: us
  • Reputation: 3
    • View Profile
    • University of Minnesota
Re: no results for ldos
« Reply #10 on: February 15, 2012, 20:28 »
and Norland I apologize i had to sleep it was 4am when i posted so sorry i posted the code like 8 hours later after you responded

Offline Nordland

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 812
  • Reputation: 18
    • View Profile
Re: no results for ldos
« Reply #11 on: February 15, 2012, 20:32 »
Sleep is highly overrated :)

I will try take a look at it.

Offline esp

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 318
  • Country: us
  • Reputation: 3
    • View Profile
    • University of Minnesota
Re: no results for ldos
« Reply #12 on: February 16, 2012, 22:35 »
any ideas yet? :)

i really need to do some ldos calcs if possible ... did you guys have a chance to take a look? is it a bug in software or did i do something wrong?
« Last Edit: February 27, 2012, 10:53 by esp »

Offline esp

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 318
  • Country: us
  • Reputation: 3
    • View Profile
    • University of Minnesota
Re: no results for ldos
« Reply #13 on: March 1, 2012, 22:08 »
Hey guys just checking on this one .. last time it killed several computers so i am reluctant to try again ..  since it has been 2 weeks, i am assumming there is a problem and it will be fixed on your side, is that correct? .. or maybe i did something wrong and i should redesign and try again .. please let me know .. i would love to see an LDOS plot before my trial license expires :)

Offline Nordland

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 812
  • Reputation: 18
    • View Profile
Re: no results for ldos
« Reply #14 on: March 3, 2012, 21:57 »
I am unable to reproduce in the sense that I am not running out of memory.

As the best I can see that is the problem - can you send me the SCF calculation as netcdf file?