aquaduct.traj.sandwich module

class Window(start, stop, step)[source]

Bases: object

__init__(start, stop, step)[source]
__repr__()[source]
range()[source]
get_real(frame)[source]
len()[source]
class MasterReader[source]

Bases: object

open_reader_traj = {}
topology = ''
trajectory = ['']
window = None
sandwich_mode = None
engine_name = 'mda'
__call__(topology, trajectory, window=None, sandwich=False)[source]
Parameters:
  • topology (str) – Topology file name.
  • trajectory (list) – List of trajectories. Each element is a fine name.
  • window (Window) – Frames window to read.
  • sandwich (bool) – Flag for setting sandwitch mode.
__getstate__()[source]
__setstate__(state)[source]
engine
correct_window()[source]
__repr__()[source]
sandwich(number=False)[source]
baguette(number=False)[source]
iterate(number=False)[source]
get_single_reader(number)[source]
get_reader_by_id(someid)[source]
real_number_of_frames()[source]
number_of_frames(onelayer=False)[source]
number_of_layers()[source]
class ReaderAccess[source]

Bases: object

reader
VdW_radii = {'ge': 2.11, 'gd': 2.34, 'ga': 1.87, 'la': 2.43, 'li': 1.82, 'tl': 1.96, 'lu': 2.24, 'lr': 2.46, 'th': 2.45, 'ti': 2.11, 'te': 2.06, 'tb': 2.33, 'tc': 2.16, 'ta': 2.22, 'yb': 2.26, 'dy': 2.31, 'xe': 2.16, 'h': 1.1, 'p': 1.8, 'tm': 2.27, 'zn': 2.01, 'eu': 2.35, 'es': 2.45, 'er': 2.29, 'ru': 2.13, 're': 2.16, 'ra': 2.83, 'rb': 3.03, 'rn': 2.2, 'rh': 2.1, 'be': 1.53, 'ba': 2.68, 'bi': 2.07, 'bk': 2.44, 'br': 1.85, 'c': 1.7, 'k': 2.75, 'o': 1.52, 's': 1.8, 'w': 2.18, 'os': 2.16, 'co': 2.0, 'cm': 2.45, 'cl': 1.75, 'ca': 2.31, 'cf': 2.45, 'ce': 2.42, 'cd': 2.18, 'cs': 3.43, 'cr': 2.06, 'cu': 1.96, 'pr': 2.4, 'pt': 2.13, 'pu': 2.43, 'pb': 2.02, 'pa': 2.43, 'pd': 2.1, 'po': 1.97, 'pm': 2.38, 'ho': 2.3, 'hf': 2.23, 'hg': 2.23, 'he': 1.4, 'md': 2.46, 'mg': 1.73, 'b': 1.92, 'f': 1.47, 'mo': 2.17, 'mn': 2.05, 'n': 1.55, 'v': 2.07, 'ac': 2.47, 'ag': 2.11, 'ir': 2.13, 'am': 2.44, 'al': 1.84, 'as': 1.85, 'ar': 1.88, 'au': 2.14, 'at': 2.02, 'in': 1.93, 'ni': 1.97, 'no': 2.46, 'na': 2.27, 'nb': 2.18, 'nd': 2.39, 'ne': 1.54, 'zr': 2.23, 'np': 2.39, 'fr': 3.48, 'y': 2.32, 'fe': 2.04, 'fm': 2.45, 'i': 1.98, 'sr': 2.49, 'kr': 2.02, 'si': 2.1, 'u': 2.41, 'sn': 2.17, 'sm': 2.36, 'sc': 2.15, 'sb': 2.06, 'se': 1.9}

Dictionary of VdW radii.

Data taken from L. M. Mentel, mendeleev, 2014. Available at: https://bitbucket.org/lukaszmentel/mendeleev. Package mendeleev is not used because it depends on too many other libraries.

class ReaderTraj(topology, trajectory, number=None, window=None)[source]

Bases: aquaduct.traj.sandwich.ReaderAccess

__init__(topology, trajectory, number=None, window=None)[source]
Parameters:
  • topology (str) – Topology file name.
  • trajectory (list) – Trajectory file name.
  • number (int) – Number of trajectory file.
  • window (Window) – Frames window to read.
  • reader (Reader) – Parent reader object.

This is base class for MD data access engines.

__repr__()[source]
iterate_over_frames()[source]
set_frame(frame)[source]
dump_frames(frames, selection=None, filename=None)[source]
__del__()[source]
open_trajectory()[source]
close_trajectory()[source]
set_real_frame(real_frame)[source]
real_number_of_frames()[source]
parse_selection(selection)[source]
atom_vdw(atomid)[source]
atom2residue(atomid)[source]
atoms_positions(atomids)[source]
residues_positions(resids)[source]
residues_names(resids)[source]
atoms_masses(atomids)[source]
dump_frames_to_file(frames, selection, filename)[source]
class ReaderTrajViaMDA(topology, trajectory, number=None, window=None)[source]

Bases: aquaduct.traj.sandwich.ReaderTraj

open_trajectory()[source]
close_trajectory()[source]
set_real_frame(real_frame)[source]
parse_selection(selection)[source]
atom2residue(atomid)[source]
atoms_positions(atomids)[source]
residues_positions(resids)[source]
residues_names(resids)[source]
real_number_of_frames()[source]
atoms_masses(atomids)[source]
atom_vdw(atomid)[source]
dump_frames_to_file(frames, selection, filename)[source]
class Selection(selected)[source]

Bases: aquaduct.traj.sandwich.ReaderAccess

__init__(selected)[source]
layer(number)[source]
numbers()[source]
ix(ix)[source]
len()[source]
get_reader(number)[source]
add(other)[source]
uniquify()[source]
ids()[source]
coords()[source]
center_of_mass()[source]
class AtomSelection(selected)[source]

Bases: aquaduct.traj.sandwich.Selection

vdw()[source]
residues()[source]
coords()[source]
center_of_mass()[source]
contains_residues(other_residues, convex_hull=False, map_fun=None, known_true=None)[source]
containing_residues(other_residues, *args, **kwargs)[source]
chull()[source]
class ResidueSelection(selected)[source]

Bases: aquaduct.traj.sandwich.Selection

coords()[source]
names()[source]
single_residues()[source]
coords_range_core(*args, **kwargs)[source]
coords_range(srange, number, rid)[source]
class FramesRangeCollection[source]

Bases: object

__init__()[source]
append(srange)[source]
get_ranges(srange)[source]
smooth_coords_ranges(*args, **kwargs)[source]
class SingleResidueSelection(resid)[source]

Bases: aquaduct.traj.sandwich.ReaderAccess

__init__(resid)[source]
get_reader()[source]
coords(frames)[source]
_coords(*args, **kwargs)[source]
coords_smooth(sranges, smooth)[source]