# Import the KohnSham module from ATK from ATK.KohnSham import * # Read self consistent calculation from NetCDF file scf = restoreSelfConsistentCalculation('h2.nc') # Set the force tolerance opt = geometricOptimizationParameters( force_tolerance=0.00001*electronVolt/Angstrom ) # Set name of check point file params = runtimeParameters( verbosity_level=10 ) # Calculate the optimized atomic geometry h2_opt = calculateOptimizedAtomicGeometry( self_consistent_calculation=scf, optimization_parameters=opt, runtime_parameters=params ) # Print the coordinates of the individual atoms print '\nAtom coordinates\n---------------------------' for coord in h2_opt.cartesianCoordinates(): for c in coord: print '%7.4f' % (c.inUnitsOf(Angstrom)), print