smc_lammps.generate.structures.smc package¶
Submodules¶
smc_lammps.generate.structures.smc.smc module¶
- class smc_lammps.generate.structures.smc.smc.SMC(use_rigid_hinge: bool, pos: SMC_Pos, t_arms_heads: AtomType, t_kleisin: AtomType, t_shield: AtomType, t_hinge: AtomType, t_atp: AtomType, t_upper_site: AtomType, t_middle_site: AtomType, t_lower_site: AtomType, t_ref_site: AtomType, t_side_site: AtomType, k_bond: float, k_hinge: float, max_bond_length: float, k_elbow: float, k_arm: float, k_align_site: float, k_fold: float, k_asymmetry: float, bridge_width: float, arm_length: float, _hinge_radius: float, arms_angle_ATP: float, folding_angle_ATP: float, folding_angle_APO: float, elbow_attraction: float, elbow_spacing: float)¶
Bases:
objectStores an SMC with its bonds, pair interactions, etc.
- __init__(use_rigid_hinge: bool, pos: SMC_Pos, t_arms_heads: AtomType, t_kleisin: AtomType, t_shield: AtomType, t_hinge: AtomType, t_atp: AtomType, t_upper_site: AtomType, t_middle_site: AtomType, t_lower_site: AtomType, t_ref_site: AtomType, t_side_site: AtomType, k_bond: float, k_hinge: float, max_bond_length: float, k_elbow: float, k_arm: float, k_align_site: float, k_fold: float, k_asymmetry: float, bridge_width: float, arm_length: float, _hinge_radius: float, arms_angle_ATP: float, folding_angle_ATP: float, folding_angle_APO: float, elbow_attraction: float, elbow_spacing: float) None¶
- arm_length: float¶
Length of one arm (nm).
- arms_angle_ATP: float¶
Angle between arms in the ATP state (degrees).
- bridge_width: float¶
ATP bridge width (nm).
- elbow_attraction: float¶
- elbow_spacing: float¶
- folding_angle_APO: float¶
- folding_angle_ATP: float¶
- get_molecule_ids() list[int]¶
- get_repulsive_groups() list[AtomGroup]¶
Returns a list of groups that should have a repulsive LJ interaction with other (inert) beads such as obstacles.
- has_side_site() bool¶
- has_toroidal_hinge() bool¶
- property hinge_radius: float¶
- k_align_site: float¶
Improper strength used to maintain site orientation, should be stiff (pN * nm / rad^2).
- k_arm: float¶
Angular strength of arms relative to bridge, typically stiff (pN * nm / rad^2).
- k_asymmetry: float¶
Improper strength used to induce asymmetric folding, should be stiff (pN * nm / rad^2).
- k_bond: float¶
Bond strength for general connections (e.g. arms connected at elbow) (pN/nm = mN/m).
- k_elbow: float¶
Angular strength at elbows, typically soft to allow bending (pN * nm / rad^2).
- k_fold: float¶
Improper folding strength of Kleisin relative to arms, should be stiff (pN * nm / rad^2).
- k_hinge: float¶
Hinge bond strength (pN/nm = 1e-3 N/m).
- max_bond_length: float¶
Max bond length for connected parts (nm).
- t_side_site: AtomType¶
Type of attractive atoms at optional side site (when strand swapping is desired).
- use_rigid_hinge: bool¶
If True, the hinge is one rigid molecule. Otherwise, the two parts of the hinge are connected by bonds.
smc_lammps.generate.structures.smc.smc_creator module¶
- class smc_lammps.generate.structures.smc.smc_creator.SMC_Creator(SMC_spacing: float, upper_site_h: float, upper_site_v: float, middle_site_h: float, middle_site_v: float, lower_site_h: float, lower_site_v: float, arm_length: float, bridge_width: float, use_toroidal_hinge: bool, hinge_radius: float, hinge_opening: float, add_side_site: bool, kleisin_radius: float, folding_angle_APO: float, seed: int = 5894302289572, small_noise: float = 1e-05)¶
Bases:
objectGenerates the positions of all SMC beads.
The final SMC is oriented towards the
+xdirection (movement direction), is oriented in the+ydirection the bottom-to-top (Kleisin to hinge). Thezdirection is symmetric.The interactions are added in
smc_lammps.generate.structures.smc.smc.SMC.- SMC_spacing: float¶
The spacing between coarse-grained beads (nm).
- __init__(SMC_spacing: float, upper_site_h: float, upper_site_v: float, middle_site_h: float, middle_site_v: float, lower_site_h: float, lower_site_v: float, arm_length: float, bridge_width: float, use_toroidal_hinge: bool, hinge_radius: float, hinge_opening: float, add_side_site: bool, kleisin_radius: float, folding_angle_APO: float, seed: int = 5894302289572, small_noise: float = 1e-05) None¶
- add_side_site: bool¶
Whether to add an additional binding site on the lower right arm or not. This is used for strand swapping.
- arm_length: float¶
Length of one SMC arm (nm). This includes both (lower and upper) segments connected by the elbow.
- bridge_width: float¶
Width of the ATP bridge, which is the distance between the bottom-most arm beads (nm).
- folding_angle_APO: float¶
The angle between the arms and Kleisin in the APO state (degrees).
- get_arms() tuple[ndarray[tuple[Any, ...], dtype[float32]], ndarray[tuple[Any, ...], dtype[float32]], ndarray[tuple[Any, ...], dtype[float32]], ndarray[tuple[Any, ...], dtype[float32]]]¶
Generates the positions of the two arms in four segments.
Each of the two arms is split between the upper (
u, between elbow and hinge), and the lower (d, between ATP bridge and elbow) segments. This makes 4 total segments, which are all straight lines.- Returns:
Tuple of (lower left dl, upper left ul, upper right ur, lower right dr).
- get_bridge() ndarray[tuple[Any, ...], dtype[float32]]¶
Generates the positions of the ATP bridge.
The bridge is a single straight segment.
- Returns:
Positions of the bridge.
- get_heads_kleisin() ndarray[tuple[Any, ...], dtype[float32]]¶
Generates the positions of the Kleisin compartment.
The Kleisin is a segment of a circle, with a cut-out at the bridge location.
- Returns:
Positions of the Kleisin ring.
- Raises:
ValueError – The kleisin radius is incompatible with the bridge width.
- get_interaction_sites(lower_site_points_down: bool) tuple[ndarray[tuple[Any, ...], dtype[float32]], ndarray[tuple[Any, ...], dtype[float32]], ndarray[tuple[Any, ...], dtype[float32]]]¶
- get_mass_per_atom(total_mass: float) float¶
Returns the mass that should be assigned to each atom.
- Parameters:
total_mass – The total mass of the SMC.
- Returns:
Mass of one bead.
- get_toroidal_hinge() ndarray[tuple[Any, ...], dtype[float32]]¶
- hinge_opening: float¶
- hinge_radius: float¶
- kleisin_radius: float¶
The radius of the (semi-circular) Kleisin (nm).
- lower_site_h: float¶
Horizontal distance between bottom binding sites (units bead spacing).
- lower_site_v: float¶
Distance of bottom binding sites from kleisin (units of bead spacing).
- middle_site_h: float¶
Horizontal distance between middle binding sites (units bead spacing).
- middle_site_v: float¶
Vertical distance of middle binding sites from bridge (units of bead spacing).
- seed: int = 5894302289572¶
A random seed. This is used when applying random shifts between the different segments to prevent exact overlap which can cause issues in LAMMPS.
- static shielded_site_template(n_inner_beads: int, n_outer_beads_per_inner_bead: int, inner_spacing: float, outer_spacing: float) ndarray[tuple[Any, ...], dtype[float32]]¶
Generates a line of beads surrounded by a protective shell/shield.
This is used to allow binding from a specific direction, where the inner beads are attractive and the outer beads repulsive.
- Parameters:
n_inner_beads – Number of inner beads to generate.
n_outer_beads_per_inner_bead – Number of outer beads surrounding each inner bead in the main shell.
inner_spacing – The distance between neighboring inner beads.
outer_spacing – The distance between an inner bead and the nearest outer beads surrounding it.
- Returns:
Positions of the beads in order of (inner beads, shell beads, shell left, shell right).
- small_noise: float = 1e-05¶
Amount to shift overlapping segments by (units of bead spacing). See
seedfor more information.
- static transpose_rotate_transpose(rotation, *arrays: ndarray[tuple[Any, ...], dtype[float32]]) tuple[ndarray[tuple[Any, ...], dtype[float32]], ...]¶
Rotates the points in an (N, 3) array.
- Parameters:
rotation – Rotation matrix.
arrays – Arrays to apply rotation to.
- Returns:
Arrays of rotated 3D points.
- upper_site_h: float¶
Horizontal distance between top binding sites (units bead spacing).
- upper_site_v: float¶
Vertical distance of top binding sites from hinge (units of bead spacing).
- use_toroidal_hinge: bool¶
Whether to use the toroidal hinge or the normal hinge. The toroidal hinge is used for tethered obstacle bypass.
- class smc_lammps.generate.structures.smc.smc_creator.SMC_Pos(r_arm_dl: ndarray[tuple[Any, ...], dtype[float32]], r_arm_ul: ndarray[tuple[Any, ...], dtype[float32]], r_arm_ur: ndarray[tuple[Any, ...], dtype[float32]], r_arm_dr: ndarray[tuple[Any, ...], dtype[float32]], r_ATP: ndarray[tuple[Any, ...], dtype[float32]], r_kleisin: ndarray[tuple[Any, ...], dtype[float32]], r_upper_site: ndarray[tuple[Any, ...], dtype[float32]], r_middle_site: ndarray[tuple[Any, ...], dtype[float32]], r_lower_site: ndarray[tuple[Any, ...], dtype[float32]], r_hinge: ndarray[tuple[Any, ...], dtype[float32]], r_side_site: ndarray[tuple[Any, ...], dtype[float32]])¶
Bases:
objectStores all the positions of the beads of an SMC.
Note
Unused segments are stored as empty arrays.
- __init__(r_arm_dl: ndarray[tuple[Any, ...], dtype[float32]], r_arm_ul: ndarray[tuple[Any, ...], dtype[float32]], r_arm_ur: ndarray[tuple[Any, ...], dtype[float32]], r_arm_dr: ndarray[tuple[Any, ...], dtype[float32]], r_ATP: ndarray[tuple[Any, ...], dtype[float32]], r_kleisin: ndarray[tuple[Any, ...], dtype[float32]], r_upper_site: ndarray[tuple[Any, ...], dtype[float32]], r_middle_site: ndarray[tuple[Any, ...], dtype[float32]], r_lower_site: ndarray[tuple[Any, ...], dtype[float32]], r_hinge: ndarray[tuple[Any, ...], dtype[float32]], r_side_site: ndarray[tuple[Any, ...], dtype[float32]]) None¶
- apply(func) None¶
Update the object inplace by applying a function to every field
- iter() list[Any]¶
Returns a list of all fields
- map(func) list[Any]¶
Apply a function to every field and return the resulting list
- r_ATP: ndarray[tuple[Any, ...], dtype[float32]]¶
ATP bridge.
- r_arm_dl: ndarray[tuple[Any, ...], dtype[float32]]¶
Lower left arm.
- r_arm_dr: ndarray[tuple[Any, ...], dtype[float32]]¶
Lower left arm.
- r_arm_ul: ndarray[tuple[Any, ...], dtype[float32]]¶
Upper right arm.
- r_arm_ur: ndarray[tuple[Any, ...], dtype[float32]]¶
Lower right arm.
- r_hinge: ndarray[tuple[Any, ...], dtype[float32]]¶
TODO
- r_kleisin: ndarray[tuple[Any, ...], dtype[float32]]¶
Kleisin ring.
- r_lower_site: ndarray[tuple[Any, ...], dtype[float32]]¶
TODO
- r_middle_site: ndarray[tuple[Any, ...], dtype[float32]]¶
TODO
- r_side_site: ndarray[tuple[Any, ...], dtype[float32]]¶
TODO
- r_upper_site: ndarray[tuple[Any, ...], dtype[float32]]¶
TODO