Author Topic: optimization under bias (10.8.0)  (Read 4805 times)

0 Members and 1 Guest are viewing this topic.

Offline sunray55

  • Regular QuantumATK user
  • **
  • Posts: 16
  • Reputation: 1
    • View Profile
optimization under bias (10.8.0)
« on: August 18, 2010, 04:42 »
I have two questions:
Q1, how to import the structure file "Au-DTB-Au.VNL" from the example folder of VNL2008.10 to VNL10.8.0, since the VNL format file is invalid in 10.8.0?
    (I try to open the Au-DTB-Au.VNL file in 2008.10 and save as to Au-DTB-Au.py file, and then import it into 10.8. However, an error shows "An error occurred
    The following error message was generated when running the script:
    The last 27 atoms of the central region must match the last 27 atoms of the right electrode region. Atom 75 of the central region was Au at (4.32537207 Ang, 2.497254786 Ang, 23.85660639 Ang), it should have been Au at (0.0 Ang, 0.0 Ang, 23.85660639 Ang).
Typically this is caused by a syntax error or a spelling mistake; the message above should be helpful in correcting the issue in such cases.
If you believe the error is caused by VNL itself, please report the issue to QuantumWise, and make sure to include the traceback (click "Show Details...") and the script")

Q2, I want to optimize the above structure under a bias (4 V) in the VNL10.8.0, since it argues that the new version (10.8) can do the real optimizaion under bias. The optimization calculaion is fine (
| Optimization Information                     Fx       Fy       Fz                    |
+------------------------------------------------------------------------------+
|   0 Au  [   7.930 ,   0.416 ,   1.177 ]   0.00000  0.00000  0.00000          |
...
|  26 Au  [   2.163 ,   7.076 ,   5.886 ]   0.00000  0.00000  0.00000          |
|  27 C   [   2.163 ,   3.746 ,   9.340 ]   0.00002 -0.37070 -0.47289          |
|  28 C   [   2.163 ,   2.537 ,  10.038 ]   0.00012  0.15417  1.02052          |
|  29 C   [   2.163 ,   2.537 ,  11.434 ]  -0.00002  0.58899 -2.46883          |
|  30 C   [   2.163 ,   3.746 ,  12.132 ]  -0.00014  0.45219  0.79718          |
|  31 C   [   2.163 ,   4.955 ,  11.434 ]  -0.00001 -1.06966 -2.09744          |
|  32 C   [   2.163 ,   4.955 ,  10.038 ]   0.00019  0.22143  0.79862          |
|  33 S   [   2.163 ,   3.746 ,   7.586 ]   0.00144 -0.06909  0.41823          |
|  34 H   [   2.163 ,   1.599 ,   9.496 ]  -0.00001 -3.08222 -1.47391          |
|  35 H   [   2.163 ,   1.599 ,  11.976 ]   0.00003 -3.46500  2.21446          |
|  36 S   [   2.163 ,   3.746 ,  13.886 ]  -0.00004  0.09841 -3.48203          |
|  37 H   [   2.163 ,   5.893 ,  11.976 ]  -0.00008  3.48056  2.25191          |
|  38 H   [   2.163 ,   5.893 ,   9.496 ]  -0.00010  3.06288 -1.45637          |
|  39 Au  [   7.930 ,   0.416 ,  15.586 ]   0.00000  0.00000  0.00000          |
...
|  65 Au  [   2.163 ,   7.076 ,  20.296 ]   0.00000  0.00000  0.00000          |
+------------------------------------------------------------------------------+
| Optimization step =  0 E = -7.1426e+04 eV Maximum force =  3.4806e+00 eV/Ang |
+------------------------------------------------------------------------------+
+------------------------------------------------------------------------------+
| Device Calculation  [Started Tue Aug 17 15:50:42 2010])

My question is why there is only one step of optimization before the device property calculation? What is the meaning of values of Forcexyz? The force difference before and after optimization? How to view the optimized structure? Why the structure of analysis.nc file is the same as the initial structure?
Sorry for too many questions. Many thanks.
BTW: I have 3 year experience in using ATK, but I still cannot manipulate the new version. Therefore, a detail manual/tutorial of the new version is necessory and important!                     

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5538
  • Country: dk
  • Reputation: 90
    • View Profile
    • QuantumATK at Synopsys
Re: optimization under bias (10.8.0)
« Reply #1 on: August 18, 2010, 09:22 »
A1: Those old example VNL files are really legacy files. I would rather build the structure fresh, to make sure you have control of the geometry. The quickest way to do that in 10.8 is to open the Custom builder (click "Custom" in the main window) called "Molecular Junction" (from the menu "Builders"), and then just drop the molecule attached to this answer (or some other one) on the "New molecule?" dropzone. Adjust indices of adsorption atoms, and you're done :)

If you still want to use the old example, then make sure you save it as the "Equivalent bulk" system from the 2008.10 Atomic Manipulator. Then, drop that Python file on the "Builder" in 10.8, center the atoms (important!) in Z, and click on the device icon to convert it to a two-probe. That system will be equivalent to the 2008.10 setup.

A2: There will be a header "Device calculation" for each step in the relaxation, so that's not strange. However, I'm wondering, does the calculation stop at this point, i.e. that's the end of the log file? If so, the reason you don't see any optimized structure is most likely that the script never completed the optimization.

I have a suspicion there is something that needs to be looked at here by us. Can you please post the script you ran?

The forces are just the forces on each atom, in eV/Ang.

We just published a new introductory tutorial on devices. I also strongly recommend the Upgrade guide, if you haven't already had a look at it.

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5538
  • Country: dk
  • Reputation: 90
    • View Profile
    • QuantumATK at Synopsys
Re: optimization under bias (10.8.0)
« Reply #2 on: August 24, 2010, 10:18 »
sunray55, I have an important question: the output you show above, is that the END of the log file, i.e. does it STOP there, the calculation does not continue with the relaxation, or it's still running (at the point)? We need to know if there is some problem with 10.8 that we should investigate or not.

Offline sunray55

  • Regular QuantumATK user
  • **
  • Posts: 16
  • Reputation: 1
    • View Profile
Re: optimization under bias (10.8.0)
« Reply #3 on: August 27, 2010, 04:43 »
Anders Blom, Thanks for your help.
it is not the end of the log file since it does not converge after 100 steps (the voltage is 4.0V). I have figured out how to optimize structure under high bias using 10.8 just like what we do to calculate I-V curve in 2008.10 version.
Firstly, we need optimize the structure under 0.0 V (constrain the electrode and several surface layers)
Next, we restore the .nc file of 0.0 V and change the voltage to 0.5 V. Do it again and again till to the high bias.
Note that we should increase the optimization steps.
However, I don't know how to realize the above calculation in the python script as that of the I-V calculaiton in 2008.10 version. Wish someone could provide the script.
Moreover, I don't understand the I-V curve calculation in the new version. Based on the tutorial, it just setup 1.0V and then plot the I-V curve based on 0.0V and 1.0V two points?! Does anyone could provid the script to calculate I-V curve script as well as 2008.10 version?
Many thanks!
Ray.

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5538
  • Country: dk
  • Reputation: 90
    • View Profile
    • QuantumATK at Synopsys
Re: optimization under bias (10.8.0)
« Reply #4 on: August 27, 2010, 08:57 »
There is a good recipe for I-V curve here: http://quantumwise.com/documents/tutorials/GrapheneJunctionDevice/XHTML/chap.current.html. For reference I include it below, in a bit adapted form:
Code: python
# Starting guess, in our case an existing calculation (let's say zero bias)
device_configuration = nlread("zerobias.nc",DeviceConfiguration)[0]
calculator = device_configuration.calculator()

# Define bias voltages, 9 points from 0 V to 2 V
# (zero bias will converge trivially, but this script also computes the transmission)
voltage_list=numpy.linspace(0.0,2.0,9)*Volt
for voltage in voltage_list:

    # Set new calculator with modified electrode voltages on the configuration 
    # Use the self consistent state of  the old calculation as starting input!
    device_configuration.setCalculator(
          calculator(electrode_voltages=(-0.5*voltage,0.5*voltage)), 
          initial_state=device_configuration)

    # Analysis
    filename = 'ivscan.nc'

    # Potential, so we can do voltage drop later
    electrostatic_potential = ElectrostaticDifferencePotential(device_configuration)
    nlsave(filename, electrostatic_potential, object_id='pot'+str(voltage))

    # Transmission, so we can compute the current later
    transmission_spectrum = TransmissionSpectrum(
        configuration=device_configuration,
        energies=numpy.linspace(-2,2,200)*eV,
        )
    nlsave(filename, transmission_spectrum,object_id='trans'+str(voltage))
Hope this helps! To add relaxation should be obvious, I hope.

Offline jdgayles16

  • QuantumATK Guru
  • ****
  • Posts: 108
  • Reputation: 0
    • View Profile
Re: optimization under bias (10.8.0)
« Reply #5 on: August 29, 2010, 23:30 »
when relaxing under bias and using the constraints its seems the forces are not printed for the constrained atoms?

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5538
  • Country: dk
  • Reputation: 90
    • View Profile
    • QuantumATK at Synopsys
Re: optimization under bias (10.8.0)
« Reply #6 on: September 1, 2010, 11:34 »
Odd. Please send output and input (privately if needed). We haven't made anything on purpose in the code to obtain this...