 ## Firefly and PC GAMESS-related discussion club

Learn how to ask questions correctly  Re^2: Orbitals sorting with firefly
Thanks for explanations Pedro!
My fault was considering indexes in orbitals as their positions in massive though you told about 'names' of orbitals itself without any relation of where it is at the moment. Just to ultimately confirm rearrangement logic, instructions

>iorder(119)=-123
>iorder(120)=-119

will give this sequence (exchange with names):
123, 119, 121, 122, 120

but no this (exchange with positions):
120, 123, 121, 122, 119

right?

Regards,
Alex

>First, you should understand that the command

>IORDER(n) =a,b,c,d ....

>fills the list of orbitals (starting at position n) with orbital numbers a,b,c,d , ... ĀA minus sign before the orbital numbermeans that the two orbitals should be exchanged( e.g.

> \$guess ĀIORDER(n)=-p Ā\$end Ā

> is the same as

> \$guess IORDER(n)=p IORDER(p)=n Ā\$end
>
>
>

>IORDER(119)=123,119,120,121,122
>
>
>is equivalent to:

>IORDER(119)=123
>IORDER(120)=119
>IORDER(121)=120
>IORDER(122)=121
>IORDER(123)=122

>The subsequent commands IORDER(121)=-477 IORDER(122)=-475 Āput orbital 477 in position 121 and orbital 475 in position 122. The orbital list then becomes:

>123 | 119 | 477 | 475 | 122 Ā orbital_id
>119 | 120 | 121 | 122 | 123 Ā position

>you can see that orbital 120 is nowhere to be found, and that is the reason for the error you see.

>your IORDER instructions should have been:

>iorder(116)=-32
>iorder(117)=-30
>iorder(118)=-104
>iorder(119)=-123
>iorder(120)=-119
>iorder(121)=-477
>iorder(122)=-475
>
>   Sun Sep 28 '14 2:22am   This message read 840 times