1 Subroutine getNxyz(lambda,ic,Nxyz) 2c $Id$ 3 implicit none 4 5 integer lambda, ic, Nxyz(3) 6 7#include "sh_order.fh" 8 9 integer l, l3, nc 10 11c 12c Get the angular momentum exponents for the "ic" component of a shell of 13c Cartesian GTFs of angular momentum "lambda". 14c 15c The order of components in shells of increasing angular momentum was defined 16c by the routine "defNxyz" as follows: 17c 18c Data s/ 0,0,0 / 19c 20c Data p/ 1,0,0, 21c & 0,1,0, 22c & 0,0,1 / 23c 24c Data d/ 2,0,0, 25c & 1,1,0, 26c & 1,0,1, 27c & 0,2,0, 28c & 0,1,1, 29c & 0,0,2 / 30c 31c Data f/ 3,0,0, 32c & 2,1,0, 33c & 2,0,1, 34c & 1,2,0, 35c & 1,1,1, 36c & 1,0,2, 37c & 0,3,0, 38c & 0,2,1, 39c & 0,1,2, 40c & 0,0,3 / 41c 42c etc. 43c 44c****************************************************************************** 45 46c Define the angular momentum indices for the given shell component. 47#ifdef DEBUG 48 if( lambda.le.linit )then 49#endif 50 51 nc = (lambda*(lambda+1)*(lambda+2))/6 + ic 52 Nxyz(1) = Ixyz(1,nc) 53 Nxyz(2) = Ixyz(2,nc) 54 Nxyz(3) = Ixyz(3,nc) 55 56#ifdef DEBUG 57 else 58 59 write(*,*) 60 write(*,*) 'GETNXYZ: Shell component ordering was defined for' 61 write(*,*) ' shells up through L = ',linit,'.' 62 write(*,*) ' Initialization (defNxyz) should include ' 63 write(*,*) ' shells up through L = ',lambda,'.' 64 stop 65 66 end if 67#endif 68 69 end 70