magnopy.Convention.get_modified#
method
- Convention.get_modified(multiple_counting: bool = None, spin_normalized: bool = None, c1: float = None, c21: float = None, c22: float = None, c31: float = None, c32: float = None, c33: float = None, c41: float = None, c421: float = None, c422: float = None, c43: float = None, c44: float = None, name: str = None)[source]#
Returns the new instance of the
Conventionclass based on the called one with changed given properties.- Parameters:
- multiple_countingbool, optional
Whether the pairs of spins are counted multiple times in the Hamiltonian's sums. Modified to the given value, if None, then kept the same as in the original convention.
- spin_normalizedbool, optional
Whether spin vectors/operators are normalized to 1. If
True, then spin vectors/operators are normalized. Modified to the given value, if None, then kept the same as in the original convention.- c1float, optional
Numerical factor before the (one spin & one site) term of the Hamiltonian. Modified to the given value, if None, then kept the same as in the original convention.
- c21float, optional
Numerical factor before the (two spins & one site) term of the Hamiltonian. Modified to the given value, if None, then kept the same as in the original convention.
- c22float, optional
Numerical factor before the (two spins & two sites) term of the Hamiltonian. Modified to the given value, if None, then kept the same as in the original convention.
- c31float, optional
Numerical factor before the (three spins & one site) term of the Hamiltonian. Modified to the given value, if None, then kept the same as in the original convention.
- c32float, optional
Numerical factor before the (three spins & two sites) term of the Hamiltonian. Modified to the given value, if None, then kept the same as in the original convention.
- c33float, optional
Numerical factor before the (three spins & three sites) term of the Hamiltonian. Modified to the given value, if None, then kept the same as in the original convention.
- c41float, optional
Numerical factor before the (four spins & one site) term of the Hamiltonian. Modified to the given value, if None, then kept the same as in the original convention.
- c421float, optional
Numerical factor before the (four spins & two sites & 1+3) term of the Hamiltonian. Modified to the given value, if None, then kept the same as in the original convention.
- c422float, optional
Numerical factor before the (four spins & two sites & 2+2) term of the Hamiltonian. Modified to the given value, if None, then kept the same as in the original convention.
- c43float, optional
Numerical factor before the (four spins & three sites) term of the Hamiltonian. Modified to the given value, if None, then kept the same as in the original convention.
- c44float, optional
Numerical factor before the (four spins & four sites) term of the Hamiltonian. Modified to the given value, if None, then kept the same as in the original convention.
- namestr, optional
A label for the convention. Any string, case-insensitive. Modified to the given value, if None, then kept the same as in the original convention.
Examples
>>> import magnopy >>> conv = magnopy.Convention( ... name="original", ... multiple_counting = True, ... spin_normalized = False, ... c1 = 1, ... c21 = 1, ... c22 = -1) >>> conv.summary() original convention where * Bonds are counted multiple times in the sum; * Spin vectors are not normalized; * c1 = 1.0; * c21 = 1.0; * c22 = -1.0; * Undefined c31 factor; * Undefined c32 factor; * Undefined c33 factor; * Undefined c41 factor; * Undefined c421 factor; * Undefined c422 factor; * Undefined c43 factor; * Undefined c44 factor. >>> mod_conv = conv.get_modified( ... name="modified", ... c22 = 1, ... c33 = -3) >>> mod_conv.summary() modified convention where * Bonds are counted multiple times in the sum; * Spin vectors are not normalized; * c1 = 1.0; * c21 = 1.0; * c22 = 1.0; * Undefined c31 factor; * Undefined c32 factor; * c33 = -3.0; * Undefined c41 factor; * Undefined c421 factor; * Undefined c422 factor; * Undefined c43 factor; * Undefined c44 factor.