pytraj.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
top : {str, Topology}, optional, default None |
---|
pytraj.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
top : {str, Topology}, optional, default None |
---|
pytraj.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
top : {str, Topology}, optional, default None |
---|
pytraj.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
top : {str, Topology}, optional, default None |
---|
pytraj.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
top : {str, Topology}, optional, default None |
---|
pytraj.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
top : {str, Topology}, optional, default None |
---|
pytraj.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
top : {str, Topology}, optional, default None |
---|
pytraj.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
top : {str, Topology}, optional, default None |
---|
pytraj.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
top : {str, Topology}, optional, default None |
---|
pytraj.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
top : {str, Topology}, optional, default None |
---|
pytraj.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)
frame_indices : array-like or iterable that produces integer number
dtype : str, default ‘ndarray’
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')