QuantumATK Forum
QuantumATK => General Questions and Answers => Topic started by: yangzw1985 on March 11, 2009, 11:02
-
Hi, everyone!
I want to know if the calculation be stopped when the calculation has not finished, can I continue the calculation?
Last time, I have spend two days to calculation a curves, but power failure when the calculation has not finished. It means I waster a lot of time.
Can anyone tell me how to continue a calculation being stopped un-finished?
Thanks!!
-
In the manual under the section executeSelfconsistentCalculation (http://www.quantumwise.com/documents/manuals/ATK-2008.10/ref.executeselfconsistentcalculation.html) you can find inspiration, but to summarize shortly.
Take a backup of the crashed netcdf file of the calculation and call it crash.nc
Then the following code will take this calculation and restart the calculation from this crash.nc
crashed_scf = restoreSelfConsistentCalculation('crash.nc')
new_scf = executeSelfConsistentCalculation(self_consistent_calculation=crashed_scf)
-
Hi,Nordland! To be honest, I can not understand what you have said accurately.
"Take a backup of the crashed netcdf file of the calculation and call it crash.nc"
can you give me more details? I didn't find any netcdf file in my computer.
"crashed_scf = restoreSelfConsistentCalculation('crash.nc')
new_scf = executeSelfConsistentCalculation(self_consistent_calculation=crashed_scf)"
where the quote should be place in order to re-continue a crashed calculation.
Thank you !
-
Look in the script you used for the calculation, in that file there should be something named checkpoint_filename or similar.
This will be the name of your netcdf file. A netcdf file has the extension .nc
-
Hi, Nordland! I have found the file,and I want to know
where the quote should be place in order to re-continue a crashed calculation.
Please give me some details.
please change the file and quote in the attached script.
Thanks!
-
You should have file in F:/li-h2-li/li-h2-li.nc, take a backup of this file
and call it something new like backup.nc.
Then should this script restart your calculation and use the old file for restarting:
from ATK.TwoProbe import *
from ATK.MPI import processIsMaster
# Opening vnlfile
if processIsMaster(): file = VNLFile('F:/li-h2-li/Li-H2-Li .vnl')
# Perform self-consistent field calculation
scf = executeSelfConsistentCalculation(
selfconsistent_calculation=restoreSelfConsistentCalculation('F:/li-h2-li/backup.nc')
######################################################################
# Calculate physical properties
######################################################################
import numpy
density_of_states = calculateDensityOfStates(
self_consistent_calculation = scf,
energies = numpy.arange(-12.0, 12.0+0.00480961923848, 0.0480961923848)*electronVolt,
brillouin_zone_integration_parameters = brillouinZoneIntegrationParameters((1, 1)),
green_function_infinitesimal = 1.0e-5*electronVolt
)
if processIsMaster(): nlPrint(density_of_states)
if processIsMaster(): file.addToSample(density_of_states, 'Li-H2-Li ', 'Density of states')