######################################################################## THIS IS A REPLY OF A REPLY OF A REPLIED E-MAIL TO UNDERSTAND... START FROM THE BOTTOM ######################################################################### Dear Jingmin Zhang , to add new terms to the hamiltonian, one has to create them using hilbertxx libraries. Practically, if you look at provaCoK, you have the code fragment joined below (***) Coeffs is basically the matrix described in the amarcord paper. You can also split contributions, fot example a perturbation on 3z2-r2 orbital would have 1 at the center of the matrix. On other orbitals one has to apply linear combinations. The only limitations is that the program work with real matrices. Some strange geometry could give complex terms, but generally some change of basis solves the problem for not too strange geometries. Regards Alessandro (***) int mfrom[25]; int mto [25]; { int count=0; for(int i=0; i<5; i++) { for(int j=0; j<5; j++) { mfrom[count]=j-2; mto [count]=i-2; count++; } } } { double coeffs[] = { 0.5 , 0, 0, 0, -0.5, 0 , 1, 0 ,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -0.5 , 0, 0, 0, 0.5 }; Hxx_Aops_Split_Generic(OP_T,NAMING::start_3d ,NAMING::m_3d , NAMING::s_3d, 2, 25, mfrom, mto, coeffs); } Jingmin Zhang wrote: > > Dear Dr. Mirone, > > Thanks for your great help. > HilbertXX does run successfully on my Linux PC. > But I want to simulate the Ti4+ L23 edge with different crystal-field symmetry (such as Oh, D4h, and so on) to compare the different spectra. How can I perform the calculations for arbitrary symmetry like Amarcord? > > Regards, > > Jingmin Zhang > > ----- Original Message ----- > From: "Alessandro Mirone" > To: ; ; > Sent: Thursday, January 29, 2004 3:25 PM > > > Hi, > > I have prepared an example for hilbertxx. > > > > With the packages I am going to send you get sources, but also binaries > > in a form > > that is linux-version/distribution independent. > > So you dont have to recompile anything ( unless you do big changes ) > > assuming you can get a linux-i386 system > > > > I am going to send you two files > > HILBERTXX.tar.gz > > and > > zhang.tgz (**** HILBERTXX_simpleExample.tgz in ftp directory *** ) > > in the next mail. > > > > You need also some libraries that you can get at > > ftp://ftp.esrf.fr/pub/scisoft/ESRF_sw/linux_i386_00 > > you need to download > > A) scisoft_ESRF_sw_linux_i386.tar.gz > > and untar it from / directory on a linux machine. > > It creates the directory /scisoft/ESRF_sw/linux_i386 where > > several libraries and utilities are ( gcc, python .... ) > > > > same thing for HILBERTXX.tar.gz and zhang.tgz. ( I send them in next > > e-mail ) > > > > B) HILBERTXX.tar.gz untars to > > > > /scisoft/ESRF_sw/linux_i386/PACKAGES/HILBERTXX > > > > C) zhang.tgz untars to > > 1) /scisoft/ESRF_sw/linux_i386/PACKAGES/HILBERTXX/DATA/zhang > > 2) /scisoft/ESRF_sw/linux_i386/PACKAGES/HILBERTXX/Sources/python/zhang > > 3) /scisoft/ESRF_sw/linux_i386/PACKAGES/HILBERTXX/WRAPPERS/ > > > > > > in directory 1) you have matrix defining the contributions to the > > hamiltonian. > > in dir 2) you have python script that recompose the hamiltonian > > components > > according to the parameters that you choose. > > In 3) you have just a script that set the good environment variables ( > > gcc, python.. resides > > in non standard directories ). > > > > D) To run immediately the script the command is > > /scisoft/ESRF_sw/linux_i386/PACKAGES/HILBERTXX/WRAPPERS/Zhang > > /scisoft/ESRF_sw/linux_i386/PACKAGES/HILBERTXX/Sources/python/zhang/driver.py > > > > ( all on the same line ) > > > > The files in dir 1) have been generated with program provaCoK. It > > depends on provaCoK.cc > > that was a similar example, so I put nel3d=0 and recompiled it. > > It generates hamiltonian contributions, using a second quantization > > formulation where states are represented > > by pieces of computer memory ( 011010....... ). > > To recompile ( if you need to ) the c++ programs you need : > > 1 ) before any compilation set the environment : > > source /scisoft/ESRF_sw/linux_i386/set_environment > > 2 ) make > > to recompile Hilbertxx libraries ( unusual big changes ) > > 3 ) make provaCoK > > to recompile provaCoK program > > > > Python scripts dont need recompilation, they are script. > > However there are python extension that are C++ routines wrapped into > > python. > > If you ever need to change these ( unusual big changes ) the command to > > recompile is > > python setup.py build > > > > > > Now back again to you specific case : the hamiltonian is recomposed as > > defined in script > > /scisoft/ESRF_sw/linux_i386/PACKAGES/HILBERTXX/Sources/python/zhang/mainfunctionsZhang.py > > > > You need to put the good values for interaction : G2 G4 Spin orbit and > > so on. You can get them > > running Cowan program or using amarcord or get them from papers. > > By the moment I have put dummy values in this script > > fragment(mainfunctionsZhang.py) > > > > > > coeff = [ 0.0 *reduc55 *27.2, # F2dd > > 0.0*reduc55 *27.2 , # F4dd > > 0.00356527 *27.2*par(self.SOfact) , # SO_3d > > ET, # crystal field > > spinH*cosH , # SpinH > > spinH*sinH/2.0, # SpinHp > > spinH*sinH/2.0 # SpinHm > > ] > > > > > > coeff_exc= [ 0.0 *reduc55 *27.2 , # F2dd > > 0.0*reduc55 *27.2 , # F4dd > > 0.00356527 *27.2 *par(self.SOfact), # SO_3d > > 0.366847*27.2, # SO_2p > > 0.268426*reduc *27.2 , # F2pd > > 0.204775 *reduc *27.2 , # G1pd > > 0.116557*reduc *27.2 , # G3pd > > ET, # excited_basis_T > > spinH*cosH , # SpinH > > spinH*sinH/2.0, # SpinHp > > spinH*sinH/2.0 # SpinHm > > ] > > where , for example 0.00356527 should be replaced with the proper > > spin-orbit interaction > > of the 3d shell in the excited configuration. > > The other variables ( reduc55, reduc, ET spinH... ) are parameters > > passed by driver.py > > as argument to the routines. > > > > I hope you can run succesfully hilbertxx > > Regards > > Alessandro Mirone > >