besmarts.core.topology module

besmarts.core.topology

Topology in BESMARTS describe the structure of a graph, and are a necessary component of structure graphs.

besmarts.core.topology.angle_topology() structure_topology[source]

Return a topology that describes an angle

Return type:

structure_topology

besmarts.core.topology.atom_topology() structure_topology[source]

Return a topology that describes an atom

Return type:

structure_topology

besmarts.core.topology.bond_topology() structure_topology[source]

Return a topology that describes a bond

Return type:

structure_topology

besmarts.core.topology.chain_topology(n: int) structure_topology[source]

Return a topology that describes an arbitrary linear sequence of atoms.

Parameters:

n (int) – The length of the chain

Return type:

structure_topology

besmarts.core.topology.index_of(topo: structure_topology)[source]
besmarts.core.topology.n_body_topology(n: int) structure_topology[source]

Return a topology that describes n nonbonded atoms

Parameters:

n (int) – The number of bodies

Return type:

structure_topology

besmarts.core.topology.null_topology() structure_topology[source]

Return a topology that describes a null/undefined topology. This is used when the data/structures describe don’t have a well defined graph topology, such as entire molecules where the permutations aren’t known.

Return type:

structure_topology

besmarts.core.topology.outofplane_topology() structure_topology[source]

Return a topology that describes an out-of-plane dihedral

Return type:

structure_topology

besmarts.core.topology.pair_topology() structure_topology[source]

Return a topology that describes a pair, or a set of atoms that may not be bonded

Return type:

structure_topology

besmarts.core.topology.ring_topology(n: int) structure_topology[source]

Return a topology that describes a ring of atoms of arbitrary length.

Parameters:

n (int) – The length of the ring

Return type:

structure_topology

class besmarts.core.topology.structure_topology(primary: Sequence[int], connect: Sequence[Tuple[int, int]], permutations: Sequence[Sequence[int]])[source]

Bases: object

The structure topology describes several properties of a graph that allow it to be a structure. The data in a structure is agnostic to the graph and uses relative indexing of the nodes. All graphs that have the same structure, such as angles, use the same topology.

connect
permutations
primary
besmarts.core.topology.torsion_topology() structure_topology[source]

Return a topology that describes a torsion dihedral

Return type:

structure_topology

class besmarts.core.topology.transcode_topology(A: structure_topology, B: structure_topology, transcode)[source]

Bases: object

A pair of topologies that defines a transformation from A to B

A: structure_topology
B: structure_topology
transcode: Dict[Sequence[Sequence[int]], Sequence[Sequence[int]]]