pytraj.datasets

class pytraj.datasets.c_datasets.Dataset

Bases: object

Attributes

aspect
data mostly memoryview
dtype
key
name
scalar_type
size
values return a copy or non-copy, depending on data

Methods

to_dict(self[, use_numpy])
to_ndarray(self[, copy]) return ndarray view of self.data
tolist(self)
aspect
data

mostly memoryview

dtype
key
name
scalar_type
size
to_dict(self, use_numpy=False)
to_ndarray(self, copy=False)

return ndarray view of self.data

tolist(self)
values

return a copy or non-copy, depending on data

class pytraj.datasets.c_datasets.Dataset1D

Bases: pytraj.datasets.c_datasets.Dataset

Attributes

aspect
data mostly memoryview
dtype
key
name
scalar_type
shape
size
values return a copy or non-copy, depending on data

Methods

from_array_like(self, array_like) Notes: require numpy
to_dict(self[, use_numpy])
to_ndarray(self[, copy]) return ndarray view of self.data
tolist(self)
aspect
data

mostly memoryview

dtype
from_array_like(self, array_like)

Notes: require numpy

key
name
scalar_type
shape
size
to_dict(self, use_numpy=False)
to_ndarray(self, copy=False)

return ndarray view of self.data

tolist(self)
values

return a copy or non-copy, depending on data

class pytraj.datasets.c_datasets.Dataset2D

Bases: pytraj.datasets.c_datasets.Dataset

Attributes

aspect
data mostly memoryview
dtype
key
kind
n_cols
n_rows
name
scalar_type
size
values return a copy or non-copy, depending on data

Methods

get_element(self, int x, int y)
get_full_matrix(self)
to_dataframe(self)
to_dict(self[, use_numpy])
to_ndarray(self[, copy]) return ndarray view of self.data
tolist(self)
aspect
data

mostly memoryview

dtype
get_element(self, int x, int y)
get_full_matrix(self)
key
kind
n_cols
n_rows
name
scalar_type
size
to_dataframe(self)
to_dict(self, use_numpy=False)
to_ndarray(self, copy=False)

return ndarray view of self.data

tolist(self)
values

return a copy or non-copy, depending on data

class pytraj.datasets.c_datasets.Dataset3D

Bases: pytraj.datasets.c_datasets.Dataset

Attributes

aspect
data mostly memoryview
dtype
key
name
scalar_type
size
values return a copy or non-copy, depending on data

Methods

to_dict(self[, use_numpy])
to_ndarray(self[, copy]) return ndarray view of self.data
tolist(self)
aspect
data

mostly memoryview

dtype
key
name
scalar_type
size
to_dict(self, use_numpy=False)
to_ndarray(self, copy=False)

return ndarray view of self.data

tolist(self)
values

return a copy or non-copy, depending on data

class pytraj.datasets.c_datasets.DatasetCoords

Bases: pytraj.datasets.c_datasets.Dataset

Attributes

aspect
data mostly memoryview
dtype
key
n_atoms used for frame_iter
n_frames
name
scalar_type
size
top
values return a copy or non-copy, depending on data
xyz return a copy of xyz coordinates (ndarray, shape=(n_frames, n_atoms, 3)

Methods

add_frame(self, Frame frame)
allocate_frame(self)
append(self, frame) alis of addframe
get_frame(self, int idx, Frame frameout)
to_dataframe(self)
to_dict(self[, use_numpy])
to_ndarray(self[, copy]) return ndarray view of self.data
tolist(self) return flatten list for traj-like object
add_frame(self, Frame frame)
allocate_frame(self)
append(self, frame)

alis of addframe

aspect
data

mostly memoryview

dtype
get_frame(self, int idx, Frame frameout)
key
n_atoms

used for frame_iter

n_frames
name
scalar_type
size
to_dataframe(self)
to_dict(self, use_numpy=False)
to_ndarray(self, copy=False)

return ndarray view of self.data

tolist(self)

return flatten list for traj-like object

top
values

return a copy or non-copy, depending on data

xyz

return a copy of xyz coordinates (ndarray, shape=(n_frames, n_atoms, 3) We can not return a memoryview since Trajectory is a C++ vector of Frame object

class pytraj.datasets.c_datasets.DatasetCoordsCRD

Bases: pytraj.datasets.c_datasets.DatasetCoords

Attributes

aspect
data
dtype
key
n_atoms used for frame_iter
n_frames
name
scalar_type
size
top
values
xyz return a copy of xyz coordinates (ndarray, shape=(n_frames, n_atoms, 3)

Methods

add_frame(self, Frame frame)
allocate_frame(self)
append(self, frame) alis of addframe
get_frame(self, int idx, Frame frameout)
load(self, filename)
to_dataframe(self)
to_dict(self[, use_numpy])
to_ndarray(self[, copy]) return ndarray view of self.data
tolist(self) return flatten list for traj-like object
add_frame(self, Frame frame)
allocate_frame(self)
append(self, frame)

alis of addframe

aspect
data
dtype
get_frame(self, int idx, Frame frameout)
key
load(self, filename)
n_atoms

used for frame_iter

n_frames
name
scalar_type
size
to_dataframe(self)
to_dict(self, use_numpy=False)
to_ndarray(self, copy=False)

return ndarray view of self.data

tolist(self)

return flatten list for traj-like object

top
values
xyz

return a copy of xyz coordinates (ndarray, shape=(n_frames, n_atoms, 3) We can not return a memoryview since Trajectory is a C++ vector of Frame object

class pytraj.datasets.c_datasets.DatasetCoordsRef

Bases: pytraj.datasets.c_datasets.DatasetCoords

Attributes

aspect
data
dtype
key
n_atoms used for frame_iter
n_frames
name
scalar_type
size
top
values
xyz

Methods

add_frame(self, Frame frame)
allocate_frame(self)
append(self, frame) alis of addframe
get_frame(self)
to_dataframe(self)
to_dict(self[, use_numpy])
to_ndarray(self[, copy]) return ndarray view of self.data
tolist(self) return flatten list for traj-like object
add_frame(self, Frame frame)
allocate_frame(self)
append(self, frame)

alis of addframe

aspect
data
dtype
get_frame(self)
key
n_atoms

used for frame_iter

n_frames
name
scalar_type
size
to_dataframe(self)
to_dict(self, use_numpy=False)
to_ndarray(self, copy=False)

return ndarray view of self.data

tolist(self)

return flatten list for traj-like object

top
values
xyz
class pytraj.datasets.c_datasets.DatasetDouble

Bases: pytraj.datasets.c_datasets.Dataset1D

Attributes

aspect
data
dtype
key
name
scalar_type
shape
size
values return a copy or non-copy, depending on data

Methods

append(self, double d)
from_array_like(self, array_like) Notes: require numpy
resize(self, size_t sizeIn)
to_dict(self[, use_numpy])
to_ndarray(self[, copy]) return ndarray view of self.data
tolist(self)
append(self, double d)
aspect
data
dtype
from_array_like(self, array_like)

Notes: require numpy

key
name
resize(self, size_t sizeIn)
scalar_type
shape
size
to_dict(self, use_numpy=False)
to_ndarray(self, copy=False)

return ndarray view of self.data

tolist(self)
values

return a copy or non-copy, depending on data

class pytraj.datasets.c_datasets.DatasetFloat

Bases: pytraj.datasets.c_datasets.Dataset1D

Attributes

aspect
data
dtype
key
name
scalar_type
shape
size
values return a copy or non-copy, depending on data

Methods

append(self, ds)
from_array_like(self, array_like) Notes: require numpy
resize(self, size_t sizeIn)
to_dict(self[, use_numpy])
to_ndarray(self[, copy]) return ndarray view of self.data
tolist(self)
append(self, ds)
aspect
data
dtype
from_array_like(self, array_like)

Notes: require numpy

key
name
resize(self, size_t sizeIn)
scalar_type
shape
size
to_dict(self, use_numpy=False)
to_ndarray(self, copy=False)

return ndarray view of self.data

tolist(self)
values

return a copy or non-copy, depending on data

class pytraj.datasets.c_datasets.DatasetGridDouble

Bases: pytraj.datasets.c_datasets.Dataset3D

Attributes

aspect
data
dtype
key
name
nx
ny
nz
scalar_type
shape
size
values return a copy or non-copy, depending on data

Methods

resize(self, size_t x, size_t y, size_t z)
to_dict(self[, use_numpy])
to_ndarray(self[, copy])
tolist(self)
aspect
data
dtype
key
name
nx
ny
nz
resize(self, size_t x, size_t y, size_t z)
scalar_type
shape
size
to_dict(self, use_numpy=False)
to_ndarray(self, copy=True)
tolist(self)
values

return a copy or non-copy, depending on data

class pytraj.datasets.c_datasets.DatasetGridFloat

Bases: pytraj.datasets.c_datasets.Dataset3D

Attributes

aspect
data
dtype
key
name
nx
ny
nz
scalar_type
shape
size
values return a copy or non-copy, depending on data

Methods

resize(self, size_t x, size_t y, size_t z)
to_dict(self[, use_numpy])
to_ndarray(self[, copy])
tolist(self)
aspect
data
dtype
key
name
nx
ny
nz
resize(self, size_t x, size_t y, size_t z)
scalar_type
shape
size
to_dict(self, use_numpy=False)
to_ndarray(self, copy=True)
tolist(self)
values

return a copy or non-copy, depending on data

class pytraj.datasets.c_datasets.DatasetInteger

Bases: pytraj.datasets.c_datasets.Dataset1D

Attributes

aspect
data
dtype
key
name
scalar_type
shape
size
values return a copy or non-copy, depending on data

Methods

append(self, val)
from_array_like(self, array_like) Notes: require numpy
resize(self, size_t sizeIn)
to_dict(self[, use_numpy])
to_ndarray(self[, copy]) return ndarray view of self.data
tolist(self)
append(self, val)
aspect
data
dtype
from_array_like(self, array_like)

Notes: require numpy

key
name
resize(self, size_t sizeIn)
scalar_type
shape
size
to_dict(self, use_numpy=False)
to_ndarray(self, copy=False)

return ndarray view of self.data

tolist(self)
values

return a copy or non-copy, depending on data

class pytraj.datasets.c_datasets.DatasetMatrix3x3

Bases: pytraj.datasets.c_datasets.Dataset

Attributes

aspect
data
dtype
key
name
scalar_type
size
values return a copy or non-copy, depending on data

Methods

append(self, Matrix_3x3 mat)
to_dict(self[, use_numpy])
to_ndarray(self[, copy]) return a copy
tolist(self)
append(self, Matrix_3x3 mat)
aspect
data
dtype
key
name
scalar_type
size
to_dict(self, use_numpy=False)
to_ndarray(self, copy=True)

return a copy

tolist(self)
values

return a copy or non-copy, depending on data

class pytraj.datasets.c_datasets.DatasetMatrixDouble

Bases: pytraj.datasets.c_datasets.Dataset2D

Attributes

aspect
data
dtype
key
kind
mass
n_cols
n_rows
n_snapshots
name
scalar_type
size
values return a copy or non-copy, depending on data

Methods

append(self, double d)
element(self, size_t x, size_t y)
get_element(self, int x, int y)
get_full_matrix(self) return python array with length = n_rows*n_cols
set_element(self, size_t x, size_t y, double d)
store_mass(self, Darray mIn)
to_dataframe(self)
to_dict(self[, use_numpy])
to_half_matrix(self)
to_ndarray(self[, copy]) use copy=True to be the same as Dataset1D
tolist(self)
vect(self)
append(self, double d)
aspect
data
dtype
element(self, size_t x, size_t y)
get_element(self, int x, int y)
get_full_matrix(self)

return python array with length = n_rows*n_cols

key
kind
mass
n_cols
n_rows
n_snapshots
name
scalar_type
set_element(self, size_t x, size_t y, double d)
size
store_mass(self, Darray mIn)
to_dataframe(self)
to_dict(self, use_numpy=False)
to_half_matrix(self)
to_ndarray(self, copy=True)

use copy=True to be the same as Dataset1D

tolist(self)
values

return a copy or non-copy, depending on data

vect(self)
class pytraj.datasets.c_datasets.DatasetMatrixFloat

Bases: pytraj.datasets.c_datasets.Dataset2D

Attributes

aspect
data
dtype
key
kind
n_cols
n_rows
name
scalar_type
size
values return a copy or non-copy, depending on data

Methods

get_element(self, int x, int y)
get_full_matrix(self)
to_dataframe(self)
to_dict(self[, use_numpy])
to_half_matrix(self)
to_ndarray(self[, copy])
tolist(self)
aspect
data
dtype
get_element(self, int x, int y)
get_full_matrix(self)
key
kind
n_cols
n_rows
name
scalar_type
size
to_dataframe(self)
to_dict(self, use_numpy=False)
to_half_matrix(self)
to_ndarray(self, copy=True)
tolist(self)
values

return a copy or non-copy, depending on data

class pytraj.datasets.c_datasets.DatasetMesh

Bases: pytraj.datasets.c_datasets.Dataset1D

Attributes

aspect
data
dtype
key
name
scalar_type
shape
size
values return a copy or non-copy, depending on data

Methods

from_array_like(self, array_like) Notes: require numpy
to_dict(self[, use_numpy])
to_ndarray(self[, copy]) use copy=True to make consistent with Dataset1D
tolist(self) return 2D list with format [index, value]
aspect
data
dtype
from_array_like(self, array_like)

Notes: require numpy

key
name
scalar_type
shape
size
to_dict(self, use_numpy=False)
to_ndarray(self, copy=True)

use copy=True to make consistent with Dataset1D

tolist(self)

return 2D list with format [index, value]

values

return a copy or non-copy, depending on data

class pytraj.datasets.c_datasets.DatasetModes

Bases: pytraj.datasets.c_datasets.Dataset

Attributes

aspect
data
dtype
eigenvalues
eigenvectors
key
n_modes
name
scalar_type
size
values
vector_size

Methods

eigval_to_freq(self, x)
to_dict(self[, use_numpy])
to_ndarray(self[, copy]) return ndarray view of self.data
tolist(self)
aspect
data
dtype
eigenvalues
eigenvectors
eigval_to_freq(self, x)
key
n_modes
name
scalar_type
size
to_dict(self, use_numpy=False)
to_ndarray(self, copy=False)

return ndarray view of self.data

tolist(self)
values
vector_size
class pytraj.datasets.c_datasets.DatasetRemLog

Bases: object

class pytraj.datasets.c_datasets.DatasetString

Bases: pytraj.datasets.c_datasets.Dataset1D

Attributes

aspect
data
dtype
key
name
scalar_type
shape
size
values return a copy or non-copy, depending on data

Methods

from_array_like(self, array_like) Notes: require numpy
resize(self, size_t sizeIn)
to_dict(self[, use_numpy])
to_ndarray(self[, copy]) return ndarray view of self.data
tolist(self)
aspect
data
dtype
from_array_like(self, array_like)

Notes: require numpy

key
name
resize(self, size_t sizeIn)
scalar_type
shape
size
to_dict(self, use_numpy=False)
to_ndarray(self, copy=False)

return ndarray view of self.data

tolist(self)
values

return a copy or non-copy, depending on data

class pytraj.datasets.c_datasets.DatasetTopology

Bases: pytraj.datasets.c_datasets.Dataset

Attributes

aspect
data
dtype
key
name
scalar_type
size
values

Methods

to_dict(self[, use_numpy])
to_ndarray(self[, copy]) return ndarray view of self.data
tolist(self)
aspect
data
dtype
key
name
scalar_type
size
to_dict(self, use_numpy=False)
to_ndarray(self, copy=False)

return ndarray view of self.data

tolist(self)
values
class pytraj.datasets.c_datasets.DatasetVector

Bases: pytraj.datasets.c_datasets.Dataset

Attributes

aspect
data
dtype
key
name
scalar_type
shape
size
values return a copy or non-copy, depending on data

Methods

append(self, Vec3 vec)
resize(self, size_t sizeIn)
to_dataframe(self)
to_dict(self[, use_numpy])
to_ndarray(self[, copy])
tolist(self)
append(self, Vec3 vec)
aspect
data
dtype
key
name
resize(self, size_t sizeIn)
scalar_type
shape
size
to_dataframe(self)
to_dict(self, use_numpy=False)
to_ndarray(self, copy=True)
tolist(self)
values

return a copy or non-copy, depending on data

class pytraj.datasets.c_datasets.ReplicaFrame

Bases: object