import load_path from mordred import _atomic_property as prop load_path.nop() print(""" .. _atomic_properties: atomic properties ================= """[1:]) for v in prop.getter_list: print(v.short) print(" " * 4 + v.long)
import load_path from mordred import all_descriptors from mordred._base.descriptor import is_descriptor_class from itertools import chain import sys load_path.nop() class Generator(object): def __init__(self, mdl): self.mdl = mdl def header(self): h = self.mdl.__name__ + ' module' yield h yield '=' * len(h) yield '' def descriptor(self, desc): excludes = set([ 'as_argument', 'calculate', 'coord', 'dependencies', 'fail', 'is_descriptor_class', 'mol', 'parameters', 'preset', 'rethrow_na', 'rethrow_zerodiv' ]) docs = [m for m in dir(desc) if m[:1] != '_' if m not in excludes] yield '.. autoclass:: {}.{}'.format(self.mdl.__name__, desc.__name__) yield ' :members: {}'.format(', '.join(docs)) yield ' :undoc-members:' yield ' :show-inheritance:'