gen_r_entity_combs#
- mbgdml.mbe.gen_r_entity_combs(r_prov_spec, entity_ids_lower)[source]#
Generate
entity_idcombinations of a specific size for a single structure.r_prov_spec[2:]providesentity_idsof a reference structure. For example, considerr_prov_spec = [0, 0, 34, 5, 2]. This tells us that the structure contains three entities, and theentity_idsof each are34,5, and2in the structure provenance.gen_r_entity_combsgenerates all combinations (without replacement) based on the number of entities inentity_ids_lower. Ifentity_ids_loweris[0, 0, 0, 1, 1, 1](i.e., number of lower-order entities is 2), thengen_r_entity_combsproduces all 3 choose 2 combinations.- Parameters:
r_prov_spec (
numpy.ndarray, ndim:1) – Structure provenance specifications of a single structure.entity_ids_lower (
numpy.ndarray, ndim:1) – A uniquely identifying integer specifying what atoms belong to which entities for lower-order structures. Entities can be a related set of atoms, molecules, or functional group. For example, a water and methanol molecule could be[0, 0, 0, 1, 1, 1, 1, 1, 1].
- Yields:
tuple– Entity combinations of a single structure.