QuantumATK Forum

QuantumATK => General Questions and Answers => Topic started by: njuxyh on May 14, 2013, 05:53

Title: how i put a one-by-one calculation in a *.py file
Post by: njuxyh on May 14, 2013, 05:53
i want do a complete calculation  for a two-probe system.

first: relax.
second: scf with initial spin
third:    calculate mulliken population and  spin-polarized transmission spectrum

so the working follows: see the attachment.

it is right?
Title: Re: how i put a one-by-one calculation in a *.py file
Post by: kstokbro on May 14, 2013, 07:09
This looks correct for doing what you suggest.
However, wouldn't you like to setup the correct initial spin for the relaxation also? In this case the initial state should be before optimization
Title: Re: how i put a one-by-one calculation in a *.py file
Post by: njuxyh on May 14, 2013, 10:22
i assume that the geometry configuration is not influenced by the spin, so i put the initial spin setup after the geometry relax.

i have  several related question about the work flowing: 

if i do a relaxing calculation without spin , so in the first New Calculator button,i set the spin  is unpolarized. 
then i do a scf calculation with spin. should i put a New Calculator button once again after Optimization button. so i can reset some parameters related spin ?

Title: Re: how i put a one-by-one calculation in a *.py file
Post by: zh on May 14, 2013, 13:06
i have  several related question about the work flowing: 

if i do a relaxing calculation without spin , so in the first New Calculator button,i set the spin  is unpolarized. 
then i do a scf calculation with spin. should i put a New Calculator button once again after Optimization button. so i can reset some parameters related spin ?

Of course, you can do that way. However, you have to check the part of defining the initial state  in the generated script file, e.g.,
# -------------------------------------------------------------
# Initial State
# -------------------------------------------------------------
initial_spin = InitialSpin(scaled_spins=[.....])
device_configuration.setCalculator(
    calculator,
    initial_spin=initial_spin,
)

It is better to adjust the above part  to be just before "device_configuration.update()".