|
fangyongxinxi
|
 |
« on: June 1, 2011, 04:52 » |
|
I want to do ENB calculation by ATK 2008.10, and I make a py file ( copy the format of c2h6 example in ATK 2008.10 ), the structure is periodic . When I run this script, it shows:
NLPolicyError: This instance of KohnSham Method can only be apply to a MoleculeConfiguration Terminated Abnormally
so, could you give example scripts about how to do NEB with the structures of periodic structure and two-probes structure.
Thanks.
my scripts: from ATK.KohnSham import *
super_cell = [[4, 0, 0], [0, 4, 0], [0, 0, 4]]*Angstrom
elements = [Hydrogen, Hydrogen, Hydrogen] coordinates = [[ 0. , 0. , 0. ], [ 0. , 0. , 0.80000001], [ 0. , 1.20000005, 0. ]]*Angstrom
rt_params = runtimeParameters(verbosity_level = 2) mesh = electronDensityParameters(mesh_cutoff = 20*Rydberg) basis = basisSetParameters (type = SingleZetaPolarized) dft_method = KohnShamMethod( basis_set_parameters = basis, electron_density_parameters = mesh )
# Import NEB routines from NLExamples import NEB from NLExamples import KohnShamSimulation from NLExamples import MDMin
# Collect simulations simulations = [] for n in range(20): # each configuration must be a unique class instance, # so it is neccesary to include the following lines: mol = PeriodicAtomConfiguration( super_cell, elements, cartesian_coordinates=coordinates ) sim = KohnShamSimulation(mol,dft_method,rt_params) simulations.append(sim)
# Define elements and unit cell coordinates elements = [Hydrogen, Hydrogen, Hydrogen] coordinates = [[ 0. , 0. , 0. ], [ 0. , 0. , 1.20000005], [ 0. , 0.8, 0. ]]*Angstrom # here we change the coordinate os the atoms in the box h2-h3
# Add the final configuration to simulations mol = PeriodicAtomConfiguration( super_cell, elements, cartesian_coordinates=coordinates ) sim = KohnShamSimulation(mol,dft_method,rt_params) simulations.append(sim)
# Setup the NEB simulation neb = NEB(simulations,linearpath=True,prefix='H3')
# Setup and run MD simulation for NEB dyn = MDMin(neb,dt=0.05,prefix='H3') dyn.run(20)
|