QuantumATK Forum
QuantumATK => General Questions and Answers => Topic started by: xjtumse on November 18, 2009, 03:52
-
# Loop over lattice constants
import numpy
for a in numpy.arange(2.0,2.8,0.01):
# Define the unit cell
super_cell = [[ 12. , 0. , 0. ],
[ 0. , 12. , 0. ],
[ 0. , 0. , 11.075+2*a]]*Angstrom
# Define elements
elements = [Copper, Copper, Copper, Aluminium,
Copper, Copper, Copper]
# Define coordinates
coordinates = [[ 0. , 0. , 0. ],
[ 0. , 0. , 2.215 ],
[ 0. , 0. , 4.43 ],
[ 0. , 0. , 4.43+1*a ],
[ 0. , 0. , 4.43+2*a ],
[ 0. , 0. , 6.645+2*a ],
[ 0. , 0. , 8.86+2*a ]]*Angstrom
# Set up the periodic atom configuration
periodic_atom_configuration = PeriodicAtomConfiguration(
super_cell,
elements,
cartesian_coordinates=coordinates
)
When I run the program, it shows 'expected an indented block'. What does this mean?
-
You should write the python code like "a.py".
"Indentation" part of Python basics in ATK 2008.10 manual will help your understanding.
http://www.quantumwise.com/documents/manuals/ATK-2008.10/chap.pythonbas.html#sect1.pythonbas.indent
-
It does work. Thank you very much!