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