Author Topic: How to calculate the I-V (spin-down and spin-up ) with the 11.2?  (Read 10772 times)

0 Members and 1 Guest are viewing this topic.

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5575
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
You define "old_calculation" but you never use it :)     device_configuration.setCalculator(            calculator(electrode_voltages=(0.5*bias,-0.5*bias)),            initial_state=old_calculation     ) and then also do, in each step old_calculation = device_configuration So:
Code: python
# -------------------------------------------------------------  
# Initial State  
# -------------------------------------------------------------  
initial_spin = InitialSpin(scaled_spins=[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0])  
old_calculation = nlread('C:/Users/Alexander/Documents/VNL_tmp/CoFe-MgO-CoFe_para.nc', DeviceConfiguration)[0]  
  
device_configuration.setCalculator(calculator, initial_spin=initial_spin, initial_state=old_calculation)  
  
for bias in [0., 0.1, 0.3, 0.5, 0.7, 1.0, 1.3, 1.5]*Volt:    
    device_configuration.setCalculator(    
        calculator(electrode_voltages=(0.5*bias,-0.5*bias)),    
        initial_state=old_configuration  
    )    
      
    device_configuration.update()  
    nlsave('C:/Users/Alexander/Documents/VNL_tmp/CoFe-MgO-CoFe_para_I-V.nc', device_configuration)  
    old_configuration = device_configuration

Offline 1ight0ne

  • Regular QuantumATK user
  • **
  • Posts: 23
  • Country: ru
  • Reputation: 0
    • View Profile
You define "old_calculation" but you never use it :)

Thank you! Some day i can understand this python :)