QuantumATK Forum

QuantumATK => General Questions and Answers => Topic started by: ATK-user-zuox on February 24, 2016, 14:49

Title: problem about optimizing lattice constant in the new ATK2015
Post by: ATK-user-zuox on February 24, 2016, 14:49
Hello, i tried to optimize the lattice constant of the MoS2 recently ,i read the tutorial http://quantumwise.com/forum/index.php?topic=29.0 (http://quantumwise.com/forum/index.php?topic=29.0).I used the easy  GaN.py example  and modified it as
Code
from stress_optimizers import *
import ATK; ATK.setVerbosityLevel(1)
from ATK.KohnSham import *
# Select Bravais lattice and define lattice constants
bravais_lattice = Hexagonal(
    a=3.160400 * Angstrom,
    c=12.29500 * Angstrom
    )

# Define bulk elements and unit cell coordinates
elements = [Molybdenum, Molybdenum, Sulfur, Sulfur, Sulfur, Sulfur]
coordinates = [[ 1.5802      ,  0.9123289,  3.073750   ],
               [ 1.5802      , -0.9123289,  9.221250   ],
               [ 1.5802      ,  0.9123289,  7.635195   ],
               [ 1.5802      , -0.9123289,  1.487695   ],
               [ 1.5802      ,  0.9123289,  10.80730   ],
               [ 1.5802      , -0.9123289,  4.659805   ]]*Angstrom 
# Set up bulk configuration
bulk_configuration = BulkConfiguration(
    bravais_lattice,
    elements,
    cartesian_coordinates=coordinates
    )

method = KohnShamMethod(brillouin_zone_integration_parameters = brillouinZoneIntegrationParameters((5,5,5)),
                        basis_set_parameters = basisSetParameters())
opt_conf = calculateOptimizedBulkConfiguration(bulk_configuration, method, runtimeParameters(1))
.
 runed it on my cluster  and the version is ATK2015.It quickly returned the error message:
Code
Traceback (most recent call last):
  File "MoS2.py", line 1, in <module>
Traceback (most recent call last):
  File "MoS2.py", line 1, in <module>
Traceback (most recent call last):
  File "MoS2.py", line 1, in <module>
Traceback (most recent call last):
  File "MoS2.py", line 1, in <module>
    from stress_optimizers import *
    from stress_optimizers import *
    from stress_optimizers import *
ImportError: No module named stress_optimizersImportError: No module named stress_optimizers
ImportError: No module named stress_optimizers
.
I am not aware about the program codes in ATK and can't fix this problem.

Thanks.
Title: Re: problem about optimizing lattice constant in the new ATK2015
Post by: Umberto Martinez on February 24, 2016, 14:59
That is a very very old piece of code. It won't work in ATK 2015.
An updated example for optimizing MoS2 monolayer is described here: http://docs.quantumwise.com/tutorials/vibrational_modes.html
Title: Re: problem about optimizing lattice constant in the new ATK2015
Post by: ATK-user-zuox on March 8, 2016, 14:23
Thank you very much to  professor Umberto ,i realised the new search docs websitehttp://docs.quantumwise.com/index.html (http://docs.quantumwise.com/index.html) is very useful  for new learners like me.