Author Topic: how to specify the spin for many atoms in the atk-13.8.1 with python language  (Read 2889 times)

0 Members and 1 Guest are viewing this topic.

Offline njuxyh

  • QuantumATK Guru
  • ****
  • Posts: 163
  • Reputation: 0
    • View Profile
Hi all:
in my system, i need to specify spin for about one hundred atoms, in the past,  i used the 2008 version, and i know how to specify the spin configuration with python language,

for example: according to the atomic position and atomic species, i specify the spin, the python language as fowllows:
define the scattering_elements initial_scaled_spin   
y1 =37.5000*Angstrom
#... (the value for y-coordinate at the boundary of the up edge of GNR)
y2 =16.00000*Angstrom
# ... (the value for y-coordinate at the boundary of the low  edge of GNR)

scattering_region_initial_scaled_spin = [0,]*len(scattering_elements)

for index in range(len(scattering_elements)):
        if (scattering_elements[index]==Carbon) :
                if (scattering_coordinates[index][1]> y1):
                      scattering_region_initial_scaled_spin[index]=1
                elif  (scattering_coordinates[index][1]< y2):
                       scattering_region_initial_scaled_spin[index]=1
#       else:   
#           scattering_region_initial_scaled_spin[index]=0

electrode_region_initial_scaled_spin = [0,]*len(electrode_elements)
for index in range(len(electrode_elements)):
       if (electrode_elements[index]==Carbon) :
                if (electrode_coordinates[index][1]> y1):
                       electrode_region_initial_scaled_spin[index]=1
                elif  (electrode_coordinates[index][1]< y2):
                       electrode_region_initial_scaled_spin[index]=1



but in the 13.8.1 version, how to specify the spin,
for there are only one input entry: initial_spin = InitialSpin(scaled_spins=......
no longer as that in the 2008 version.

i need your help, thanks very much!!

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5575
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys