polymerist
A unified set of tools for setting up general organic polymer systems for molecular dynamics
Submodules
Functions
|
Generates a printable string which summarizes a Python packages hierarchy. Reminiscent of GNU tree output |
|
Generate a printable string of the first N rows of Pascal's triangle |
Package Contents
- polymerist.module_hierarchy(module: types.ModuleType, recursive: bool = True, blacklist: Container[str] | None = None, style: str | anytree.render.AbstractStyle = ContStyle()) str[source]
Generates a printable string which summarizes a Python packages hierarchy. Reminiscent of GNU tree output
- Parameters:
module (ModuleType) – The “root” module to begin importing from Represented in the Node object returned by this function
recursive (bool, default=True) – Whether or not to recursively import modules from subpackages and add them to the tree
blacklist (Container[str] (optional)) – List of module names to exclude from tree building If provided, will exclude any modules whose names occur in this list
style (str or AbstractStyle) – An element drawing style for the final tree structure printout
- Returns:
module_summary – Printable string which displays the package structure
- Return type:
str
- polymerist.pascal(N: int) str[source]
Generate a printable string of the first N rows of Pascal’s triangle
- Parameters:
N (int) – Number of rows to print
- Returns:
pascal_string – A string consisting of each row of Pascal’s triangle, center-justified and separated by newline characters
- Return type:
str