QMol_Va_softCoulomb - fmauger1/QMol-grid GitHub Wiki
QMol_Va_softCoulomb
soft-Coulomb pseudopotential
Description
Use QMol_Va_softCoulomb to describe an atomic center with a soft-Coulomb pseudopotential [Javanainen 1988] parameterized as
$$ V(x)=-\frac{Z}{\sqrt{(x-x _0 )^2 +a^2 }}.~~~~~~(1) $$
QMol_Va_softCoulomb is a handle class.
Class properties
Potential parameters
The QMol_Va_softCoulomb class defines the following public get-access properties; each can be changed using the set method:
atom (name)
Name of the atomic pseudopotential [ string (default []) ]
- This name is displayed in the run-time documentation.
charge (Z)
Effective charge, $Z$ in Eq. (1), of the soft-Coulomb pseudopotential [ scalar (default 1) ]
softeningParameter (a)
Softening parameter, $a$ in Eq. (1), of the soft-Coulomb pseudopotential [ scalar (default 1) ]
position (X0)
Center position, $x_0$ in Eq. (1), of the Gaussian pseudopotential [ scalar (default 0) ]
mass (m)
Atomic mass of the center [ scalar (default []) ]
- This is used for simulations that include nuclear dynamics
momentum (p)
Canonical momentum of the atomic center [ scalar (default []) ]
- This is used for simulations that include nuclear dynamics
Other properties
These properties cannot be edited with the set method.
isInitialized (isInit)
Whether the pseudopotential object is properly initialized. This is used throughout the QMol-grid package to check that the pseudopotential object holds meaningful information and is ready for use. Changing its isSpinPol may cause simulations to fail or produce erroneous results.
Class methods
Creation
constructor
Create a soft-Coulomb pseudopotential object with default class properties.
obj = QMol_Va_softCoulomb;
Create a soft-Coulomb pseudopotential object with the name properties set to the specified value. Several name-value pairs can be specified consecutively. Suitable name is any of the potential parameters properties and is case insensitive.
obj = QMol_Va_softCoulomb(name1,value1);
obj = QMol_Va_softCoulomb(name1,value1,name2,value2,___);
Changing class properties
set
Update the name properties of a soft-Coulomb pseudopotential object to the specified value. Several name-value pairs can be specified consecutively. Suitable name is any of the potential parameters 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 false.
reset
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 reset method available to all classes throughout the QMol-grid package.
clear
Clear all class properties
obj.clear;
Clear a specific set of the class properties. Suitable name is any of the potential parameters 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. The clear method can be used to delete specific properties before saving an instance of the QMol_Va_softCoulomb class.
Initializing the object
initialize
Initialize the soft-Coulomb pseudopotential object and set the isInitialized flag to true with any of
obj.initialize;
obj.initialize([]);
obj.initialize(QM);
- Initialization with an empty or QMol-grid theory object
QMis provided for consistency across the QMol-grid package but is ignored during the initialization.
Potential discretization
getPotential
Get the discretization of the pseudopotential
V = obj.getPotential(x);
- The input
xcan be a scalar, vector, or array of any size and shape. The outputVmatches the shape ofxwith the element-wise solution of the pseudopotential Eq. (1).
getPotentialDerivative
Get the discretization of the spatial derivative (gradient) of the pseudopotential
DV = obj.getPotentialDerivative(1,x);
- The input
xcan be a scalar, vector, or array of any size and shape. The outputDVmatches the shape ofxwith the element-wise derivative of the pseudopotential of Eq. (1). - Note that the first input
1is required. This is to provide a uniform signature with higher dimension where the dimension along which the gradient component is applied must be specified
Run-time documentation
showDocumentation
Display the full run-time documentation with either
ref = obj.showDocumentation;
ref = obj.showDocumentation('full');
- The output
refis a cell vector containing the list of cited bibliographic references (for compatibility with other run-time documentation features in the QMol-grid package).
Display only a generic description of the pseudopotential
ref = obj.showDocumentation('potential');
- The output
refis a cell vector containing the list of cited bibliographic references (for compatibility with other run-time documentation features in the QMol-grid package). - This does not display the specific potential parameters held in the
QMol_Va_softCoulombobject
Display only the summary of the potential parameters held in the QMol_Va_softCoulomb object
ref = obj.showDocumentation('parameters');
- The output
ref = 'softCoulomb'is a unique ID for soft-Coulomb pseudopotentials. It is used for compact run-time documentation of molecular potentials. - This does not display the generic description of the pseudopotential, just the values for the parameters.
Examples
Define the discretization domain
x = -20:.1:25;
Create a soft-Coulomb pseudopotential and display its run-time documentation
V = QMol_Va_softCoulomb('atom','X','charge',2,'softeningParameter',0.8,'position',3);
V.initialize;
V.showDocumentation;
yielding
* Atomic center (soft-Coulomb potential)
Parameterized as V(x) = -Z ./ sqrt( (x-X0).^2 + a^2 ), with
name = X
Z = 2.00
a = 0.80
X0 = 3.00
V-01.21.000 (06/17/2024) F. Mauger
Plot the soft-Coulomb pseudopotential and its gradient
figure; hold on
plot(x,V.getPotential(x),'-','LineWidth',2,'DisplayName','V')
plot(x,V.getPotentialDerivative(1,x),'-','LineWidth',2','DisplayName','{\nabla}V')
xlabel('position (a.u.)'); xlim(x([1 end]));
ylabel('potential/gradient')
legend show
Test suite
Run the test suite for the class in normal or summary mode respectively with
QMol_test.test('Va_softCoulomb');
QMol_test.test('-summary','Va_softCoulomb');
References
[Javanainen 1988] J. Javanainen, J.H. Eberly, and Q. Su, "Numerical simulations of multiphoton ionization and above-threshold electron spectra," Physical Review A 38, 3430 (1988).
Notes
The results displayed in this documentation page were generated using version 01.21 of the QMol-grid package.
QMol_Va_softCoulombwas introduced in version 01.00.- Version 01.10 changed the name of the class from
QMol_Va_softCore