DIPELM 2.0
Loading...
Searching...
No Matches
rmatrix_data.m File Reference

Functions

input_files, every_nth_energy input_files:every_nth_energy:Units:Input:Output:Input:final_state:initial_state:grid_vectors: (id dipole_tools,[every_nth_energy] id available,[Units] id show_states,[Input] id none,[Output] id Dyson_signs,[Input] final_state, initial_state, grid_vectors,[final_state] id state,[initial_state] id state,[grid_vectors] id grid_vectors)
n, 1 IMPORTANT:n_1:n_2:Input:phi:initial_state:final_state:grid_vectors: (id point,[n_1] gamma in case of NO2 coordinate,[n_2] ra in case of NO2 momentum_space_photodipoles,[Input] theta, phi, initial_state, final_state, grid_vectors theta,[phi] id electron,[initial_state] id state,[final_state] id state,[grid_vectors] id grid_vectors)
grid for internal coordinate (bending angle in degrees in case of NO2) % grid_vectors
grid for internal coordinate (asymmetric stretch in Bohr in case of NO2) % If grid_vectors
x, y, z n_1:n_2:Input:final_stateF:grid_vectors:Output:n_1:n_2:Input:initial_state:grid_vectors:Output:n_1:n_2:Input:final_state:grid_vectors:Output:n_1:n_2:Source_files:Molecule:Max_L:N_energies:N_final_states:N_initial_states:N_angular_points:N_atoms:Final_states: (gamma in case of NO2 coordinate,[n_2] ra in case of NO2 final_state_dipoles,[Input] final_stateI, final_stateF, grid_vectors final_stateI,[final_stateF] id required,[grid_vectors] id index,[Output] x, y, z coordinates,[n_1] gamma in case of NO2 coordinate,[n_2] ra in case of NO2 initial_state_energy,[Input] initial_state, grid_vectors,[initial_state] id state,[grid_vectors] id index,[Output] n_1, n_2 coordinates,[n_1] gamma in case of NO2 coordinate,[n_2] ra in case of NO2 final_state_energy,[Input] final_state, grid_vectors,[final_state] id state,[grid_vectors] id index,[Output] n_1, n_2 coordinates,[n_1] gamma in case of NO2 coordinate,[n_2] ra in case of NO2 structures,[Source_files] id rmatrix_data,[Molecule] id molecule,[Max_L] id momentum,[N_energies] id energies,[N_final_states] id states,[N_initial_states] id states,[N_angular_points] id signs,[N_atoms] id centre,[Final_states] 3, N_final_states Final_states)
 disp (msg) else error('Expecting either one or two arguments on input.') end if not(iscell(input_files)) error('The argument input_files must be a cell vector') end obj.N_geometries
end if not (ischar(input_files{geom, 1})) error('Path must be character') end msg
elseif not (isequal(obj.Molecule, C)) disp(obj.Molecule) disp(C) error('Flag Molecule is not the same for all geometries.') end %Read the dimensions C
 N_energies_geom (geom)
 C (4)=0
if not (isequal(ref, C)) disp(ref) disp(C) error('Dimension parameters are not the same for all geometries.') end end for i
 D (1:3, j)
if not (is_ref_geom) if not(isequal(obj.Final_states
end Read the atom coordinates (Bohr) for i
if is_ref_geom obj Angular_grid_cartesian (1, i)
x obj Angular_grid_cartesian (2, i)
y obj Angular_grid_cartesian (3, i)
z obj Angular_grid_cartesian (4, i)
obj Xlm_precalculated (lm, i)
end end elseif not (isequal(obj.Angular_grid_cartesian(:, i), C)) error('The angular grid is not the same for all geometries.') end end %Read the energy grid Energy_grid
Number and symmetry of the Dyson orbital (only needed for book keeping so I know which Dysons were taken from the R-matrix files). flag
elseif not (flag==obj.Dyson_orbitals{1, i, k}) % error('The Dyson orbital flags are not the same for all geometries.') end Dyson_signs
 fclose (fileID)
 energies (j, 1)
 map (geom)
end end if (geom_has_energy) have_energy
end end if (have_energy==true) obj.N_energies
 energies (obj.N_energies, 1)
 disp (strcat('Accepted energy:', str)) for geom
 disp (strcat('Dropping energy:', str)) end end obj.Electron_energies
obj Electron_energies (1:obj.N_energies, 1)
Put the dipoles from the Dipoles_read structure to the obj Dipoles structure disp ('Processing photodipoles arrays...') obj.Dipoles
obj Dipoles (1:obj.N_lm, 1:3, e, f, in, geom)
end end end end disp ('done')[obj.Internal_coordinates obj.Internal_coordinates_limits]
N_energies_geom(geom, 1) zeros ()
end end if map (i, 1)
interpolate for the given internal_coordinates if not (obj.Have_interpolant) error('Interpolation requested but not possible since the interpolant could not be const ructed.') end n_gamma = size([grid_vectors{2}],2)
number of gamma values else error ('On input the size of the cell array grid_vectors must be either 1 or 3.') end if final _state > obj.N_final_states||final _state<=0error('On input final _state was out of range.') end if initial_state > obj.N_initial_states||initial_state<=0error('On input initial_state was out of range.') end if geom = [grid_vectors{1}]
end if nargin nargin< 2 error('Expecting either 1 or 2 parameters on input.') end if final_state > obj N_final_states final_state<=0 error('On input final_state was out of range.') end if n_coords==0 geom=1;%no interpolation;use the geometry with index 1 elseif n_coords==2 geom=0;%interpolate for the given internal_coordinates if not(obj.Have_interpolant) error('Interpolation requested but not possible since the interpolant could not be constructed.') end n_gamma=size([grid_vectors{1}], 2);%number of gamma values n_ra=size([grid_vectors{2}], 2);%number of gamma values else error('On input the size of the cell array grid_vectors must be either 1 or 3.') end %Check the range of the internal_coordinates if geom==0 if not(n_coords==size(obj.Internal_coordinates_limits, 2)) error('The number of supplied grid vectors for the nuclear coordinates does not equal the actual number of nuclear coordinates.') end for i=1:n_coords vectors=[grid_vectors{i}];n=size([grid_vectors{i}], 2);for j=1:n if vectors(j)< obj.Internal_coordinates_limits(1, i) disp(num2str(vectors(j))) disp(num2str(obj.Internal_coordinates_limits(1, i))) error('On input internal coordinate was too small.') end if vectors(j) > obj Internal_coordinates_limits (2, i) disp(num2str(vectors(j))) disp(num2str(obj.Internal_coordinates_limits(1
end if nargin nargin< 2 error( 'Expecting either 1 or 2 parameters on input.') end if final_state > obj N_final_states final_state<=0 error( 'On input final_state was out of range.') end if n_coords==0 geom=1;%no interpolation;use the geometry with index 1 elseif n_coords==2 geom=0;%interpolate for the given internal_coordinates if not(obj.Have_interpolant) error( 'Interpolation requested but not possible since the interpolant could not be constructed.') end n_gamma=size([grid_vectors{1}], 2);%number of gamma values n_ra=size([grid_vectors{2}], 2);%number of gamma values else error( 'On input the size of the cell array grid_vectors must be either 1 or 3.') end %Check the range of the internal_coordinates if geom==0 if not(n_coords==size(obj.Internal_coordinates_limits, 2)) error( 'The number of supplied grid vectors for the nuclear coordinates does not equal the actual number of nuclear coordinates.') end for i=1:n_coords vectors=[grid_vectors{i}];n=size([grid_vectors{i}], 2);for j=1:n if vectors(j)< obj.Internal_coordinates_limits(1, i) disp(num2str(vectors(j))) disp(num2str(obj.Internal_coordinates_limits(1, i))) error( 'On input internal coordinate was too small.') end if vectors(j) > obj i error ('On input internal coordinate was too large.') end end end end if geom
 e (1:n_gamma, 1:n_ra)
if nargin< 6||nargindisp (nargin) error('The number of input parameters(excluding the object itself) must be either 5 or 6.') end if n_coords
Take the real spherical harmonic from the precalculated buffer where possible otherwise calculate it for the point given if found Xlm (1, lm)
end else Include interpolation accross geometries interpolation in energy (1D) and geometry(2D) for each of the x
end else Output is a matrix (3, n_en, n_en, n_en) corresponding to the x
end end end end end end Auxiliary functions needed to evaluate the dipoles in the momentum basis methods (Static, Hidden) function r
end if t1< t2 tmax=t1;else tmax=t2;end if abs(M) > J abs (N) > J r=0
end note that the meaning of theta and phi is swapped since xyz_to_tp uses the Mathematical convention for spherical coordinates (theta is azimuthal angle, phi is the polar angle)! function[t

Variables

 __pad0__
 n_1
 __pad1__
 __pad2__
is given then grid_vectors
is given then initial_stateF
is given then cell array of size corresponding to the number of internal nuclear coordinates If the grid_vectors are not given then the dipoles are evaluated for geometry with index Output
 __pad3__
 symmetry
spin Final_states
spin for each geometry
spin for each the internal nuclear coordinates In case of NO2 ninternal = 2 corresponding to the gamma
spin for each the internal nuclear coordinates In case of NO2 ra coordinates This array is only constructed if N_geometries Internal_coordinates_limits
spin for each the internal nuclear coordinates In case of NO2 ra coordinates This array is only constructed if N_geometries n = j
spin for each the internal nuclear coordinates In case of NO2 ra coordinates This array is only constructed if N_geometries where n is the number of internal nuclear coordinates At the moment n can be either or This array is only constructed if N_geometries Angular_grid_cartesian = zeros(4,obj.N_angular_points)
spin for each the internal nuclear coordinates In case of NO2 ra coordinates This array is only constructed if N_geometries where n is the number of internal nuclear coordinates At the moment n can be either or This array is only constructed if N_geometries containing the grid points(x, y, z, w) defining the angular grid. %Angular_grid_spherical elseif nargin
 msg = strcat('Accepting energies in steps of:',num2str(en_step))
obj Source_files = input_files
obj Have_interpolant = false
 Dipoles_read = cell(obj.N_geometries,1)
 Energy_grid = cell(obj.N_geometries,1)
 N_energies_geom = zeros(obj.N_geometries,1)
angular grid
angular etc All other geometries must contain the same data for the reference values if geom
else is_ref_geom = 0
 C = fgetl(fileID)
if is_ref_geom obj Molecule = C
Number of electron energies for this geometry if is_ref_geom obj Max_L = C(1)
obj N_lm = C(2)
obj N_final_states = C(3)
obj N_angular_points = C(5)
obj N_atoms = C(6)
obj N_initial_states = C(7)
Declarations obj Initial_states = cell(3,obj.N_initial_states,obj.N_geometries)
obj Atoms = cell(2,obj.N_atoms,obj.N_geometries)
 x
 y
 z
w obj Angular_grid_spherical = zeros(3,obj.N_angular_points)
 theta = obj.Angular_grid_spherical(1,i)
 phi = obj.Angular_grid_spherical(2,i)
w obj Xlm_precalculated = zeros(obj.N_lm,obj.N_angular_points)
obj Dyson_orbitals = cell(2,obj.N_final_states,obj.N_initial_states,obj.N_geometries)
we omit the energy grid from the check since we determine the common set of energy points at the end ref = [obj.Max_L
 D = fscanf(fileID,'%e',1)
 row
relative state number within its spin space symmetry Ssym = strcat(' Symmetry = ',num2str(C(2)))
state symmetry Sspin = strcat(' Spin = ',num2str(C(3)))
for j
end for i
quadrature weight note that theta and phi are swapped since xyz_to_tp uses the Mathematical convention for spherical coordinates [obj.Angular_grid_spherical(2, i) obj.Angular_grid_spherical(1, i)] = obj.xyz_to_tp(obj.Angular_grid_cartesian(1,i),obj.Angular_grid_cartesian(2,i),obj.Angular_grid_cartesian(3,i))
Precalculate Xlm = zeros(1,obj.N_lm)
 lm = 0
for l
Read the Dyson orbital signs evaluated on the angular grid for k
 Dnum = strcat(' Dyson orbital number = ',num2str(C(1)))
 Dsym = strcat(' Dyson orbital symmetry = ',num2str(C(2)))
end end Read the partial wave photoionization dipoles Re = fscanf(fileID,'%e',obj.N_lm*3*N_energies_geom(geom,1)*obj.N_final_states*obj.N_initial_states)
 Im = fscanf(fileID,'%e',obj.N_lm*3*N_energies_geom(geom,1)*obj.N_final_states*obj.N_initial_states)
 all_energies = [Energy_grid{1,1}]
 energies = zeros(n,1)
if obj N_geometries Find the common set of energy points
if obj N_geometries Find the common set of energy use the grid for geometry as the set of starting common points energy_map = zeros(n,obj.N_geometries,'int32')
obj N_energies = 0
 test = [Energy_grid{geom,1}]
 geom_has_energy = false
 break
else have_energy = false
 str = num2str(energies(i,1))
for in
Generate the griddedInterpolant for all dipole matrix elements
Generate the griddedInterpolant for all dipole matrix energies and Dyson orbital signs [obj.D_lm_xyz obj.Dipoles_initial obj.Dipoles_final obj.Energies_initial obj.Energies_final obj.Dyson_interpolant obj.Have_interpolant] = obj.construct_dipole_interpolant
obj Electron_energies = energies(1:n,1)
obj Dipoles = [Dipoles_read{geom,1}]
obj D_lm_xyz = cell(obj.N_lm,3,obj.N_final_states,obj.N_initial_states)
 X = zeros(obj.N_energies,1)
 V = zeros(obj.N_energies,1)
 ref_grid = [Energy_grid{geom,1}]
end end end end end obj Max_energy = max(obj.Electron_energies(:))
obj Min_energy = min(obj.Electron_energies(:))
end function show_states(obj) disp(strcat( 'Molecule else n_coords = 0
no interpolation
number of gamma values n_ra = size([grid_vectors{2}],2)
else s = zeros(obj.N_angular_points,n_gamma,n_ra)
end end end function e
end end function d
for xyz
list of energies n_en = size(energies,2)
else dinterp = zeros(obj.N_lm,3,n_en,n_en,n_en)
end found = 0
end else Output is a z dipole components evaluated for the n_en *n_en *n_en points in the energy
end else Output is a z dipole components evaluated for the n_en *n_en *n_en points in the gamma
 t1 = J-N
 t2 = J+M
 t3 = M-N
if t3 tmin = t3
return end S =sin(beta/2)
 tmp1 =sqrt(factorial(J+M)*factorial(J-M)*factorial(J+N)*factorial(J-N))
for t
end r = tmp
end note that the meaning of theta and phi is swapped since xyz_to_tp uses the Mathematical convention for spherical p
 fact = sqrt(x*x + y*y)

Function Documentation

◆ abs()

end if t1< t2 tmax=t1;else tmax=t2;end if abs(M) > J abs ( N )
pure virtual

◆ Angular_grid_cartesian() [1/4]

if is_ref_geom obj Angular_grid_cartesian ( 1 ,
i  )

◆ Angular_grid_cartesian() [2/4]

x obj Angular_grid_cartesian ( 2 ,
i  )

◆ Angular_grid_cartesian() [3/4]

y obj Angular_grid_cartesian ( 3 ,
i  )

◆ Angular_grid_cartesian() [4/4]

z obj Angular_grid_cartesian ( 4 ,
i  )

◆ C()

C ( 4 )
pure virtual

◆ coordinate() [1/2]

grid for internal coordinate ( asymmetric stretch in Bohr in case of NO2)
Here is the call graph for this function:

◆ coordinate() [2/2]

grid for internal coordinate ( bending angle in degrees in case of NO2)

◆ coordinates() [1/2]

end Read the atom coordinates ( Bohr )

◆ coordinates() [2/2]

end note that the meaning of theta and phi is swapped since xyz_to_tp uses the Mathematical convention for spherical coordinates ( theta is azimuthal angle,
phi is the polar angle )

◆ D()

D ( 1:3 ,
j  )

◆ Dipoles()

obj Dipoles ( 1:obj. N_lm,
1:3 ,
e ,
f ,
in ,
geom  )

◆ disp() [1/6]

end end end end disp ( 'done' )

◆ disp() [2/6]

Put the dipoles from the Dipoles_read structure to the obj Dipoles structure disp ( 'Processing photodipoles arrays...' )
Here is the call graph for this function:

◆ disp() [3/6]

disp(msg) else disp ( msg )
Initial value:
= 1:obj.N_geometries
%The first geometry will be used as a reference one
%for the energy
ra in Bohr d z components of the photoelectron dipole for the energy
Definition example_NO2.m:38
Example for single geometry
Definition example_NO2.m:6
Here is the call graph for this function:

◆ disp() [4/6]

if nargin< 6||nargin > disp ( nargin )
Here is the call graph for this function:

◆ disp() [5/6]

disp ( strcat( 'Accepted energy:', str) )
Here is the call graph for this function:

◆ disp() [6/6]

disp ( strcat( 'Dropping energy:', str) )
Here is the call graph for this function:

◆ e()

e ( 1:n_gamma ,
1:n_ra  )

◆ Electron_energies()

obj Electron_energies ( 1:obj. N_energies,
1  )

◆ energies() [1/2]

energies ( j ,
1  )

◆ energies() [2/2]

energies ( obj. N_energies,
1  )

◆ energy()

end else Include interpolation accross geometries interpolation in energy ( 1D )

◆ error() [1/2]

end if nargin nargin< 2 error('Expecting either 1 or 2 parameters on input.') end if final_state > obj N_final_states final_state<=0 error('On input final_state was out of range.') end if n_coords==0 geom=1;%no interpolation;use the geometry with index 1 elseif n_coords==2 geom=0;%interpolate for the given internal_coordinates if not(obj.Have_interpolant) error('Interpolation requested but not possible since the interpolant could not be constructed.') end n_gamma=size([grid_vectors{1}], 2);%number of gamma values n_ra=size([grid_vectors{2}], 2);%number of gamma values else error('On input the size of the cell array grid_vectors must be either 1 or 3.') end %Check the range of the internal_coordinates if geom==0 if not(n_coords==size(obj.Internal_coordinates_limits, 2)) error('The number of supplied grid vectors for the nuclear coordinates does not equal the actual number of nuclear coordinates.') end for i=1:n_coords vectors=[grid_vectors{i}];n=size([grid_vectors{i}], 2);for j=1:n if vectors(j)< obj.Internal_coordinates_limits(1, i) disp(num2str(vectors(j))) disp(num2str(obj.Internal_coordinates_limits(1, i))) error('On input internal coordinate was too small.') end if vectors(j) > obj i error ( 'On input internal coordinate was too large.' )
Here is the call graph for this function:

◆ error() [2/2]

number of gamma values else error ( 'On input the size of the cell array grid_vectors must be either 1 or 3.' ) = [grid_vectors{1}]
finalpure virtual
Here is the call graph for this function:

◆ fclose()

fclose ( fileID )

◆ if() [1/2]

end end if ( geom_has_energy )
Here is the call graph for this function:

◆ if() [2/2]

end end if ( have_energy = =true)
Here is the call graph for this function:

◆ IMPORTANT:n_1:n_2:Input:phi:initial_state:final_state:grid_vectors:()

n, 1 IMPORTANT:n_1:n_2:Input:phi:initial_state:final_state:grid_vectors: ( id point,
[n_1] gamma in case of NO2 coordinate,
[n_2] ra in case of NO2 momentum_space_photodipoles,
[Input] theta,phi,initial_state,final_state,grid_vectors theta,
[phi] id electron,
[initial_state] id state,
[final_state] id state,
[grid_vectors] id grid_vectors )
virtual

◆ input_files:every_nth_energy:Units:Input:Output:Input:final_state:initial_state:grid_vectors:()

input_files, every_nth_energy input_files:every_nth_energy:Units:Input:Output:Input:final_state:initial_state:grid_vectors: ( id dipole_tools,
[every_nth_energy] id available,
[Units] id show_states,
[Input] id none,
[Output] id Dyson_signs,
[Input] final_state,initial_state,grid_vectors ,
[final_state] id state,
[initial_state] id state,
[grid_vectors] id grid_vectors )
virtual

◆ Internal_coordinates_limits()

end if nargin nargin< 2 error( 'Expecting either 1 or 2 parameters on input.') end if final_state > obj N_final_states final_state<=0 error( 'On input final_state was out of range.') end if n_coords==0 geom=1;%no interpolation;use the geometry with index 1 elseif n_coords==2 geom=0;%interpolate for the given internal_coordinates if not(obj.Have_interpolant) error( 'Interpolation requested but not possible since the interpolant could not be constructed.') end n_gamma=size([grid_vectors{1}], 2);%number of gamma values n_ra=size([grid_vectors{2}], 2);%number of gamma values else error( 'On input the size of the cell array grid_vectors must be either 1 or 3.') end %Check the range of the internal_coordinates if geom==0 if not(n_coords==size(obj.Internal_coordinates_limits, 2)) error( 'The number of supplied grid vectors for the nuclear coordinates does not equal the actual number of nuclear coordinates.') end for i=1:n_coords vectors=[grid_vectors{i}];n=size([grid_vectors{i}], 2);for j=1:n if vectors(j)< obj.Internal_coordinates_limits(1, i) disp(num2str(vectors(j))) disp(num2str(obj.Internal_coordinates_limits(1, i))) error( 'On input internal coordinate was too small.') end if vectors(j) > obj Internal_coordinates_limits ( 2 ,
i  )
Here is the call graph for this function:

◆ map() [1/2]

map ( geom )
Here is the call graph for this function:

◆ map() [2/2]

end end if map ( i ,
1  )
Here is the call graph for this function:

◆ matrix()

end else Output is a matrix ( 3 ,
n_en ,
n_en ,
n_en  )

◆ methods()

end end end end end end Auxiliary functions needed to evaluate the dipoles in the momentum basis methods ( Static ,
Hidden  )
Here is the call graph for this function:

◆ n_1:n_2:Input:final_stateF:grid_vectors:Output:n_1:n_2:Input:initial_state:grid_vectors:Output:n_1:n_2:Input:final_state:grid_vectors:Output:n_1:n_2:Source_files:Molecule:Max_L:N_energies:N_final_states:N_initial_states:N_angular_points:N_atoms:Final_states:()

x, y, z n_1:n_2:Input:final_stateF:grid_vectors:Output:n_1:n_2:Input:initial_state:grid_vectors:Output:n_1:n_2:Input:final_state:grid_vectors:Output:n_1:n_2:Source_files:Molecule:Max_L:N_energies:N_final_states:N_initial_states:N_angular_points:N_atoms:Final_states: ( gamma in case of NO2 coordinate,
[n_2] ra in case of NO2 final_state_dipoles,
[Input] final_stateI,final_stateF,grid_vectors final_stateI,
[final_stateF] id required,
[grid_vectors] id index,
[Output] x,y,z coordinates,
[n_1] gamma in case of NO2 coordinate,
[n_2] ra in case of NO2 initial_state_energy,
[Input] initial_state,grid_vectors ,
[initial_state] id state,
[grid_vectors] id index,
[Output] n_1,n_2 coordinates,
[n_1] gamma in case of NO2 coordinate,
[n_2] ra in case of NO2 final_state_energy,
[Input] final_state,grid_vectors ,
[final_state] id state,
[grid_vectors] id index,
[Output] n_1,n_2 coordinates,
[n_1] gamma in case of NO2 coordinate,
[n_2] ra in case of NO2 structures,
[Source_files] id rmatrix_data,
[Molecule] id molecule,
[Max_L] id momentum,
[N_energies] id energies,
[N_final_states] id states,
[N_initial_states] id states,
[N_angular_points] id signs,
[N_atoms] id centre,
[Final_states] 3,N_final_states Final_states )
virtual

◆ N_energies_geom()

N_energies_geom ( geom )
Here is the call graph for this function:

◆ not() [1/7]

elseif not ( flag = =obj.Dyson_orbitals{1, ik})
Here is the call graph for this function:

◆ not() [2/7]

if not(is_ref_geom) if not ( is_ref_geom )
Here is the call graph for this function:

◆ not() [3/7]

end if not ( ischar(input_files{geom, 1}) )
Here is the call graph for this function:

◆ not() [4/7]

end end elseif not ( isequal(obj.Angular_grid_cartesian(:, i), C) )
Here is the call graph for this function:

◆ not() [5/7]

elseif not ( isequal(obj.Molecule, C) )
Here is the call graph for this function:

◆ not() [6/7]

if not ( isequal(ref, C) )
Here is the call graph for this function:

◆ not() [7/7]

interpolate for the given internal_coordinates if not ( obj. Have_interpolant) const = size([grid_vectors{2}],2)
Here is the call graph for this function:

◆ orbital()

Number and symmetry of the Dyson orbital ( only needed for book keeping so I know which Dysons were taken from the R-matrix files)
Here is the call graph for this function:

◆ Xlm()

Take the real spherical harmonic from the precalculated buffer where possible otherwise calculate it for the point given if found Xlm ( 1 ,
lm  )
Here is the call graph for this function:

◆ Xlm_precalculated()

obj Xlm_precalculated ( lm ,
i  )

◆ zeros()

N_energies_geom(geom, 1) zeros ( )
virtual

Variable Documentation

◆ __pad0__

__pad0__

◆ __pad1__

__pad1__

◆ __pad2__

__pad2__

◆ __pad3__

__pad3__

◆ all_energies

all_energies = [Energy_grid{1,1}]

◆ Angular_grid_cartesian

obj Angular_grid_cartesian = zeros(4,obj.N_angular_points)

◆ Angular_grid_spherical

w obj Angular_grid_spherical = zeros(3,obj.N_angular_points)

◆ Atoms

obj Atoms = cell(2,obj.N_atoms,obj.N_geometries)

◆ break

break

◆ C

C = fgetl(fileID)

◆ coordinates

quadrature weight note that theta and phi are swapped since xyz_to_tp uses the Mathematical convention for spherical coordinates[obj.Angular_grid_spherical(2, i) obj.Angular_grid_spherical(1, i)] = obj.xyz_to_tp(obj.Angular_grid_cartesian(1,i),obj.Angular_grid_cartesian(2,i),obj.Angular_grid_cartesian(3,i))

◆ D

D = fscanf(fileID,'%e',1)

◆ d

d
Initial value:
= final_state_dipoles(obj,final_stateI,final_stateF,grid_vectors)
if nargin == 4
if not(iscell(grid_vectors))
error('On input grid_vectors must a cell array.')
end
electron energy grid in Hartree d final_state dipoles for the pair of initial states with indices final_state d final_state_dipoles(initial_state, final_state) %dipoles for the pair of final states with indices initial_state
number of gamma values else error('On input the size of the cell array grid_vectors must be either 1 or 3.') end if final _state > obj.N_final_states||final _state<=0error('On input final _state was out of range.') end if initial_state > obj.N_initial_states||initial_state<=0error('On input initial_state was out of range.') end if geom
is given then grid_vectors
Definition rmatrix_data.m:62
spin for each the internal nuclear coordinates In case of NO2 ra coordinates This array is only constructed if N_geometries where n is the number of internal nuclear coordinates At the moment n can be either or This array is only constructed if N_geometries containing the grid points(x, y, z, w) defining the angular grid. %Angular_grid_spherical elseif nargin
Definition rmatrix_data.m:217
end if not(ischar(input_files{geom, 1})) error('Path must be character') end msg
end function show_states(obj) disp(strcat( 'Molecule else n_coords
Definition rmatrix_data.m:584

◆ D_lm_xyz

end end obj D_lm_xyz = cell(obj.N_lm,3,obj.N_final_states,obj.N_initial_states)

◆ dinterp

else dinterp = zeros(obj.N_lm,3,n_en,n_en,n_en)

◆ Dipoles

obj Dipoles = [Dipoles_read{geom,1}]

◆ Dipoles_read

Dipoles_read = cell(obj.N_geometries,1)

◆ Dnum

Dnum = strcat(' Dyson orbital number = ',num2str(C(1)))

◆ Dsym

Dsym = strcat(' Dyson orbital symmetry = ',num2str(C(2)))

◆ Dyson_orbitals

end obj Dyson_orbitals = cell(2,obj.N_final_states,obj.N_initial_states,obj.N_geometries)

◆ e

e
Initial value:
if nargin == 3
if not(iscell(grid_vectors))
error('On input grid_vectors must a cell array.')
end
ra in Bohr d z components of the photoelectron dipole for the ra grid d ra nuclear grid d final_state_energy(final_state,{gamma, ra}) %energies of the final state on the gamma
electron phi emission angle in radians final_state
Definition example_NO2.m:8

◆ Electron_energies

obj Electron_energies = energies(1:n,1)

◆ elements

Generate the griddedInterpolant for all dipole matrix elements

◆ energies

energies = zeros(n,1)

◆ energy

end else Output is a z dipole components evaluated for the n_en* n_en* n_en points in the energy

◆ Energy_grid

Energy_grid = cell(obj.N_geometries,1)

◆ energy_map

if obj N_geometries Find the common set of energy use the grid for geometry as the set of starting common points energy_map = zeros(n,obj.N_geometries,'int32')

◆ fact

fact = sqrt(x*x + y*y)

◆ Final_states

end obj Final_states
Initial value:
{2,i}: energy (in H) of the final state.
% Final_states{3,i}: array of dimensions (3,N_final_states) containing the three components of the dipole couplings between the i-th state and all other final states.
%Initial_states: cell array of dimensions (3,N_initial_states). The data in the cells is of the same type but this time for the bound initial states.
%Dyson_orbitals: cell array of dimensions (2,N_final_states,N_initial_states)
% Dyson_orbitals(1,f,i): string containing the label for the Dyson orbital corresponding to the initial state i and the final state f.
% Dyson_orbitals(2,f,i): array of dimension (N_angular_points,1) containing the signs of the Dyson orbitals evaluated on the angular grid.
%Atoms: cell array of dimensions (2,N_atoms).
% Atoms{1,i}: vector (3,1) containing the coordinates (in Bohr) of the i-th atom.
% Atoms{2,i}: string containing the name of the i-th atom.
%Internal_coordinates: array of dimensions(ninternal,N_geometries) containing
integer i
Definition dipelm_procs.f90:76
index of the final(cationic) state initial_state
obj N_initial_states
Definition rmatrix_data.m:282
for in
Definition rmatrix_data.m:498
Declarations obj Initial_states
Definition rmatrix_data.m:285
quadrature weight note that theta and phi are swapped since xyz_to_tp uses the Mathematical convention for spherical coordinates[obj.Angular_grid_spherical(2, i) obj.Angular_grid_spherical(1, i)]
Definition rmatrix_data.m:388
spin for each the internal nuclear coordinates In case of NO2 ninternal
Definition rmatrix_data.m:155
spin Final_states
Definition rmatrix_data.m:146
obj N_angular_points
Definition rmatrix_data.m:280
obj N_final_states
Definition rmatrix_data.m:279
obj N_atoms
Definition rmatrix_data.m:281
obj Atoms
Definition rmatrix_data.m:287

◆ found

end found = 0

◆ gamma

end else Output is a z dipole components evaluated for the n_en* n_en* n_en points in the gamma

◆ geom

end end end end if geom
Initial value:
== 1
else is_ref_geom
Definition rmatrix_data.m:253

◆ geom_has_energy

geom_has_energy = false

◆ geometry

spin for each geometry

◆ grid

angular grid

◆ grid_vectors

is given then grid_vectors
Initial value:
{3} must be present too.
% If only grid_vectors{1} is given then the photodipoles are evaluated for geometry with index 1.
%
% Output: complex(3,n_en,n_1,n_2)
% -------
% Photoelectron dipoles (x,y,z) evaluated for the given combination of initial and final states and photoelectron emission direction.
% n_en: size of the energy grid.
% n_1: size of the grid for internal coordinate 1 (gamma in case of NO2).
% n_2: size of the grid for internal coordinate 2 (ra in case of NO2).
% The photoelectron dipoles are evaluated interpolating the partial wave dipole matrix elements on the grid of energies and nuclear coordinates.
%
% initial_state_dipoles
% =====================
%
% Input: (initial_stateI,initial_stateF,grid_vectors)
% ------
% initial_stateI
type(moments) dipoles
Definition dipelm_procs.f90:69
gamma in degrees ra
Definition example_NO2.m:37
index of the initial(bound) state energy
ra in Bohr d y
Definition example_NO2.m:38
electron energy in Hartree gamma
Definition example_NO2.m:36
n_1
Definition rmatrix_data.m:40
z
Definition rmatrix_data.m:288
is given then initial_stateF
Definition rmatrix_data.m:79
x
Definition rmatrix_data.m:288
is given then cell array of size corresponding to the number of internal nuclear coordinates If the grid_vectors are not given then the dipoles are evaluated for geometry with index Output
Definition rmatrix_data.m:82
list of energies n_en
Definition rmatrix_data.m:922

◆ have_energy

else have_energy = false

◆ Have_interpolant

obj Have_interpolant = false

◆ i

end else Output is a z dipole components evaluated for the n_en* n_en* n_en points in the ra space for i
Initial value:
= 1:obj.N_final_states
C = fscanf(fileID,'%d',3)
electron energy grid in Hartree d final_state dipoles for the pair of initial states with indices final_state d final_state d Dyson_signs(final_state, initial_state) %Dyson orbital signs evaluated for the given pair of final and initial states %Exaple using multiple geometries C
Definition example_NO2.m:24

◆ Im

◆ in

for in
Initial value:
= 1:obj.N_initial_states
for f = 1:obj.N_final_states
for e = 1:obj.N_energies
end end end function e
Definition rmatrix_data.m:619
angular etc All other geometries must contain the same data for the reference values if geom
Definition rmatrix_data.m:250
if obj N_geometries Find the common set of energy use the grid for geometry as the set of starting common points energy_map
Definition rmatrix_data.m:455

◆ initial_stateF

is given then initial_stateF

◆ Initial_states

end obj Initial_states = cell(3,obj.N_initial_states,obj.N_geometries)

◆ Internal_coordinates_limits

spin for each the internal nuclear coordinates In case of NO2 ra coordinates This array is only constructed if N_geometries Internal_coordinates_limits

◆ interpolation

no interpolation

◆ is_ref_geom

else is_ref_geom = 0

◆ j

for j
Initial value:
=1:obj.N_initial_states
C = fscanf(fileID,'%e',3)

◆ k

Read the Dyson orbital signs evaluated on the angular grid for k
Initial value:
= 1:obj.N_initial_states
for i = 1:obj.N_final_states
C = fscanf(fileID,'%d',2)

◆ l

for l
Initial value:
=0:obj.Max_L
for m=-l:l
lm = lm + 1
integer m
Definition dipelm_procs.f90:397
integer l
Definition dipelm_procs.f90:397

◆ lm

lm = 0

◆ Max_energy

end end end end end obj Max_energy = max(obj.Electron_energies(:))

◆ Max_L

Number of electron energies for this geometry if is_ref_geom obj Max_L = C(1)

◆ Min_energy

obj Min_energy = min(obj.Electron_energies(:))

◆ Molecule

if is_ref_geom obj Molecule = C

◆ msg

if obj N_geometries msg = strcat('Accepting energies in steps of:',num2str(en_step))

◆ n

end end n = j

◆ n_1

is given then cell array of size corresponding to the number of internal nuclear coordinates If the grid_vectors are not given then the dipoles are evaluated for geometry with index n_1

◆ N_angular_points

obj N_angular_points = C(5)

◆ N_atoms

obj N_atoms = C(6)

◆ n_coords

use the geometry with index elseif n_coords = 0

◆ n_en

list of energies n_en = size(energies,2)

◆ N_energies

obj N_energies = 0

◆ N_energies_geom

N_energies_geom = zeros(obj.N_geometries,1)

◆ N_final_states

obj N_final_states = C(3)

◆ N_initial_states

obj N_initial_states = C(7)

◆ N_lm

obj N_lm = C(2)

◆ n_ra

number of gamma values n_ra = size([grid_vectors{2}],2)

◆ nargin

spin for each the internal nuclear coordinates In case of NO2 ra coordinates This array is only constructed if N_geometries where n is the number of internal nuclear coordinates At the moment n can be either or This array is only constructed if N_geometries containing the grid points (x,y,z,w) defining the angular grid. %Angular_grid_spherical elseif nargin
Initial value:
== 2
en_step = round(every_nth_energy)

◆ ninternal

spin for each the internal nuclear coordinates In case of NO2 ninternal = 2 corresponding to the gamma

◆ Output

is given then cell array of size corresponding to the number of internal nuclear coordinates If the grid_vectors are not given then the dipoles are evaluated for geometry with index Output

◆ p

end note that the meaning of theta and phi is swapped since xyz_to_tp uses the Mathematical convention for spherical p
Initial value:
= xyz_to_tp( x,y,z )
p = acos(z)
end note that the meaning of theta and phi is swapped since xyz_to_tp uses the Mathematical convention for spherical p
Definition rmatrix_data.m:1066

◆ phi

◆ points

if obj N_geometries Find the common set of energy points

◆ r

end r = tmp

◆ Re

end end Read the partial wave photoionization dipoles Re = fscanf(fileID,'%e',obj.N_lm*3*N_energies_geom(geom,1)*obj.N_final_states*obj.N_initial_states)

◆ ref

we omit the energy grid from the check since we determine the common set of energy points at the end ref = [obj.Max_L

◆ ref_grid

ref_grid = [Energy_grid{geom,1}]

◆ row

row
Initial value:
= initial state indices:
Snum = strcat(' Number = ',num2str(C(1)))

◆ S

return end S =sin(beta/2)

◆ s

else s = zeros(obj.N_angular_points,n_gamma,n_ra)

◆ signs

Generate the griddedInterpolant for all dipole matrix energies and Dyson orbital signs[obj.D_lm_xyz obj.Dipoles_initial obj.Dipoles_final obj.Energies_initial obj.Energies_final obj.Dyson_interpolant obj.Have_interpolant] = obj.construct_dipole_interpolant

◆ Source_files

obj Source_files = input_files

◆ Sspin

state symmetry Sspin = strcat(' Spin = ',num2str(C(3)))

◆ Ssym

relative state number within its spin space symmetry Ssym = strcat(' Symmetry = ',num2str(C(2)))

◆ str

end else str = num2str(energies(i,1))

◆ symmetry

symmetry

◆ t

for t
Initial value:
=tmin:tmax
tmp = tmp + ((-1)^t)*(tmp1/(factorial(J+M-t)*factorial(J-N-t)*factorial(t)*factorial(t+N-M)))*C^(2*J+M-N-2*t)*S^(2*t+N-M)
tmp1
Definition rmatrix_data.m:1055
if t3 tmin
Definition rmatrix_data.m:1037
for t
Definition rmatrix_data.m:1057
return end S
Definition rmatrix_data.m:1053

◆ t1

t1 = J-N

◆ t2

t2 = J+M

◆ t3

t3 = M-N

◆ test

test = [Energy_grid{geom,1}]

◆ theta

◆ tmin

else tmin = t3

◆ tmp1

tmp1 =sqrt(factorial(J+M)*factorial(J-M)*factorial(J+N)*factorial(J-N))

◆ V

◆ X

◆ x

x

◆ Xlm

else Xlm = zeros(1,obj.N_lm)

◆ Xlm_precalculated

w obj Xlm_precalculated = zeros(obj.N_lm,obj.N_angular_points)

◆ xyz

end else for xyz
Initial value:
= 1:3
d(xyz,1) = FD(xyz,final_stateF)
d
Definition example_NO2.m:28
for xyz
Definition rmatrix_data.m:810

◆ y

end else Output is a y

◆ z

z