pub struct PyBasisShellContraction {
pub basis_shell: (String, bool, PyShellOrder),
pub primitives: Vec<(f64, f64)>,
pub cart_origin: [f64; 3],
pub k: Option<[f64; 3]>,
}
Expand description
Python-exposed structure to marshall basis shell contraction information between Rust and Python.
§Constructor arguments
-
basis_shell
- A triplet of the form(angmom, cart, order)
where:angmom
is a symbol such as"S"
or"P"
for the angular momentum of the shell,cart
is a boolean indicating if the functions in the shell are Cartesian (true
) or pure / solid harmonics (false
), andorder
specifies how the functions in the shell are ordered:- if
cart
istrue
,order
can beNone
for lexicographic order, or a list of tuples(lx, ly, lz)
specifying a custom order for the Cartesian functions wherelx
,ly
, andlz
are the $x
$-, $y
$-, and $z
$-exponents; - if
cart
isfalse
,order
can betrue
for increasing-$m
$ order,false
for decreasing-$m
$ order, or a list of $m
$ values for custom order.
- if
Python type:
tuple[str, bool, bool | Optional[list[tuple[int, int, int]]]]
. -
primitives
- A list of tuples, each of which contains the exponent and the contraction coefficient of a Gaussian primitive in this shell. Python type:list[tuple[float, float]]
. -
cart_origin
- A fixed-size list of length 3 containing the Cartesian coordinates of the origin $\mathbf{R}
$ of this shell in Bohr radii. Python type:list[float]
. -
k
- An optional fixed-size list of length 3 containing the Cartesian components of the $\mathbf{k}
$ vector of this shell that appears in the complex phase factor $\exp[i\mathbf{k} \cdot (\mathbf{r} - \mathbf{R})]
$. Python type:Optional[list[float]]
.
Fields§
§basis_shell: (String, bool, PyShellOrder)
A triplet of the form (angmom, cart, order)
where:
* angmom
is a symbol such as "S"
or "P"
for the angular momentum of the shell,
* cart
is a boolean indicating if the functions in the shell are Cartesian (true
)
or pure / solid harmonics (false
), and
* order
specifies how the functions in the shell are ordered:
* if cart
is true
, order
can be None
for lexicographic order, or a list of
tuples (lx, ly, lz)
specifying a custom order for the Cartesian functions where
lx
, ly
, and lz
are the $x
$-, $y
$-, and $z
$-exponents;
* if cart
is false
, order
can be true
for increasing-$m
$ order, false
for
decreasing-$m
$ order, or a list of $m
$ values for custom order.
Python type: tuple[str, bool, bool | Optional[list[tuple[int, int, int]]]]
.
primitives: Vec<(f64, f64)>
A list of tuples, each of which contains the exponent and the contraction coefficient of a Gaussian primitive in this shell.
Python type: list[tuple[float, float]]
.
cart_origin: [f64; 3]
A fixed-size list of length 3 containing the Cartesian coordinates of the origin
$\mathbf{R}
$ of this shell in Bohr radii.
Python type: list[float]
.
k: Option<[f64; 3]>
An optional fixed-size list of length 3 containing the Cartesian components of the
$\mathbf{k}
$ vector of this shell that appears in the complex phase factor
$\exp[i\mathbf{k} \cdot (\mathbf{r} - \mathbf{R})]
$.
Python type: Optional[list[float]]
.
Implementations§
source§impl PyBasisShellContraction
impl PyBasisShellContraction
sourcepub fn new(
basis_shell: (String, bool, PyShellOrder),
primitives: Vec<(f64, f64)>,
cart_origin: [f64; 3],
k: Option<[f64; 3]>,
) -> Self
pub fn new( basis_shell: (String, bool, PyShellOrder), primitives: Vec<(f64, f64)>, cart_origin: [f64; 3], k: Option<[f64; 3]>, ) -> Self
Creates a new PyBasisShellContraction
structure.
§Arguments
-
basis_shell
- A triplet of the form(angmom, cart, order)
where:angmom
is a symbol such as"S"
or"P"
for the angular momentum of the shell,cart
is a boolean indicating if the functions in the shell are Cartesian (true
) or pure / solid harmonics (false
), andorder
specifies how the functions in the shell are ordered:- if
cart
istrue
,order
can beNone
for lexicographic order, or a list of tuples(lx, ly, lz)
specifying a custom order for the Cartesian functions wherelx
,ly
, andlz
are the $x
$-, $y
$-, and $z
$-exponents; - if
cart
isfalse
,order
can betrue
for increasing-$m
$ orfalse
for decreasing-$m
$ order.
- if
Python type:
tuple[str, bool, bool | Optional[list[tuple[int, int, int]]]]
. -
primitives
- A list of tuples, each of which contains the exponent and the contraction coefficient of a Gaussian primitive in this shell. Python type:list[tuple[float, float]]
. -
cart_origin
- A fixed-size list of length 3 containing the Cartesian coordinates of the origin of this shell. Python type:list[float]
. -
k
- An optional fixed-size list of length 3 containing the Cartesian components of the $\mathbf{k}
$ vector of this shell. Python type:Optional[list[float]]
.
Trait Implementations§
source§impl Clone for PyBasisShellContraction
impl Clone for PyBasisShellContraction
source§fn clone(&self) -> PyBasisShellContraction
fn clone(&self) -> PyBasisShellContraction
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl HasPyGilRef for PyBasisShellContraction
impl HasPyGilRef for PyBasisShellContraction
§type AsRefTarget = PyCell<PyBasisShellContraction>
type AsRefTarget = PyCell<PyBasisShellContraction>
source§impl IntoPy<Py<PyAny>> for PyBasisShellContraction
impl IntoPy<Py<PyAny>> for PyBasisShellContraction
source§impl PyClass for PyBasisShellContraction
impl PyClass for PyBasisShellContraction
source§impl PyClassImpl for PyBasisShellContraction
impl PyClassImpl for PyBasisShellContraction
source§const IS_BASETYPE: bool = false
const IS_BASETYPE: bool = false
source§const IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
source§const IS_MAPPING: bool = false
const IS_MAPPING: bool = false
source§const IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
§type ThreadChecker = SendablePyClass<PyBasisShellContraction>
type ThreadChecker = SendablePyClass<PyBasisShellContraction>
§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
§type BaseNativeType = PyAny
type BaseNativeType = PyAny
PyAny
by default, and when you declare
#[pyclass(extends=PyDict)]
, it’s PyDict
.fn items_iter() -> PyClassItemsIter
fn lazy_type_object() -> &'static LazyTypeObject<Self>
fn dict_offset() -> Option<isize>
fn weaklist_offset() -> Option<isize>
source§impl PyClassNewTextSignature<PyBasisShellContraction> for PyClassImplCollector<PyBasisShellContraction>
impl PyClassNewTextSignature<PyBasisShellContraction> for PyClassImplCollector<PyBasisShellContraction>
fn new_text_signature(self) -> Option<&'static str>
source§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a PyBasisShellContraction
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a PyBasisShellContraction
source§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut PyBasisShellContraction
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut PyBasisShellContraction
source§impl PyMethods<PyBasisShellContraction> for PyClassImplCollector<PyBasisShellContraction>
impl PyMethods<PyBasisShellContraction> for PyClassImplCollector<PyBasisShellContraction>
fn py_methods(self) -> &'static PyClassItems
source§impl PyTypeInfo for PyBasisShellContraction
impl PyTypeInfo for PyBasisShellContraction
source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
§fn type_object(py: Python<'_>) -> &PyType
fn type_object(py: Python<'_>) -> &PyType
PyTypeInfo::type_object
will be replaced by PyTypeInfo::type_object_bound
in a future PyO3 version§fn type_object_bound(py: Python<'_>) -> Bound<'_, PyType>
fn type_object_bound(py: Python<'_>) -> Bound<'_, PyType>
§fn is_type_of(object: &PyAny) -> bool
fn is_type_of(object: &PyAny) -> bool
PyTypeInfo::is_type_of
will be replaced by PyTypeInfo::is_type_of_bound
in a future PyO3 versionobject
is an instance of this type or a subclass of this type.§fn is_type_of_bound(object: &Bound<'_, PyAny>) -> bool
fn is_type_of_bound(object: &Bound<'_, PyAny>) -> bool
object
is an instance of this type or a subclass of this type.§fn is_exact_type_of(object: &PyAny) -> bool
fn is_exact_type_of(object: &PyAny) -> bool
PyTypeInfo::is_exact_type_of
will be replaced by PyTypeInfo::is_exact_type_of_bound
in a future PyO3 versionobject
is an instance of this type.§fn is_exact_type_of_bound(object: &Bound<'_, PyAny>) -> bool
fn is_exact_type_of_bound(object: &Bound<'_, PyAny>) -> bool
object
is an instance of this type.source§impl TryFrom<PyBasisShellContraction> for BasisShellContraction<f64, f64>
impl TryFrom<PyBasisShellContraction> for BasisShellContraction<f64, f64>
impl DerefToPyAny for PyBasisShellContraction
Auto Trait Implementations§
impl Freeze for PyBasisShellContraction
impl RefUnwindSafe for PyBasisShellContraction
impl Send for PyBasisShellContraction
impl Sync for PyBasisShellContraction
impl Unpin for PyBasisShellContraction
impl UnwindSafe for PyBasisShellContraction
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> Conv for T
impl<T> Conv for T
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self
to use its Display
implementation when
Debug
-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self
to use its LowerExp
implementation when
Debug
-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self
to use its LowerHex
implementation when
Debug
-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self
to use its Pointer
implementation when
Debug
-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self
to use its UpperExp
implementation when
Debug
-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self
to use its UpperHex
implementation when
Debug
-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<'py, T> FromPyObjectBound<'_, 'py> for Twhere
T: FromPyObject<'py>,
impl<'py, T> FromPyObjectBound<'_, 'py> for Twhere
T: FromPyObject<'py>,
§fn from_py_object_bound(ob: Borrowed<'_, 'py, PyAny>) -> Result<T, PyErr>
fn from_py_object_bound(ob: Borrowed<'_, 'py, PyAny>) -> Result<T, PyErr>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self
, then passes self.as_ref()
into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self
, then passes self.as_mut()
into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self
, then passes self.deref()
into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PyErrArguments for T
impl<T> PyErrArguments for T
§impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B>
of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B>
of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R>
view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R>
view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target
of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target
of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow()
only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref()
only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut()
only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref()
only in debug builds, and is erased in release
builds.