id_list = [ 'ivcurve000', 'ivcurve001', 'ivcurve002', 'ivcurve003', 'ivcurve004', 'ivcurve005', ] for id_item in id_list: # Read the DeviceConfiguration configuration = nlread('ivcurve_selfconsistent_configurations.nc', object_id="%s" %id_item)[0] # ------------------------------------------------------------- # Electrostatic Difference Potential # ------------------------------------------------------------- electrostatic_difference_potential = ElectrostaticDifferencePotential(configuration) nlsave('analysis.nc', electrostatic_difference_potential)