align_traj_on_density module
This module is used to align trajectories on a density. It was designed
for complex lipidic phases such as the lipid cubic phase. It maximizes the overlap
of a selection of atoms with a reference density while minimizing the overlap
of a second selection with that same density. Typically the reference density is water.
-
TransformViewWithPeriodicBoundaries(view, x, cell_center=None, ucell_size=None, ucell_angles=None, group_res=False, follow_bonds=False)[source]
This function applies the transformation given in x to the view.
If specified it will warp the transformed view using the periodic cell information.
To make it more stable, we translate the system to the origin, then do the rotation,
translate back and then add the current translation.
WARNING: the translational part of x is multiplied by 10 before applying (meaning x[:3] should be given in [nm])!!
PBC are applied before the rotation is made.
Parameters: |
- view (EntityView) – The view to which the transformation will be applied
- x (tuple (float,:class:float,:class:float,:class:float,:class:float,:class:float)) – An array of 6 floats. The 3 first ones are the translation in nm and the 3 last ones the rotation angles.
- cell_center (Vec3) – Center of the unit cell around which view will get wrapped
- ucell_size (Vec3) – Sizes of the unit cell vectors
- ucell_angles (Vec3) – Angles of the unit cell vectors
- group_res (bool) – Whether residues whould be maintained whole when wrapping
- follow_bonds (bool) – If group_res is set to true, some residues might still get split
if they extend over more than half of the unit cell. If follow_bonds
is set to True, then the topology will be used to ensure that all residues are
properly wrapped. This will slow down the wrapping.
|
-
AlignTrajectoryOnDensity(t, density_map, water_sele, not_water_sele=None, initial_translation=None, PBC=True, cell_center=None, skip_first=True)[source]
This function Aligns a trajectory on a density.
It was designed to align trajectories of complex lipidic phases such as the lipid cubic phase.
It maximizes the overlap of a selection of atoms (water_sele) with the density (density_map)
while minimizing the overlap of a second selection (not_water_sele) with that same density.
Typically the reference density is water.
Parameters: |
- t (CoordGroupHandle) – The trajectory
- density_map (ImageHandle) – The density used to align the trajectory
- water_sele (str) – Selection string for the EntityView whose overlap with the density is maximized. If not set, density_sele is used.
- not_water_sele (str) – Selection string for the EntityView whose overap with the density is minimized.
- initial_translation (Vec3) – Translation applied before generating the density
- PBC (bool) – Use of periodic boundary conditions on the entity during alignment
- cell_center (Vec3) – center of the cell for wrapping the entity during alignment
- skip_first (bool) – Only apply initial_translation to the first frame, no optimization
|
-
AlignTrajectoryOnFirstFrame(t, density_sele, water_sele=None, not_water_sele=None, initial_translation=None, PBC=True, cell_center=None, outdir=None, filename_basis='', density_margin=0, density_cutback=False, density_sampling=1, low_pass_filter_level=10, io_profile=None)[source]
This function Aligns a trajectory on the density generated from its first frame.
It was designed to align trajectories of complex lipidic phases such as the lipid cubic phase.
It maximizes the overlap of a selection of atoms (water_sele) with the density of a selection
(density_sele), genreated from the first frame, while minimizing the overlap
of a second selection (not_water_sele) with that same density. Typically the reference density is water.
Parameters: |
- t (CoordGroupHandle) – The trajectory
- density_sele (str) – Selection string used to select the atoms for the generation of the density
- water_sele (str) – Selection string for the EntityView whose overlap with the density is maximized. If not set, density_sele is used.
- not_water_sele (str) – Selection string for the EntityView whose overap with the density is minimized.
- initial_translation (Vec3) – Translation applied before generating the density
- PBC (bool) – Use of periodic boundary conditions on the entity during alignment
- cell_center (Vec3) – Center of the cell for wrapping the entity during alignment
- outdir (str) – Path to the output directory for saving files (densities, aligned trajectory). If not set, files will not be saved.
- filename_basis (str) – basis name used for all the files being saved
- density_margin (float) – size by which the Entity gets extended (using PBCs) before generating the density
- density_cutback (bool) – If True, the density is cutback after generation to its initial size (previous to the extension by density_margin)
- density_sampling (float) – The sampling in real space for the density (# of points per Angstrom).
- low_pass_filter_level (float) – The density gets filtered after generation by a low pass filter with this level in Angstrom.
- io_profile (IOProfile) – Profile used to save PDB and dcd files.
|
-
WrapTransformedView(eh, x, cell_center, ucell_size, ucell_angles, group_res=False, follow_bonds=False)[source]
This function allows to apply periodic boundaries on a view that has been transformed.
It will apply the inverse of the rotation, then wrap around the rotated cell_center,
and finally reapply the rotation.