pressomancy.object_classes package¶
Submodules¶
pressomancy.object_classes.crowder_class module¶
- class pressomancy.object_classes.crowder_class.Crowder(*args, **kwargs)[source]¶
Bases:
GenericPartClass that contains quadriplex relevant paramaters and methods. At construction one must pass an espresso handle becaouse the class manages parameters that are both internal and external to espresso. It is assumed that in any simulation instanse there will be only one type of a Quadriplex. Therefore many relevant parameters are class specific, not instance specific.
- config = {'alias': None, 'associated_objects': None, 'espresso_handle': None, 'espresso_part_kwargs': {}, 'n_parts': 1, 'sigma': 1, 'size': 1}¶
- numInstances = 0¶
- part_types = {'crowder': 5, 'real': 1, 'virt': 2}¶
- required_features = []¶
- set_object(pos, ori)[source]¶
Sets a n_parts sequence of particles in espresso, asserting that the dimensionality of the pos paramater passed is commesurate with n_part.Using a generator object with the particle enumeration logic, and a try catch paradigm. Particles created here are treated as real, non_magnetic, with enabled rotations. Indices of added particles stored in self.realz_indices.append attribute. Orientation of filament stored in self.orientor = self.get_orientation_vec()
- Parameters:
pos – np.array() | float, list of positions
- Returns:
None
- simulation_type = {'crowder': 5}¶
pressomancy.object_classes.filament_class module¶
- class pressomancy.object_classes.filament_class.Filament(*args, **kwargs)[source]¶
Bases:
objectClass that contains filament relevant paramaters and methods. At construction one must pass an espresso handle becaouse the class manages parameters that are both internal and external to espresso. It is assumed that in any simulation instanse there will be only one type of a Filament. Therefore many relevant parameters are class specific, not instance specific.
- add_anchors(type_name)[source]¶
Adds virtual particles at top and bottom of a particle with size sigma, as determined by the orientation vector calculated by the get_orientation_vec(). Logic firstly adds front anchors and then back anchors, so there is a consistent logic to track ids. Indices of particles added here are stored in self.fronts_indices/self.backs_indices attributes respectively.
- None:
- add_dipole_to_embedded_virt(type_name, dip_magnitude=1.0)[source]¶
Adds virtual particles to the center of each particle whose index is stored in self.realz_indices. It is critical that said virtuals do not have a director and have disabled rotation!
- Parameters:
dip_magnitude – float | magnitude of the dipole moment to be asigned using the part.director unit vector. Default=1.
- Returns:
None
- add_dipole_to_type(type_name, dip_magnitude=1.0)[source]¶
Adds dipoles to real particles.
- Parameters:
dip_magnitude – float | magnitude of the dipole moment to be asigned using the part.director unit vector. Default=1.
- Returns:
None
- bond_nearest_part(type_name)[source]¶
Docstring for bond_nearest_part
- Parameters:
self – Description
bond_handle – Description
type_name – Description
- bond_overlapping_virtualz(crit=0.0)[source]¶
Adds FENE bonds between virtuals that fulfill the crit distance criterion. In general, it is assumed that there are virtual anchors placed using the add_anchors() method, and that between two real parts one can always found a pair of either overlapping virts or at a distance corresponding to the FENE_r0 parameter (crit param can be arbitrary but should be realated to the aforementioned params). Relies on np.isclose().
- Returns:
None
- bond_quadriplexes(mode='hinge')[source]¶
associated_objects contains monomer objects (assume quadriplex). We add cormer particles in each quadriplex pair to a pool of candidate corners: candidate1 and candidate2. Finaly checks which corner pairs have a distance self.params[‘sigma’]-2*fene_r0. Relies on np.isclose(). :return: None
- config = {'associated_objects': None, 'bond_handle': BondWrapper(<FeneBond({'r_0': 0, 'k': 0, 'd_r_max': 0})>), 'espresso_handle': None, 'n_parts': 1, 'sigma': 1, 'size': 1, 'spacing': None}¶
- numInstances = 0¶
- part_types = {'real': 1, 'virt': 2}¶
- required_features = []¶
- set_object(pos, ori)[source]¶
Sets a n_parts sequence of particles in espresso, asserting that the dimensionality of the pos paramater passed is commesurate with n_part.Using a generator object with the particle enumeration logic, and a try catch paradigm. Particles created here are treated as real, non_magnetic, with enabled rotations. Indices of added particles stored in self.realz_indices.append attribute. Orientation of filament stored in self.orientor = self.get_orientation_vec()
- Parameters:
pos – np.array() | float, list of positions
- Returns:
None
- simulation_type = {'filament': 54}¶
pressomancy.object_classes.part_class module¶
- class pressomancy.object_classes.part_class.GenericPart(*args, **kwargs)[source]¶
Bases:
objectClass that contains quadriplex relevant paramaters and methods. At construction one must pass an espresso handle becaouse the class manages parameters that are both internal and external to espresso. It is assumed that in any simulation instanse there will be only one type of a Quadriplex. Therefore many relevant parameters are class specific, not instance specific.
- config = {'alias': None, 'associated_objects': None, 'espresso_handle': None, 'espresso_part_kwargs': {}, 'n_parts': 1, 'sigma': 1, 'size': 1}¶
- numInstances = 0¶
- part_types = {'real': 1, 'virt': 2}¶
- required_features = []¶
- set_object(pos, ori)[source]¶
Sets a n_parts sequence of particles in espresso, asserting that the dimensionality of the pos paramater passed is commesurate with n_part.Using a generator object with the particle enumeration logic, and a try catch paradigm. Particles created here are treated as real, non_magnetic, with enabled rotations. Indices of added particles stored in self.realz_indices.append attribute. Orientation of filament stored in self.orientor = self.get_orientation_vec()
- Parameters:
pos – np.array() | float, list of positions
- Returns:
None
- simulation_type = {'generic_particle': 42}¶
pressomancy.object_classes.object_class module¶
- class pressomancy.object_classes.object_class.ObjectConfigParams(**kwargs)[source]¶
Bases:
dictConfiguration parameters for simulation objects.
The ObjectConfigParams class extends the dictionary to provide a structured way to manage configuration parameters for simulation objects. It includes validation and merging with class-level configurations.
- common_keys¶
Common configuration keys with default values.
- Type:
dict
- validate_and_join(class_config):
Validates the current configuration against the class-level configuration and updates the instance with missing values from the class configuration.
- common_keys = {'associated_objects': None, 'espresso_handle': None, 'n_parts': 1, 'sigma': 1, 'size': 1}¶
- specify(**overrides)[source]¶
Create a new instance configuration based on the class-level configuration, with specified overrides applied.
- Parameters:
overrides (dict) – Key-value pairs to override in the configuration.
- Returns:
A new ObjectConfigParams instance with the specified overrides.
- Return type:
- class pressomancy.object_classes.object_class.Simulation_Object(name, bases, class_dict)[source]¶
Bases:
typeMetaclass for simulation objects, providing attribute enforcement and shared methods.
The Simulation_Object metaclass ensures that all simulation object subclasses adhere to a defined structure by enforcing required attributes at both the class and instance levels. It also provides common methods for particle management and system interaction.
Key Features¶
Attribute enforcement: Ensures subclasses define required attributes with the correct types.
Default behavior: Assigns shared methods and default behaviors to instances.
Polymorphism: Facilitates seamless integration of different object classes into the simulation framework.
Object identification: Implements equality and hashing based on unique instance attributes.
Class-Level Required Attributes¶
- required_featureslist
List of required features for the simulation object.
- numInstancesint
Tracks the number of instances of the class.
- part_typesPartDictSafe
Dictionary-like object mapping particle types to their identifiers.
- simulation_typeSinglePairDict
A single key-value pair representing the type of simulation object.
Instance-Level Required Attributes¶
- who_am_iint
Unique identifier for the instance.
- type_part_dictPartDictSafe
Tracks particle handles grouped by type.
- associated_objectslist
List of related simulation objects, if any.
- __init__(cls, name, bases, class_dict):
Enforces required class-level attributes during class creation.
- __call__(cls, \*args, \*\*kwargs):
Creates a new instance and assigns default methods and attributes.
- set_object(self, \*args, \*\*kwargs):
Abstract method for setting up simulation objects. Must be implemented by subclasses.
- delete_owned_parts(self):
Deletes all particles owned by the object, including those in associated objects.
- add_particle(self, type_name, pos, \*\*kwargs):
Adds a particle to the simulation box, ensuring it adheres to the object’s declared particle types.
- change_part_type(self, particle, new_type_name):
Changes the type of an existing particle, updating all relevant tracking structures.
- _eq(self, other):
Compares two instances for equality based on their who_am_i attribute.
- _hash(self):
Generates a unique hash for the instance based on its class and who_am_i attribute.
- _cusiter(self):
Returns an iterator for the object, enabling it to be used in loops.
Notes
This metaclass assumes a manager class (sys) is available for interacting with the simulation.
Subclasses must implement the set_object method to define their specific setup behavior.
- add_particle(type_name, pos, **kwargs)[source]¶
Adds a particle to the simulation box.
Ensures the particle type is declared in part_types and updates tracking structures.
- Parameters:
type_name (str) – Name of the particle type.
pos (iterable of shape (3,)) – Position of the particle in the simulation box.
**kwargs (dict) – Additional properties for the particle.
- Returns:
Handle to the added particle.
- Return type:
ParticleHandle
- Raises:
AssertionError – If the particle type is not declared in part_types.
- bond_owned_part_pair(p1, p2, bond_handle=None)[source]¶
Bonds the particle pair (p1,p2).
Adds the bond to the system if not already present.
- Parameters:
p1 (espressomd.particle.ParticleHandle) – The partner particle to bond with.
p2 (espressomd.particle.ParticleHandle) – The partner particle to bond with.
- change_part_type(particle, new_type_name)[source]¶
Changes the type of an existing particle.
Updates type_part_dict and modifies the particle’s type in the simulation.
- Parameters:
particle (ParticleHandle) – Handle to the particle being modified.
new_type_name (str) – Name of the new particle type.
- Raises:
AssertionError – If the new type is not declared in part_types.
- delete_owned_parts()[source]¶
Deletes all particles owned by the object and any associated objects.
Iterates through type_part_dict to remove particles from the simulation. If associated_objects is defined, recursively deletes their owned particles.
- pressomancy.object_classes.object_class.generic_modify_system_attribute(self, clas_self, attribute_name, action)[source]¶
- pressomancy.object_classes.object_class.generic_type_exception(name, attribute_name, expected_type)¶
- pressomancy.object_classes.object_class.generic_type_exception_inst(name, attribute_name, expected_type)¶
pressomancy.object_classes.otp_molecule_class module¶
- class pressomancy.object_classes.otp_molecule_class.OTP(*args, **kwargs)[source]¶
Bases:
objectClass that contains OTP relevant paramaters and methods. At construction one must pass an espresso handle becaouse the class manages parameters that are both internal and external to espresso. It is assumed that in any simulation instanse there will be only one type of a OTP. Therefore many relevant parameters are class specific, not instance specific.
- config = {'associated_objects': None, 'espresso_handle': None, 'long_side': 0.7191944807239401, 'n_parts': 3, 'rig_bond_long': BondWrapper(<RigidBond({'ptol': 1e-12, 'vtol': 1e-12, 'r': 0.7191944807239401})>), 'rig_bond_short': BondWrapper(<RigidBond({'ptol': 1e-12, 'vtol': 1e-12, 'r': 0.483})>), 'sigma': 0.483, 'size': 1}¶
- numInstances = 0¶
- part_types = {'otp': 6}¶
- required_features = []¶
- set_object(pos, ori)[source]¶
Sets a n_parts sequence of particles in espresso, asserting that the dimensionality of the pos paramater passed is commesurate with n_part.Using a generator object with the particle enumeration logic, and a try catch paradigm. When the StopIteration except is caught Filament.last_index_used += Filament.n_parts . Particles created here are treated as real, non_magnetic, with enabled rotations. Indices of added particles stored in self.realz_indices.append attribute. Orientation of filament stored in self.orientor = self.get_orientation_vec()
- Parameters:
pos – np.array() | float, list of positions
- Returns:
None
- simulation_type = {'otp': 6}¶
pressomancy.object_classes.quadriplex_class module¶
- class pressomancy.object_classes.quadriplex_class.Quadriplex(*args, **kwargs)[source]¶
Bases:
objectClass that contains quadriplex relevant paramaters and methods. At construction one must pass an espresso handle becaouse the class manages parameters that are both internal and external to espresso. It is assumed that in any simulation instanse there will be only one type of a Quadriplex. Therefore many relevant parameters are class specific, not instance specific.
- config = {'associated_objects': None, 'bond_handle': BondWrapper(<FeneBond({'r_0': 0, 'k': 0, 'd_r_max': 0})>), 'bonding_mode': 'ftf', 'espresso_handle': None, 'n_parts': 3, 'sigma': 1, 'size': 6.0}¶
- numInstances = 0¶
- part_types = {}¶
- required_features = []¶
- set_object(pos, ori)[source]¶
Sets a n_parts sequence of particles in espresso, asserting that the dimensionality of the pos paramater passed is commesurate with n_part.Using a generator object with the particle enumeration logic, and a try catch paradigm. Particles created here are treated as real, non_magnetic, with enabled rotations. Indices of added particles stored in self.realz_indices.append attribute. Orientation of filament stored in self.orientor = self.get_orientation_vec()
- Parameters:
pos – np.array() | float, list of positions
- Returns:
None
- simulation_type = {'quadriplex': 22}¶
- class pressomancy.object_classes.quadriplex_class.Quartet(*args, **kwargs)[source]¶
Bases:
GenericRigidObjClass that contains quartet relevant paramaters and methods. At construction one must pass an espresso handle becaouse the class manages parameters that are both internal and external to espresso. It is assumed that in any simulation instanse there will be only one type of a Quartet. Therefore many relevant parameters are class specific, not instance specific.
- config = {'alias': 'quartet', 'associated_objects': None, 'bond_handle': BondWrapper(<FeneBond({'r_0': 0, 'k': 0, 'd_r_max': 0})>), 'espresso_handle': None, 'n_parts': 25, 'sigma': 1, 'size': 1, 'type': 'solid'}¶
- numInstances = 0¶
- part_types = {'real': 1, 'virt': 2}¶
- set_object(pos, ori, triplet=None)[source]¶
Sets a n_parts sequence of particles in espresso, asserting that the dimensionality of the pos paramater passed is commesurate with n_part. Using a generator object with the particle enumeration logic, and a try catch paradigm. Particles created here are treated as real, non_magnetic, with enabled rotations. Indices of added particles stored in self.realz_indices.append attribute. Orientation of filament stored in self.orientor = self.get_orientation_vec()
- Parameters:
pos – np.array() | float, list of positions
- Returns:
None
pressomancy.object_classes.rigid_obj module¶
- class pressomancy.object_classes.rigid_obj.GenericRigidObj(*args, **kwargs)[source]¶
Bases:
objectGeneral-purpose rigid simulation object with one real center-of-mass (CoM) particle and a rigid arrangement of virtual particles. At construction, the object infers its virtual-particle geometry from a resource file selected by the provided alias. Resource file should
- Parameters:
config (ObjectConfigParams) – Configuration mapping for the object. Required keys include: - ‘alias’ : str
Name used to locate the resource file in
resources/(e.g.'<alias>.txt'). Determines the rigid arrangement of virtual sites. Default value is raspberry_sphere.- ‘espresso_handle’Any
Handle to the Espresso system. Stored as
self.sys.
The value of
config['n_parts']is computed automatically from the reference geometry file and should not be supplied by the caller.
- required_features¶
- Type:
['VIRTUAL_SITES_RELATIVE'].
- numInstances¶
Counter of constructed instances (used to assign
who_am_i).- Type:
int
- simulation_type¶
Object type identifier (name and integer code).
- Type:
- part_types¶
- Type:
PartDictSafe instance containing (‘real’, ‘virt’).
- config¶
Copy of the provided configuration with
n_partspopulated.- Type:
- params¶
Alias for
config.- Type:
- sys¶
The Espresso system handle.
- Type:
Any
- associated_objects¶
External associations passed in via
config.- Type:
Any
- who_am_i¶
Per-instance ordinal ID.
- Type:
int
- type_part_dict¶
Mutable mapping of part-type names to lists of particle handles created by this object.
- Type:
Notes
The alias determines the file
<alias>.txtinsideresources/whose contents (a list of 3D coordinates) define the rigid layout of virtual sites relative to the real CoM particle.Resource File Specification
x, y, z
These triplets define the coordinates of virtual particles relative to the center-of-mass (CoM). For example:
resources/raspberry_sphere.txt:0.6304909963930333, -0.8579033210678375, 1.0629976072588312 0.8402839358356956, -0.40687932624373957, 1.179467479850195 0.08627129444723317, -1.4942773402386536, -0.12392477175892225 ...
The CoM particle itself is not listed in the file: it is always placed automatically at (0, 0, 0) and prepended to the virtual coordinates when the file is loaded. Thus, the total number of particles will be
1 + len(<file>)(1 real + N virtuals).- config = {'alias': 'raspberry_sphere', 'associated_objects': None, 'espresso_handle': None, 'n_parts': None, 'sigma': 1, 'size': 1}¶
- numInstances = 0¶
- part_types = {'real': 1, 'virt': 2}¶
- required_features = ['VIRTUAL_SITES_RELATIVE']¶
- set_object(pos, ori)[source]¶
Instantiate the object’s particles in Espresso.
Creates one real CoM particle and a set of virtual particles placed at the reference coordinates.
- Parameters:
pos (array_like, shape (3,) or broadcastable to (N, 3)) – Translation applied to the reference coordinates to place the rigid object in space. Typically a 3-vector.
ori (array_like, shape (3,)) – Orientation/director vector to assign to the real particle. Virtual orientation is coalligned but should be taken as arbitrary!
- Returns:
The current instance (for chaining).
- Return type:
Notes
The list of created particle handles (by type) is stored in
self.type_part_dict.The first created particle is converted to type ‘real’ and used as the parent for all virtual sites.
- simulation_type = {'generic_rigid_object': 68}¶
pressomancy.object_classes.raspberry_sphere module¶
- class pressomancy.object_classes.raspberry_sphere.RaspberrySphere(*args, **kwargs)[source]¶
Bases:
GenericRigidObjClass that contains relevant paramaters and methods. At construction one must pass an espresso handle becaouse the class manages parameters that are both internal and external to espresso. It is assumed that in any simulation instanse there will be only one type of a Quadriplex. Therefore many relevant parameters are class specific, not instance specific.
- config = {'alias': 'raspberry_sphere', 'associated_objects': None, 'espresso_handle': None, 'n_parts': 1, 'sigma': 1, 'size': 1}¶
- numInstances = 0¶
- part_types = {'real': 1, 'virt': 2}¶
pressomancy.object_classes.stoner_wohlfarth_part module¶
- class pressomancy.object_classes.stoner_wohlfarth_part.SWPart(*args, **kwargs)[source]¶
Bases:
GenericPartClass that contains quadriplex relevant paramaters and methods. At construction one must pass an espresso handle becaouse the class manages parameters that are both internal and external to espresso. It is assumed that in any simulation instanse there will be only one type of a Quadriplex. Therefore many relevant parameters are class specific, not instance specific.
- config = {'HK_inv': 0.175, 'alias': None, 'associated_objects': None, 'dipm': 1.75, 'dt_incr': 1e-10, 'espresso_handle': None, 'espresso_part_kwargs': {}, 'kT_KVm_inv': 5.0, 'n_parts': 1, 'sigma': 1, 'size': 1, 'tau0_inv': 735000000.0, 'tau_trans_inv': 0}¶
- numInstances = 0¶
- part_types = {'real': 1, 'sw_real': 9, 'sw_virt': 10, 'virt': 2}¶
- required_features = ['THERMAL_STONER_WOHLFARTH']¶
- set_object(pos, ori)[source]¶
Sets a n_parts sequence of particles in espresso, asserting that the dimensionality of the pos paramater passed is commesurate with n_part.Using a generator object with the particle enumeration logic, and a try catch paradigm. Particles created here are treated as real, non_magnetic, with enabled rotations. Indices of added particles stored in self.realz_indices.append attribute. Orientation of filament stored in self.orientor = self.get_orientation_vec()
- Parameters:
pos – np.array() | float, list of positions
- Returns:
None
- simulation_type = {'sw_part': 13}¶
pressomancy.object_classes.egg_model_part module¶
- class pressomancy.object_classes.egg_model_part.EGGPart(*args, **kwargs)[source]¶
Bases:
GenericPartClass that contains quadriplex relevant paramaters and methods. At construction one must pass an espresso handle becaouse the class manages parameters that are both internal and external to espresso. It is assumed that in any simulation instanse there will be only one type of a Quadriplex. Therefore many relevant parameters are class specific, not instance specific.
- config = {'alias': None, 'aniso_energy': 1.0, 'associated_objects': None, 'dipm': 1, 'egg_gamma': 1.0, 'espresso_handle': None, 'espresso_part_kwargs': {}, 'n_parts': 1, 'sigma': 1, 'size': 1}¶
- numInstances = 0¶
- part_types = {'real': 1, 'virt': 2, 'yolk': 11}¶
- required_features = ['EGG_MODEL']¶
- set_object(pos, ori)[source]¶
Sets a n_parts sequence of particles in espresso, asserting that the dimensionality of the pos paramater passed is commesurate with n_part.Using a generator object with the particle enumeration logic, and a try catch paradigm. Particles created here are treated as real, non_magnetic, with enabled rotations. Indices of added particles stored in self.realz_indices.append attribute. Orientation of filament stored in self.orientor = self.get_orientation_vec()
- Parameters:
pos – np.array() | float, list of positions
- Returns:
None
- simulation_type = {'egg_part': 74}¶
pressomancy.object_classes.multicore_particle module¶
- class pressomancy.object_classes.multicore_particle.MulticorePart(*args, **kwargs)[source]¶
Bases:
GenericRigidObjClass that contains relevant paramaters and methods. At construction one must pass an espresso handle becaouse the class manages parameters that are both internal and external to espresso. It is assumed that in any simulation instanse there will be only one type of a Quadriplex. Therefore many relevant parameters are class specific, not instance specific.
- add_dipole_moments_to_virtuals(dip_moments, selection='random', anisotropy={'kind': 'infinite', 'params': {}})[source]¶
Assign magnetic dipole moments to selected virtual particles.
- Parameters:
dip_moments (array_like, shape (N, 3)) – Dipole vectors to assign (in simulation units). Each selected virtual particle receives one 3-vector. If more dipole vectors are provided than available virtual particles, the extras are ignored; if fewer are provided, only that many particles are selected.
selection ({‘random’}, optional) – Particle selection strategy. Currently only
'random'is supported: chooseNdistinct virtual particles uniformly at random, whereNis the number of dipole vectors provided. Default is'random'.anisotropy (dict, optional) – Anisotropy model to apply to the selected particles. Must be a dict with keys:
'kind'{‘infinite’, ‘finite_egg’}'infinite'— no extra parameters required; dipoles are
assigned directly to particles. *
'finite_egg'— uses ESPResSo’s Egg model; requires params'egg_gamma'and'aniso_energy'.
'params'dictFor
'finite_egg':{'egg_gamma': float, 'aniso_energy': float}.
Default is
{'kind': 'infinite', 'params': {}}.
- Return type:
None
- Raises:
MissingFeature – If
anisotropy['kind'] == 'finite_egg'but the ESPResSo build lacks theEGG_MODELfeature.AssertionError – If an unsupported anisotropy kind is specified or required Egg-model parameters are missing.
ValueError – If
dip_momentscannot be coerced to a(N, 3)array.
Notes
Operates only on particles of type
'virt'inself.type_part_dict['virt'].Selection uses NumPy’s RNG for shuffling (uniform without replacement).
For the Egg model, selected particles are retyped to a
'yolk'part
type.
- config = {'alias': 'multicore', 'associated_objects': None, 'espresso_handle': None, 'n_parts': 1, 'sigma': 1, 'size': 1}¶
- numInstances = 0¶
- part_types = {'real': 1, 'virt': 2}¶
pressomancy.object_classes.tel_sequence module¶
- class pressomancy.object_classes.tel_sequence.TelSeq(*args, **kwargs)[source]¶
Bases:
objectClass that contains TelSeq relevant paramaters and methods. At construction one must pass an espresso handle becaouse the class manages parameters that are both internal and external to espresso. It is assumed that in any simulation instanse there will be only one type of a TelSeq. Therefore many relevant parameters are class specific, not instance specific.
- config = {'across_bond_handle': BondWrapper(<FeneBond({'r_0': 0, 'k': 0, 'd_r_max': 0})>), 'associated_objects': None, 'bond_handle': BondWrapper(<FeneBond({'r_0': 0, 'k': 0, 'd_r_max': 0})>), 'diag_bond_handle': BondWrapper(<FeneBond({'r_0': 0, 'k': 0, 'd_r_max': 0})>), 'espresso_handle': None, 'n_parts': 1, 'sigma': 1, 'size': 1, 'spacing': None, 'type': 'parallel'}¶
- numInstances = 0¶
- part_types = {'real': 1, 'to_be_magnetized': 3, 'virt': 2}¶
- required_features = []¶
- set_object(pos, ori)[source]¶
Sets a n_parts sequence of particles in espresso, asserting that the dimensionality of the pos paramater passed is commesurate with n_part.Using a generator object with the particle enumeration logic, and a try catch paradigm. Particles created here are treated as real, non_magnetic, with enabled rotations. Indices of added particles stored in self.realz_indices.append attribute. Orientation of TelSeq stored in self.orientor = self.get_orientation_vec()
- Parameters:
pos – np.array() | float, list of positions
- Returns:
None
- simulation_type = {'tel_seq': 37}¶
- wrap_into_Tel()[source]¶
associated_objects contains monomer objects (assume quadriplex). We add cormer particles in each quadriplex pair to a pool of candidate corners: candidate1 and candidate2. Finaly checks which corner pairs have a distance self.params[‘sigma’]-2*fene_r0. Relies on np.isclose(). :return: None