exatomic.core.tensor module

class exatomic.core.tensor.Tensor(*args, **kwargs)[source]

Bases: DataFrame

The tensor dataframe.

Column

Type

Description

xx

float

0,0 position in tensor

xy

float

1,0 position in tensor

xz

float

2,0 position in tensor

yx

float

0,1 position in tensor

yy

float

1,1 position in tensor

yz

float

2,1 position in tensor

zx

float

0,3 position in tensor

zy

float

1,3 position in tensor

zz

float

2,3 position in tensor

frame

category

frame value to which atach tensor

atom

int

atom index of molecule to place tensor

label

category

label of the type of tensor

classmethod from_file(filename)[source]

A file reader that will take a tensor file and extract all necessary information. There is a specific file format in place and is as follows

frame label atom xx xy xz yx yy yz zx zy zz

For multiple tensors just append the same format as above without whitespace unless leaving the frame, label, atom attributes as empty.

Parameters:

filename (str) – file pathname

Returns:

tens (Tensor) – Tensor table with the tensor attributes

class exatomic.core.tensor.Polarizability(*args, **kwargs)[source]

Bases: Tensor

class exatomic.core.tensor.NMRShielding(*args, **kwargs)[source]

Bases: Tensor

The NMR Shielding tensor dataframe.

Column

Type

Description

xx

float

0,0 position in tensor

xy

float

1,0 position in tensor

xz

float

2,0 position in tensor

yx

float

0,1 position in tensor

yy

float

1,1 position in tensor

yz

float

2,1 position in tensor

zx

float

0,3 position in tensor

zy

float

1,3 position in tensor

zz

float

2,3 position in tensor

frame

category

frame value to which atach tensor

atom

int

atom index of molecule to place tensor

label

category

label of the type of tensor

symbol

category

atom symbol the tensor is attached to

isotropic

float

isotropic shift value of the tensor

nmr_spectra(fwhm=1, ref=None, atom='H', lineshape='lorentzian', xrange=None, res=None, invert_x=False, **kwargs)[source]

Generate NMR spectra with the plotter class. We can define a gaussian or lorentzian lineshape function. For the most part we pass all of the kwargs directly into the plotter.Plot class.

Parameters:
  • fwhm (float) – Full-width at half-maximum

  • ref (float) – Isotropic shift of the reference compound

  • atom (str) – Atom that we want to display the spectra for

  • lineshape (str) – Switch beteen the different lineshape functions available

  • xrange (list) – X-bounds for the plot

  • res (float) – Resolution for the plot line

  • invert_x (bool) – Invert x-axis

class exatomic.core.tensor.JCoupling(*args, **kwargs)[source]

Bases: Tensor

The J-Coupling tensor dataframe

Column

Type

Description

xx

float

0,0 position in tensor

xy

float

1,0 position in tensor

xz

float

2,0 position in tensor

yx

float

0,1 position in tensor

yy

float

1,1 position in tensor

yz

float

2,1 position in tensor

zx

float

0,3 position in tensor

zy

float

1,3 position in tensor

zz

float

2,3 position in tensor

isotropic

float

isotropic shift value of the tensor

atom

int

atom index of molecule to place tensor

symbol

category

atom symbol the tensor is attached to

pt_atom

int

atom index of perturbing atom

pt_symbol

category

atom symbol of perturbing atom

label

category

label of the type of tensor

frame

category

frame value to which atach tensor

exatomic.core.tensor.add_tensor(uni, fp)[source]

Simple function to add a tensor object to the universe.

Parameters:
  • uni (universe) – Universe object

  • fp (str) – file pathname