<br><pre>Dear colleagues,</pre><pre> recently,I want to use a loop program to optimize CH3Cl(Cs) with casscf method.And</pre><pre>I try to use the following design:</pre><pre>***,ch3cl
memory,384,m;
!file,2,ch3ccl-single_point-test.wfu
basis={
spdf,c,avtz;c;
spd,h,avtz;c;
spdf,Cl,aug-cc-pV(T+d)Z;c;
}
rch2=1.1;
alpha=108.8;
beta=108.8;
delta=120;
geometry={Z;
ang;
c,
Cl,c,r1(i);
h1,c,r2(i),Cl,alpha;
h2,c,rch2,Cl,beta,h1,delta;
h3,c,rch2,Cl,beta,h2,delta;}
distance1=[1.8,1.7,1.6,1.5,1.4]
distance2=[1.1,1.0,0.9,0.8]
i=0
do ir1=1,#distance1
do ir2=1,#distance2
i=i+1
r1(i)=distance1(ir1)
r2(i)=distance2(ir2)
{hf;wf,26,1,0;}
{multi;occ,12,5;closed,5,1;
wf,26,1,0;state,2;
wf,26,2,0;state,1;
}
optg;
enddo
enddo
---
</pre><div>However,everytime when the "distance2" loop is over, there is a big gap between the two configuration before and after.For example, [1.7,1.1]come after[1.8,0.8].So I want the second loop run in reverse direction when the number of first loop is even.But,the i is the total count value.So I am confused about how to use IF command to achieve my aim.</div><div>Generally speaking, I have two question:</div><div>1. the value of rch, alpha,beta and delta in next loop is the the result of previous or not?(I mean the result of previous cycle or the initial value I set)</div><div>2. How to make the second loop run in reversed direction when the the number of first loop is even?(I want to use IF command,but "i" is total count value.And I also don't know the command of reverse loop)</div><div> Any suggestions will be appreciated.</div><div><br></div><div>best regard<br><br>-kai</div><br class="Apple-interchange-newline"><div> </div><br><span></span><br><br><br>