SimuBox.calculator.topo module

class SimuBox.calculator.topo.Joint(_id: int, new: bool = False)

基类:object

add(other_joint: Joint | Sequence[Joint]) None
attach_by_id(_id: int, other_id: int)
property joint_num
search_by_count_id(count_id: int)
stats_connection(verbose: bool = True)
class SimuBox.calculator.topo.TopoCreater(verbose: bool = True)

基类:DiGraph

AmBn(blocks: str | List[str] | Dict, fractions: Sequence[int | float | Symbol] | None = None, ignore: bool = False, **kwargs)
ODT(fs: List[float] | ndarray = array([0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9]), symbol: Symbol = fA, plot: bool = True, interactive: bool = True, xlabel: str = '$f_{A}$', ylabel: str = '$\\chi N$', save: Path | str | bool | None = False, **kwargs)
参数:
  • fs

  • symbol

  • plot

  • interactive

  • xlabel

  • ylabel

  • save

  • kwargs

返回:

RPA(latex: bool = False)
classmethod S(f1, fdis, f2, x=x)
classmethod S_self(f, x=x)
add_di_edge(pairs: Tuple[int, int], fraction: int | float | Symbol, name: str, **kwargs)
static count_nums(layers: int, branch: int)
dendrimer(A_block_layer: int = 1, B_block_layer: int = 1, A_branch: int = 2, B_branch: int = 2, fractions: Sequence[int | float | Symbol] | None = None, **kwargs)
fromJson(path: Path | str | Mapping, **kwargs)
get_info()
classmethod h(f, x=x)

Debye function :param f: volume fraction between two points :param x: q^2 imes R^2 :return:

init_nodes(node_nums: int, node_names: list[str] = None)
linear(blocks: List[str] | str | Dict, fractions: Sequence[int | float | Symbol] | None = None, ignore: bool = False, **kwargs)
nodes_dis(start: int, end: int)
classmethod parseJson(path: Path | str | Mapping) ndarray
print(s: Any)
show_topo(colors: Sequence[str] | None = None, node_size: int = 200, node_color: str = 'gray', weight: Literal['weight', None] = None, pos: dict | None = None, figsize: Sequence[int] = (6, 6), interactive: bool = True, curve: bool = False, rad: float = 0.4, show_nodes: bool = True, show_edge_labels: bool = True, show_node_labels: bool = True, save: Path | str | bool | None = False, **kwargs)
star(blocks: str | List[str], fractions: Sequence[int | float | Symbol] | None = None, arm: int = 5, head: bool = True, ignore: bool = False, **kwargs)
static stats(blocks: str | list | dict, multiplier: int = 1)
>>> tp = TopoCreater()
>>> print(tp.stats({'A':3, 'a':5}))
Counter({'A': 8})