soprano.properties.nmr.isc#
Implementation of AtomsProperties that relate to NMR J couplings
Classes
|
Produces an array containing eigenvalues and eigenvectors for the symmetric part of each J coupling tensor in the system. |
|
Produces a dictionary of J coupling anisotropies for atom pairs in the system. |
|
Produces a dictionary of J coupling asymmetries for atom pairs in the system. |
|
Produces a dictionary of diagonalised J coupling tensors for atom pairs in the system. |
|
Produces a dictionary of J coupling isotropies for atom pairs in the system. |
|
Produces a dictionary of J ase.Quaternion objects expressing the orientation of the J coupling tensors with respect to the cartesian axes for atom pairs in the system. |
|
Produces a dictionary of J coupling reduced anisotropies for atom pairs in the system. |
|
Produces a dictionary of J coupling skews for atom pairs in the system. |
|
Produces a dictionary of J coupling spans for atom pairs in the system. |
- class soprano.properties.nmr.isc.ISCDiagonal(name=None, **params)[source]#
Bases:
AtomsProperty
Produces an array containing eigenvalues and eigenvectors for the symmetric part of each J coupling tensor in the system. By default saves them as part of the Atoms’ arrays as well. Requires the Atoms object to have been loaded from a .magres file containing the relevant information.
- Parameters:
tag (str) – name of the J coupling component to return. Magres files usually contain isc, isc_spin, isc_fc, isc_orbital_p and isc_orbital_d. Default is isc.
save_info (bool) – if True, save the diagonalised tensors in the Atoms object as info. By default True.
- Returns:
- dictionary of eigenvalues and eigenvectors by atom
index pairs (lower index first)
- Return type:
isc_diag (dict)
Initialize an AtomsProperty and set its parameters. The AtomsProperty instance can then be called with a structure as its only argument to get the property with the given parameters.
Args:name (str): a name to give to this specific instance of theproperty (will be used to store it as array ifrequested)params: named arguments specific to this type of property- __call__(s, store_array=False)#
Calling the AtomsProperty returns the value of the property as extracted with the parameters of this specific instance.
Args:s (ase.Atoms or AtomsCollection): the structure or collectionfrom which to extract thepropertystore_array (bool): if s is a collection, whether to store theresulting data as an array in the collectionusing the given name for this instanceReturns:property: the value of the property for the given structure ora list of values if a collection has been passed
- static extract(s, *args, **kwargs)[source]#
Extract the given property with given parameters from an Atoms object.
Args:s (ase.Atoms): the structure from which to extract the propertyparams: named arguments specific to this type of propertyReturns:property: the value of the property for the given structure andparameters
- classmethod get(s, store_array=False, **kwargs)#
Extract the given property using the default parameters on an Atoms object s
Args:s (ase.Atoms or AtomsCollection): the structure or collectionfrom which to extract thepropertystore_array (bool): if s is a collection, whether to store theresulting data as an array in the collectionusing the default name for this propertyReturns:property: the value of the property for the given structure ora list of values if a collection has been passed
- class soprano.properties.nmr.isc.JCAnisotropy(name=None, **params)[source]#
Bases:
AtomsProperty
Produces a dictionary of J coupling anisotropies for atom pairs in the system. See JCDiagonal for how reduced couplings are transformed into couplings.
- Parameters:
sel_i (AtomSelection or [int]) – Selection or list of indices of atoms for which to return the J coupling. By default is None (= all of them).
sel_j (AtomSelection or [int]) – Selection or list of indices of atoms for which to return the J coupling with the ones in sel_i. By default is None (= same as sel_i).
tag (str) – name of the J coupling component to return. Magres files usually contain isc, isc_spin, isc_fc, isc_orbital_p and isc_orbital_d. Default is isc.
isotopes (dict) – dictionary of specific isotopes to use, by element symbol. If the isotope doesn’t exist an error will be raised.
isotope_list (list) – list of isotopes, atom-by-atom. To be used if different atoms of the same element are supposed to be of different isotopes. Where a ‘None’ is present will fall back on the previous definitions. Where an isotope is present it overrides everything else.
self_coupling (bool) – if True, include coupling of a nucleus with itself. Otherwise excluded. Default is False.
force_recalc (bool) – if True, always diagonalise the tensors even if already present. Default is False.
- Returns:
Dictionary of couplings by atomic index pair, in Hz.
- Return type:
dip_dict (dict)
Initialize an AtomsProperty and set its parameters. The AtomsProperty instance can then be called with a structure as its only argument to get the property with the given parameters.
Args:name (str): a name to give to this specific instance of theproperty (will be used to store it as array ifrequested)params: named arguments specific to this type of property- __call__(s, store_array=False)#
Calling the AtomsProperty returns the value of the property as extracted with the parameters of this specific instance.
Args:s (ase.Atoms or AtomsCollection): the structure or collectionfrom which to extract thepropertystore_array (bool): if s is a collection, whether to store theresulting data as an array in the collectionusing the given name for this instanceReturns:property: the value of the property for the given structure ora list of values if a collection has been passed
- static extract(s, *args, **kwargs)[source]#
Extract the given property with given parameters from an Atoms object.
Args:s (ase.Atoms): the structure from which to extract the propertyparams: named arguments specific to this type of propertyReturns:property: the value of the property for the given structure andparameters
- classmethod get(s, store_array=False, **kwargs)#
Extract the given property using the default parameters on an Atoms object s
Args:s (ase.Atoms or AtomsCollection): the structure or collectionfrom which to extract thepropertystore_array (bool): if s is a collection, whether to store theresulting data as an array in the collectionusing the default name for this propertyReturns:property: the value of the property for the given structure ora list of values if a collection has been passed
- class soprano.properties.nmr.isc.JCAsymmetry(name=None, **params)[source]#
Bases:
AtomsProperty
Produces a dictionary of J coupling asymmetries for atom pairs in the system. See JCDiagonal for how reduced couplings are transformed into couplings.
- Parameters:
sel_i (AtomSelection or [int]) – Selection or list of indices of atoms for which to return the J coupling. By default is None (= all of them).
sel_j (AtomSelection or [int]) – Selection or list of indices of atoms for which to return the J coupling with the ones in sel_i. By default is None (= same as sel_i).
tag (str) – name of the J coupling component to return. Magres files usually contain isc, isc_spin, isc_fc, isc_orbital_p and isc_orbital_d. Default is isc.
isotopes (dict) – dictionary of specific isotopes to use, by element symbol. If the isotope doesn’t exist an error will be raised.
isotope_list (list) – list of isotopes, atom-by-atom. To be used if different atoms of the same element are supposed to be of different isotopes. Where a ‘None’ is present will fall back on the previous definitions. Where an isotope is present it overrides everything else.
self_coupling (bool) – if True, include coupling of a nucleus with itself. Otherwise excluded. Default is False.
force_recalc (bool) – if True, always diagonalise the tensors even if already present. Default is False.
- Returns:
Dictionary of couplings by atomic index pair, in Hz.
- Return type:
dip_dict (dict)
Initialize an AtomsProperty and set its parameters. The AtomsProperty instance can then be called with a structure as its only argument to get the property with the given parameters.
Args:name (str): a name to give to this specific instance of theproperty (will be used to store it as array ifrequested)params: named arguments specific to this type of property- __call__(s, store_array=False)#
Calling the AtomsProperty returns the value of the property as extracted with the parameters of this specific instance.
Args:s (ase.Atoms or AtomsCollection): the structure or collectionfrom which to extract thepropertystore_array (bool): if s is a collection, whether to store theresulting data as an array in the collectionusing the given name for this instanceReturns:property: the value of the property for the given structure ora list of values if a collection has been passed
- static extract(s, *args, **kwargs)[source]#
Extract the given property with given parameters from an Atoms object.
Args:s (ase.Atoms): the structure from which to extract the propertyparams: named arguments specific to this type of propertyReturns:property: the value of the property for the given structure andparameters
- classmethod get(s, store_array=False, **kwargs)#
Extract the given property using the default parameters on an Atoms object s
Args:s (ase.Atoms or AtomsCollection): the structure or collectionfrom which to extract thepropertystore_array (bool): if s is a collection, whether to store theresulting data as an array in the collectionusing the default name for this propertyReturns:property: the value of the property for the given structure ora list of values if a collection has been passed
- class soprano.properties.nmr.isc.JCDiagonal(name=None, **params)[source]#
Bases:
AtomsProperty
Produces a dictionary of diagonalised J coupling tensors for atom pairs in the system. The J coupling for a pair of nuclei i and j is defined as:
\[J_{ij} = 10^{19}\frac{h\gamma_i\gamma_j}{4\pi^2}K\]where the gammas represent the gyromagnetic ratios of the nuclei and K is the J coupling reduced tensor found in a .magres file, in \(10^{19} T^2 J^{-1}\).
- Parameters:
sel_i (AtomSelection or [int]) – Selection or list of indices of atoms for which to return the J coupling. By default is None (= all of them).
sel_j (AtomSelection or [int]) – Selection or list of indices of atoms for which to return the J coupling with the ones in sel_i. By default is None (= same as sel_i).
tag (str) – name of the J coupling component to return. Magres files usually contain isc, isc_spin, isc_fc, isc_orbital_p and isc_orbital_d. Default is isc.
isotopes (dict) – dictionary of specific isotopes to use, by element symbol. If the isotope doesn’t exist an error will be raised.
isotope_list (list) – list of isotopes, atom-by-atom. To be used if different atoms of the same element are supposed to be of different isotopes. Where a ‘None’ is present will fall back on the previous definitions. Where an isotope is present it overrides everything else.
self_coupling (bool) – if True, include coupling of a nucleus with itself. Otherwise excluded. Default is False.
force_recalc (bool) – if True, always diagonalise the tensors even if already present. Default is False.
- Returns:
Dictionary of couplings by atomic index pair.
- Return type:
dip_dict (dict)
Initialize an AtomsProperty and set its parameters. The AtomsProperty instance can then be called with a structure as its only argument to get the property with the given parameters.
Args:name (str): a name to give to this specific instance of theproperty (will be used to store it as array ifrequested)params: named arguments specific to this type of property- __call__(s, store_array=False)#
Calling the AtomsProperty returns the value of the property as extracted with the parameters of this specific instance.
Args:s (ase.Atoms or AtomsCollection): the structure or collectionfrom which to extract thepropertystore_array (bool): if s is a collection, whether to store theresulting data as an array in the collectionusing the given name for this instanceReturns:property: the value of the property for the given structure ora list of values if a collection has been passed
- static extract(s, *args, **kwargs)[source]#
Extract the given property with given parameters from an Atoms object.
Args:s (ase.Atoms): the structure from which to extract the propertyparams: named arguments specific to this type of propertyReturns:property: the value of the property for the given structure andparameters
- classmethod get(s, store_array=False, **kwargs)#
Extract the given property using the default parameters on an Atoms object s
Args:s (ase.Atoms or AtomsCollection): the structure or collectionfrom which to extract thepropertystore_array (bool): if s is a collection, whether to store theresulting data as an array in the collectionusing the default name for this propertyReturns:property: the value of the property for the given structure ora list of values if a collection has been passed
- class soprano.properties.nmr.isc.JCIsotropy(name=None, **params)[source]#
Bases:
AtomsProperty
Produces a dictionary of J coupling isotropies for atom pairs in the system. See JCDiagonal for how reduced couplings are transformed into couplings.
- Parameters:
sel_i (AtomSelection or [int]) – Selection or list of indices of atoms for which to return the J coupling. By default is None (= all of them).
sel_j (AtomSelection or [int]) – Selection or list of indices of atoms for which to return the J coupling with the ones in sel_i. By default is None (= same as sel_i).
tag (str) – name of the J coupling component to return. Magres files usually contain isc, isc_spin, isc_fc, isc_orbital_p and isc_orbital_d. Default is isc.
isotopes (dict) – dictionary of specific isotopes to use, by element symbol. If the isotope doesn’t exist an error will be raised.
isotope_list (list) – list of isotopes, atom-by-atom. To be used if different atoms of the same element are supposed to be of different isotopes. Where a ‘None’ is present will fall back on the previous definitions. Where an isotope is present it overrides everything else.
self_coupling (bool) – if True, include coupling of a nucleus with itself. Otherwise excluded. Default is False.
force_recalc (bool) – if True, always diagonalise the tensors even if already present. Default is False.
- Returns:
Dictionary of couplings by atomic index pair, in Hz.
- Return type:
dip_dict (dict)
Initialize an AtomsProperty and set its parameters. The AtomsProperty instance can then be called with a structure as its only argument to get the property with the given parameters.
Args:name (str): a name to give to this specific instance of theproperty (will be used to store it as array ifrequested)params: named arguments specific to this type of property- __call__(s, store_array=False)#
Calling the AtomsProperty returns the value of the property as extracted with the parameters of this specific instance.
Args:s (ase.Atoms or AtomsCollection): the structure or collectionfrom which to extract thepropertystore_array (bool): if s is a collection, whether to store theresulting data as an array in the collectionusing the given name for this instanceReturns:property: the value of the property for the given structure ora list of values if a collection has been passed
- static extract(s, *args, **kwargs)[source]#
Extract the given property with given parameters from an Atoms object.
Args:s (ase.Atoms): the structure from which to extract the propertyparams: named arguments specific to this type of propertyReturns:property: the value of the property for the given structure andparameters
- classmethod get(s, store_array=False, **kwargs)#
Extract the given property using the default parameters on an Atoms object s
Args:s (ase.Atoms or AtomsCollection): the structure or collectionfrom which to extract thepropertystore_array (bool): if s is a collection, whether to store theresulting data as an array in the collectionusing the default name for this propertyReturns:property: the value of the property for the given structure ora list of values if a collection has been passed
- class soprano.properties.nmr.isc.JCQuaternion(name=None, **params)[source]#
Bases:
AtomsProperty
Produces a dictionary of J ase.Quaternion objects expressing the orientation of the J coupling tensors with respect to the cartesian axes for atom pairs in the system. Requires the Atoms object to have been loaded from a .magres file containing the relevant information.
- Parameters:
sel_i (AtomSelection or [int]) – Selection or list of indices of atoms for which to return the J coupling. By default is None (= all of them).
sel_j (AtomSelection or [int]) – Selection or list of indices of atoms for which to return the J coupling with the ones in sel_i. By default is None (= same as sel_i).
tag (str) – name of the J coupling component to return. Magres files usually contain isc, isc_spin, isc_fc, isc_orbital_p and isc_orbital_d. Default is isc.
isotopes (dict) – dictionary of specific isotopes to use, by element symbol. If the isotope doesn’t exist an error will be raised.
isotope_list (list) – list of isotopes, atom-by-atom. To be used if different atoms of the same element are supposed to be of different isotopes. Where a ‘None’ is present will fall back on the previous definitions. Where an isotope is present it overrides everything else.
self_coupling (bool) – if True, include coupling of a nucleus with itself. Otherwise excluded. Default is False.
force_recalc (bool) – if True, always diagonalise the tensors even if already present. Default is False.
- Returns:
Dictionary of coupling quaternions by atomic index pair, in Hz.
- Return type:
quat_dict (dict)
Initialize an AtomsProperty and set its parameters. The AtomsProperty instance can then be called with a structure as its only argument to get the property with the given parameters.
Args:name (str): a name to give to this specific instance of theproperty (will be used to store it as array ifrequested)params: named arguments specific to this type of property- __call__(s, store_array=False)#
Calling the AtomsProperty returns the value of the property as extracted with the parameters of this specific instance.
Args:s (ase.Atoms or AtomsCollection): the structure or collectionfrom which to extract thepropertystore_array (bool): if s is a collection, whether to store theresulting data as an array in the collectionusing the given name for this instanceReturns:property: the value of the property for the given structure ora list of values if a collection has been passed
- static extract(s, *args, **kwargs)[source]#
Extract the given property with given parameters from an Atoms object.
Args:s (ase.Atoms): the structure from which to extract the propertyparams: named arguments specific to this type of propertyReturns:property: the value of the property for the given structure andparameters
- classmethod get(s, store_array=False, **kwargs)#
Extract the given property using the default parameters on an Atoms object s
Args:s (ase.Atoms or AtomsCollection): the structure or collectionfrom which to extract thepropertystore_array (bool): if s is a collection, whether to store theresulting data as an array in the collectionusing the default name for this propertyReturns:property: the value of the property for the given structure ora list of values if a collection has been passed
- class soprano.properties.nmr.isc.JCReducedAnisotropy(name=None, **params)[source]#
Bases:
AtomsProperty
Produces a dictionary of J coupling reduced anisotropies for atom pairs in the system. See JCDiagonal for how reduced couplings are transformed into couplings.
- Parameters:
sel_i (AtomSelection or [int]) – Selection or list of indices of atoms for which to return the J coupling. By default is None (= all of them).
sel_j (AtomSelection or [int]) – Selection or list of indices of atoms for which to return the J coupling with the ones in sel_i. By default is None (= same as sel_i).
tag (str) – name of the J coupling component to return. Magres files usually contain isc, isc_spin, isc_fc, isc_orbital_p and isc_orbital_d. Default is isc.
isotopes (dict) – dictionary of specific isotopes to use, by element symbol. If the isotope doesn’t exist an error will be raised.
isotope_list (list) – list of isotopes, atom-by-atom. To be used if different atoms of the same element are supposed to be of different isotopes. Where a ‘None’ is present will fall back on the previous definitions. Where an isotope is present it overrides everything else.
self_coupling (bool) – if True, include coupling of a nucleus with itself. Otherwise excluded. Default is False.
force_recalc (bool) – if True, always diagonalise the tensors even if already present. Default is False.
- Returns:
Dictionary of couplings by atomic index pair, in Hz.
- Return type:
dip_dict (dict)
Initialize an AtomsProperty and set its parameters. The AtomsProperty instance can then be called with a structure as its only argument to get the property with the given parameters.
Args:name (str): a name to give to this specific instance of theproperty (will be used to store it as array ifrequested)params: named arguments specific to this type of property- __call__(s, store_array=False)#
Calling the AtomsProperty returns the value of the property as extracted with the parameters of this specific instance.
Args:s (ase.Atoms or AtomsCollection): the structure or collectionfrom which to extract thepropertystore_array (bool): if s is a collection, whether to store theresulting data as an array in the collectionusing the given name for this instanceReturns:property: the value of the property for the given structure ora list of values if a collection has been passed
- static extract(s, *args, **kwargs)[source]#
Extract the given property with given parameters from an Atoms object.
Args:s (ase.Atoms): the structure from which to extract the propertyparams: named arguments specific to this type of propertyReturns:property: the value of the property for the given structure andparameters
- classmethod get(s, store_array=False, **kwargs)#
Extract the given property using the default parameters on an Atoms object s
Args:s (ase.Atoms or AtomsCollection): the structure or collectionfrom which to extract thepropertystore_array (bool): if s is a collection, whether to store theresulting data as an array in the collectionusing the default name for this propertyReturns:property: the value of the property for the given structure ora list of values if a collection has been passed
- class soprano.properties.nmr.isc.JCSkew(name=None, **params)[source]#
Bases:
AtomsProperty
Produces a dictionary of J coupling skews for atom pairs in the system. See JCDiagonal for how reduced couplings are transformed into couplings.
- Parameters:
sel_i (AtomSelection or [int]) – Selection or list of indices of atoms for which to return the J coupling. By default is None (= all of them).
sel_j (AtomSelection or [int]) – Selection or list of indices of atoms for which to return the J coupling with the ones in sel_i. By default is None (= same as sel_i).
tag (str) – name of the J coupling component to return. Magres files usually contain isc, isc_spin, isc_fc, isc_orbital_p and isc_orbital_d. Default is isc.
isotopes (dict) – dictionary of specific isotopes to use, by element symbol. If the isotope doesn’t exist an error will be raised.
isotope_list (list) – list of isotopes, atom-by-atom. To be used if different atoms of the same element are supposed to be of different isotopes. Where a ‘None’ is present will fall back on the previous definitions. Where an isotope is present it overrides everything else.
self_coupling (bool) – if True, include coupling of a nucleus with itself. Otherwise excluded. Default is False.
force_recalc (bool) – if True, always diagonalise the tensors even if already present. Default is False.
- Returns:
Dictionary of couplings by atomic index pair, in Hz.
- Return type:
dip_dict (dict)
Initialize an AtomsProperty and set its parameters. The AtomsProperty instance can then be called with a structure as its only argument to get the property with the given parameters.
Args:name (str): a name to give to this specific instance of theproperty (will be used to store it as array ifrequested)params: named arguments specific to this type of property- __call__(s, store_array=False)#
Calling the AtomsProperty returns the value of the property as extracted with the parameters of this specific instance.
Args:s (ase.Atoms or AtomsCollection): the structure or collectionfrom which to extract thepropertystore_array (bool): if s is a collection, whether to store theresulting data as an array in the collectionusing the given name for this instanceReturns:property: the value of the property for the given structure ora list of values if a collection has been passed
- static extract(s, *args, **kwargs)[source]#
Extract the given property with given parameters from an Atoms object.
Args:s (ase.Atoms): the structure from which to extract the propertyparams: named arguments specific to this type of propertyReturns:property: the value of the property for the given structure andparameters
- classmethod get(s, store_array=False, **kwargs)#
Extract the given property using the default parameters on an Atoms object s
Args:s (ase.Atoms or AtomsCollection): the structure or collectionfrom which to extract thepropertystore_array (bool): if s is a collection, whether to store theresulting data as an array in the collectionusing the default name for this propertyReturns:property: the value of the property for the given structure ora list of values if a collection has been passed
- class soprano.properties.nmr.isc.JCSpan(name=None, **params)[source]#
Bases:
AtomsProperty
Produces a dictionary of J coupling spans for atom pairs in the system. See JCDiagonal for how reduced couplings are transformed into couplings.
- Parameters:
sel_i (AtomSelection or [int]) – Selection or list of indices of atoms for which to return the J coupling. By default is None (= all of them).
sel_j (AtomSelection or [int]) – Selection or list of indices of atoms for which to return the J coupling with the ones in sel_i. By default is None (= same as sel_i).
tag (str) – name of the J coupling component to return. Magres files usually contain isc, isc_spin, isc_fc, isc_orbital_p and isc_orbital_d. Default is isc.
isotopes (dict) – dictionary of specific isotopes to use, by element symbol. If the isotope doesn’t exist an error will be raised.
isotope_list (list) – list of isotopes, atom-by-atom. To be used if different atoms of the same element are supposed to be of different isotopes. Where a ‘None’ is present will fall back on the previous definitions. Where an isotope is present it overrides everything else.
self_coupling (bool) – if True, include coupling of a nucleus with itself. Otherwise excluded. Default is False.
force_recalc (bool) – if True, always diagonalise the tensors even if already present. Default is False.
- Returns:
Dictionary of couplings by atomic index pair, in Hz.
- Return type:
dip_dict (dict)
Initialize an AtomsProperty and set its parameters. The AtomsProperty instance can then be called with a structure as its only argument to get the property with the given parameters.
Args:name (str): a name to give to this specific instance of theproperty (will be used to store it as array ifrequested)params: named arguments specific to this type of property- __call__(s, store_array=False)#
Calling the AtomsProperty returns the value of the property as extracted with the parameters of this specific instance.
Args:s (ase.Atoms or AtomsCollection): the structure or collectionfrom which to extract thepropertystore_array (bool): if s is a collection, whether to store theresulting data as an array in the collectionusing the given name for this instanceReturns:property: the value of the property for the given structure ora list of values if a collection has been passed
- static extract(s, *args, **kwargs)[source]#
Extract the given property with given parameters from an Atoms object.
Args:s (ase.Atoms): the structure from which to extract the propertyparams: named arguments specific to this type of propertyReturns:property: the value of the property for the given structure andparameters
- classmethod get(s, store_array=False, **kwargs)#
Extract the given property using the default parameters on an Atoms object s
Args:s (ase.Atoms or AtomsCollection): the structure or collectionfrom which to extract thepropertystore_array (bool): if s is a collection, whether to store theresulting data as an array in the collectionusing the default name for this propertyReturns:property: the value of the property for the given structure ora list of values if a collection has been passed