from ATK.TwoProbe import * # Reopen old two-probe configuration vnl_file = VNLFile("lih2li.vnl") atomic_configuration = vnl_file.readAtomicConfigurations()["lih2li"] # Restore results from previous calculations bias0V = restoreSelfConsistentCalculation('lih2li-bias-0.0.nc') bias1V = restoreSelfConsistentCalculation('lih2li-bias-1.0.nc') # Calculate effective potentials ... pot_0V = calculateEffectivePotential(bias0V) pot_1V = calculateEffectivePotential(bias1V) # ... and find the difference = the voltage drop potential_drop = pot_1V - pot_0V # Store result in a new VNL file vnl_file = VNLFile("lih2li-voltdrop.vnl") vnl_file.addToSample(atomic_configuration,'lih2li-voltdrop') vnl_file.addToSample(potential_drop,'lih2li-voltdrop')