smc_lammps.generate.structures package

Subpackages

Submodules

smc_lammps.generate.structures.polymer module

class smc_lammps.generate.structures.polymer.Polymer(*atom_groups: AtomGroup)

Bases: object

One connected polymer / strand, comprised of any number of atom groups

__init__(*atom_groups: AtomGroup) None
add(*atom_groups: AtomGroup) None
add_tagged_atom_groups(polymer_atom: tuple[AtomGroup, int], *atom_groups: AtomGroup) None
add_tagged_atoms(polymer_atom: tuple[AtomGroup, int], *atom_ids: tuple[AtomGroup, int]) None
all_indices_list() list[tuple[tuple[AtomGroup, int], tuple[AtomGroup, int]]]
convert_ratio(ratio: float) int
first_id() tuple[AtomGroup, int]
full_list() ndarray[tuple[Any, ...], dtype[float32]]
full_list_length() int
get_absolute_index(atom_id: tuple[AtomGroup, int]) int
get_id_from_list_index(index: int) tuple[AtomGroup, int]
get_percent_id(ratio: float) tuple[AtomGroup, int]
handle_negative_index(index: int) int
indices_list_from_to(from_index: int, to_index: int) list[tuple[tuple[AtomGroup, int], tuple[AtomGroup, int]]]
indices_list_from_to_percent(from_ratio: float, to_ratio: float) list[tuple[tuple[AtomGroup, int], tuple[AtomGroup, int]]]
indices_list_to(index: int) list[tuple[tuple[AtomGroup, int], tuple[AtomGroup, int]]]
indices_list_to_percent(ratio: float) list[tuple[tuple[AtomGroup, int], tuple[AtomGroup, int]]]
last_id() tuple[AtomGroup, int]
move(shift: ndarray[tuple[Any, ...], dtype[float32]], rng: tuple[int, int]) Polymer
split(split: tuple[AtomGroup, int]) tuple[AtomGroup, AtomGroup]

split the polymer in two pieces, with the split atom id part of the second group. Note: this simply changes the underlying atom groups

smc_lammps.generate.structures.structure_creator module

smc_lammps.generate.structures.structure_creator.attach(reference_segment: ndarray[tuple[Any, ...], dtype[float32]], other_segment: ndarray[tuple[Any, ...], dtype[float32]], delete_overlap: bool, extra_distance: float = 0.0) ndarray[tuple[Any, ...], dtype[float32]]

attaches the other_segment by moving its beginning to the end of the reference_segment

smc_lammps.generate.structures.structure_creator.attach_chain(reference_segment: ndarray[tuple[Any, ...], dtype[float32]], list_of_args) list[ndarray[tuple[Any, ...], dtype[float32]]]

returns a list of the updated segments

smc_lammps.generate.structures.structure_creator.get_circle_segment(n: int, end_inclusive: bool, theta_start: float = 0, theta_end: float = 6.283185307179586, normal_direction=(0, 0, 1)) ndarray[tuple[Any, ...], dtype[float32]]

returns a segment of a circle of n beads with unit spacing centered at the origin within the plane perpendical to the given normal_direction (in the x-y plane by default)

smc_lammps.generate.structures.structure_creator.get_circle_segment_unit_radius(n: int, end_inclusive: bool, theta_start: float = 0, theta_end: float = 6.283185307179586, normal_direction=(0, 0, 1)) ndarray[tuple[Any, ...], dtype[float32]]
smc_lammps.generate.structures.structure_creator.get_interpolated(spacing: float, values) ndarray[tuple[Any, ...], dtype[float32]]

spacing: distance between points along curve values: list of 3d points to use in the interpolation returns n equidistant points on an interpolated curve

smc_lammps.generate.structures.structure_creator.get_straight_segment(n: int, direction=(1, 0, 0)) ndarray[tuple[Any, ...], dtype[float32]]

returns a straight segment of n beads with unit spacing starting at the origin and going the in provided direction (positive x-axis by default)