pytraj.vector

pytraj.analysis.vector.box(traj=None, command='', frame_indices=None, dtype='ndarray', top=None)
Parameters:

traj : Trajectory-like

command : str or a list-like of strings

frame_indices : array-like, default None

if specified, only perform calculation with given frames

top : {str, Topology}, optional, default None

pytraj.analysis.vector.boxcenter(traj=None, command='', frame_indices=None, dtype='ndarray', top=None)
Parameters:

traj : Trajectory-like

command : str or a list-like of strings

frame_indices : array-like, default None

if specified, only perform calculation with given frames

top : {str, Topology}, optional, default None

pytraj.analysis.vector.center(traj=None, command='', frame_indices=None, dtype='ndarray', top=None)
Parameters:

traj : Trajectory-like

command : str or a list-like of strings

frame_indices : array-like, default None

if specified, only perform calculation with given frames

top : {str, Topology}, optional, default None

pytraj.analysis.vector.corrplane(traj=None, command='', frame_indices=None, dtype='ndarray', top=None)
Parameters:

traj : Trajectory-like

command : str or a list-like of strings

frame_indices : array-like, default None

if specified, only perform calculation with given frames

top : {str, Topology}, optional, default None

pytraj.analysis.vector.dipole(traj=None, command='', frame_indices=None, dtype='ndarray', top=None)
Parameters:

traj : Trajectory-like

command : str or a list-like of strings

frame_indices : array-like, default None

if specified, only perform calculation with given frames

top : {str, Topology}, optional, default None

pytraj.analysis.vector.minimage(traj=None, command='', frame_indices=None, dtype='ndarray', top=None)
Parameters:

traj : Trajectory-like

command : str or a list-like of strings

frame_indices : array-like, default None

if specified, only perform calculation with given frames

top : {str, Topology}, optional, default None

pytraj.analysis.vector.principal(traj=None, command='', frame_indices=None, dtype='ndarray', top=None)
Parameters:

traj : Trajectory-like

command : str or a list-like of strings

frame_indices : array-like, default None

if specified, only perform calculation with given frames

top : {str, Topology}, optional, default None

pytraj.analysis.vector.ucellx(traj=None, command='', frame_indices=None, dtype='ndarray', top=None)
Parameters:

traj : Trajectory-like

command : str or a list-like of strings

frame_indices : array-like, default None

if specified, only perform calculation with given frames

top : {str, Topology}, optional, default None

pytraj.analysis.vector.ucelly(traj=None, command='', frame_indices=None, dtype='ndarray', top=None)
Parameters:

traj : Trajectory-like

command : str or a list-like of strings

frame_indices : array-like, default None

if specified, only perform calculation with given frames

top : {str, Topology}, optional, default None

pytraj.analysis.vector.ucellz(traj=None, command='', frame_indices=None, dtype='ndarray', top=None)
Parameters:

traj : Trajectory-like

command : str or a list-like of strings

frame_indices : array-like, default None

if specified, only perform calculation with given frames

top : {str, Topology}, optional, default None

pytraj.analysis.vector.vector_mask(traj=None, mask='', frame_indices=None, dtype='ndarray', top=None)

compute vector between two maskes

Parameters:

traj : Trajectory-like or iterable that produces Frame

mask: str or array of string or array of intergers, shape (n_vectors, 2)

vector maskes

frame_indices : array-like or iterable that produces integer number

frame indices

dtype : str, default ‘ndarray’

output dtype

top : Topology, optional, default None

Examples

>>> # calcualte N-H vector
>>> import pytraj as pt
>>> import numpy as np
>>> traj = pt.load_sample_data('tz2')
>>> from pytraj import vector as va
>>> n_indices = pt.select_atoms('@N', traj.top)
>>> h_indices = n_indices + 1
>>> # create n-h pair for vector calculation
>>> n_h_pairs = np.array(list(zip(n_indices, h_indices)))
>>> data_vec = va.vector_mask(traj, n_h_pairs, dtype='ndarray')
>>> # compute vectors for specific frame indices (0, 4)
>>> data_vec = va.vector_mask(traj, n_h_pairs, frame_indices=[0, 4], dtype='ndarray')