Tensor in CSV format (chemistry_files.csv_tensor)

Internal (lossy) textual format for the storage of data.

class qcip_tools.chemistry_files.csv_tensor.CSVTensor

Special CSV input. Assume that the first cell contains CSV_TENSOR_IN, and that the first row contains different information:

  • In second column, the derivative type (i.e. FFF, GG, …) ;

  • In third column: spacial DOF, if needed ;

  • In fourth column: frequency, if needed ;

  • In fifth column: number of (excited) states, if needed.

  • For the latter rows, values of the first column does not matter.

Then, the rest correspond to the values of the last dimension of the tensor (F/D/X = 3, G = spacial DOF). The number of row is equal to the product of the dimensions of the tensor (except the last one).

New tensor starts with CSV_TENSOR_IN.

For example,

CSV_TENSOR_IN,G,6,,,
1,1,1,1,1,1
CSV_TENSOR_IN,GG,6
1,0,0,0,0,0
0,2,0,0,0,0
0,0,3,0,0,0
0,0,0,4,0,0
0,0,0,0,5,0
0,0,0,0,0,6
classmethod attempt_identification(f)

Check for “CSV_TENSOR_IN”

Return type:

bool

classmethod possible_file_extensions()

Return the common extention of this kind of files

Return type:

list

qcip_tools.chemistry_files.csv_tensor.csvtensor__property__electrical_derivatives(obj, *args, **kwargs)

Get the geometrical derivatives, if available

Parameters:

obj (CSVTensor) – object

Return type:

dict

qcip_tools.chemistry_files.csv_tensor.csvtensor__property__excitations(obj, *args, **kwargs)
Parameters:

obj (CSVTensor) – object

Return type:

dict

qcip_tools.chemistry_files.csv_tensor.csvtensor__property__geometrical_derivatives(obj, *args, **kwargs)

Get the geometrical derivatives, if available

Parameters:

obj (CSVTensor) – object

Return type:

dict