-
Notifications
You must be signed in to change notification settings - Fork 1
QMol_TDSE_abs_CAP
Absorbing boundaries using a complex absorbing potential (CAP) at the edges of the discretization domain.
Use QMol_TDSE_abs_CAP to describe absorbing boundaries with a CAP. During the TDSE propagation, the CAP is added to the potential.
The QMol_TDSE_abs_CAP class defines the following public get-access properties; each can be changed using the set method:
Amplitude of the CAP [ positive scalar (default 0.5) ]
- When constructing the CAP, the selected
shapeis multiplied by the specifiedamplitude(including for user-defined shapes).
Length of the absorbing region at the edges of the domain discretization [ positive scalar (default 10) | positive two-vector ]
- Scalar
lengthdefines a CAP with the same length on both sides of the discretization domain. -
length = [L_left, L_right]independently specifies the CAP length on each side of the domain. - Note: The CAP is defined inward from the two ends of the Schrödinger-equation model discretization domain, one should therefore budget for this.
Shape of the CAP [ 'sin^1/8' (default) | 'sin' | 'sin^2' | function handle ]
-
'sin^1/8'uses a$\sin^{1/8}$ -shaped CAP. -
'sin'uses a$\sin$ -shaped CAP. -
'sin^2'uses a$\sin^2$ -shaped CAP. - A function handle enables user-defined CAPs, with the signature
@(x) fun(x), wherefun(0)=0andfun(1)=V_max, returns the values for the CAP at the beginning and end of the absorbing domain, respectively (the absorbing domain at the two ends of the discretization domain are linearly mapped to the segment[0 1]when calling the CAP function).funmust be real valued and positive; the sign and complex coefficients are properly assigned when the object isinitialized. We recommend settingV_maxto1and using theamplitudeproperty to control the CAP height.
These properties cannot be edited with the set method.
Whether the absorbing-boundary CAP object is properly initialized. This is used throughout the QMol-grid package to check that the absorber object holds meaningful information and is ready for use.
Create an absorbing-boundary CAP object with empty class properties.
obj = QMol_TDSE_abs_CAP;Create an absorbing-boundary CAP object with the name properties set to the specified value. Several name-value pairs can be specified consecutively. Suitable name is any of the CAP properties and is case insensitive.
obj = QMol_TDSE_abs_CAP(name1,value1);
obj = QMol_TDSE_abs_CAP(name1,value1,name2,value2,___);Update the name properties of an absorbing-boundary CAP object to the specified value. Several name-value pairs can be specified consecutively. Suitable name is any of the CAP properties and is case insensitive.
obj.set(name1,value1);
obj.set(name1,value1,name2,value2,___);This is the common name-value pair assignment method used throughout the QMol-grid package. The set method also reset the class. After running, the set property updates the isInitialized flag to a false value.
Reset the object by deleting/re-initializing all run-time properties of the class and updating the isInitialized flag to false.
obj.reset;- This is the common
resetmethod available to all classes throughout the QMol-grid package.
Clear all class properties.
obj.clear;Clear a specific set of the class properties. Suitable name is any of the CAP properties and is case insensitive.
obj.clear(name1,name2,___);This is the common clear method available to all classes throughout the QMol-grid package. The clear method also reset the class.
Initialize a QMol_TDSE_abs_CAP object and set the isInitialized flag to true.
obj.initialize(SE,isForward);-
SEis the Schrödinger-equation-model handle object, i.e.,QMol_SE, begin propagated in the TDSE simulation. -
isForwardspecifies whether the TDSE propagation is forward (true) or backward (false) in time. - To avoid any mismatch in internal properties,
initializefirstresetthe object before performing the initialization.
Get an estimate of the memory held by a QMol_TDSE_abs_CAP object with either
mem = obj.getMemoryProfile;
mem = obj.getMemoryProfile(false);- The object must be properly
initialized. - The estimate only includes the discretization of the CAP on the domain grid and ignores other (small) properties.
- The output
memis the estimated size in bytes.
Additionally display the detail of the memory footprint with
mem = obj.getMemoryProfile(true);Display the run-time documentation for the specific configuration of a QMol_TDSE_abs_CAP object.
ref = obj.showDocumentation;- The output
refis a cell vector containing the list of references to be included in the bibliography.
Create a discretization domain and minimal Schrödinger-equation-model object.
disc = QMol_disc('xspan',-20:.1:25);
SE = QMol_SE('discretization',disc);Create the CAP absorber and display the run-time documentation.
ABC = QMol_TDSE_abs_CAP('length',5);
ABC.initialize(SE,true);
ABC.showDocumentation;yielding
* Absorbing boundaries complex absorbing potential
Length = 5 a.u. on both ends
Amplitude = 0.5 a.u. Shape = sin^1/8
V-01.21.000 (06/17/2024) F. Mauger
Display the estimated memory footprint for the object.
ABC.getMemoryProfile(true); * Absorbing boundaries (mask) 7.0 KB
Run the test suite for the class in normal or summary mode respectively with
QMol_test.test('TDSE_abs_CAP');
QMol_test.test('-summary','TDSE_abs_CAP');QMol_TDSE_abs_CAP defines a handful of additional transient/constant and hidden properties to facilitate and speed up computations. These properties cannot be edited with the set method, nor by any function outside of the object (SetAccess=private attribute).
Schrödinger-equation-model object [ [] (default) | QMol_SE handle object ]
- This is a copy of the Schrödinger-equation-model handle object passed to
initialize. - Un-initialized
QMol_TDSE_abs_CAPobjects, i.e.,isInitialized == false, have emptySE. - For practical reasons,
SEis editable byQMol_TDSEclasses.
Discretization of the CAP on the domain grid [ [] (default) | vector ]
- Un-initialized
QMol_TDSE_abs_CAPobjects, i.e.,isInitialized == false, have emptyV.
The results displayed in this documentation page were generated using version 01.21 of the QMol-grid package.
-
QMol_TDSE_abs_CAPwas introduced in version 01.20.
This wiki is a copy of the documentation provided with the QMol-grid package (accessible in MATLAB documentation, via the "Supplemental Software" section).
Copyright © 2024, Francois Mauger, all right reserved.
Density-functional theory (DFT)
QMol_DFT_densityQMol_DFT_eigsQMol_DFT_eig_basisQMol_DFT_orbitalQMol_DFT_orbital_basisQMol_DFT_profilerQMol_DFT_SCF_AndersonQMol_DFT_spinPolQMol_DFT_spinResQMol_DFT_Vc_LDA_softQMol_DFT_VextQMol_DFT_Vh_convQMol_DFT_Vh_fftQMol_DFT_VksQMol_DFT_Vks_basisQMol_DFT_Vks_gradQMol_DFT_Vx_LDA_expQMol_DFT_Vx_LDA_softQMol_DFT_Vx_XX_convQMol_DFT_Vx_XX_fft
Tutorials
- Tutorial 1: Schrödinger-equation ground state
- Tutorial 2: Schrödinger-equation input and output
- Tutorial 3: Time-dependent Schrödinger equation
- Tutorial 4: Time-dependent Schrödinger-equation input and output
- Tutorial 5: Density-functional theory ground state
- Tutorial 6: Time-dependent density-functional theory
- Tutorial 7: Time-dependent density-functional theory input and output