diff --git a/docs/qcschema.md b/docs/qcschema.md index 098d860..b3998be 100644 --- a/docs/qcschema.md +++ b/docs/qcschema.md @@ -2,27 +2,29 @@ ::: qcmanybody.models.BsseEnum + options: + show_root_heading: true ::: qcmanybody.models.ManyBodyKeywords options: show_root_heading: true -$pydantic: qcmanybody.models.manybody_pydv1.ManyBodyKeywords +$pydantic: qcmanybody.models.manybody_input_pydv1.ManyBodyKeywords -::: qcmanybody.models.manybody_pydv1.ManyBodySpecification +::: qcmanybody.models.ManyBodySpecification options: show_root_heading: true -$pydantic: qcmanybody.models.manybody_pydv1.ManyBodySpecification +$pydantic: qcmanybody.models.manybody_input_pydv1.ManyBodySpecification ::: qcmanybody.models.ManyBodyInput options: show_root_heading: true -$pydantic: qcmanybody.models.manybody_pydv1.ManyBodyInput +$pydantic: qcmanybody.models.manybody_input_pydv1.ManyBodyInput @@ -31,16 +33,27 @@ $pydantic: qcmanybody.models.manybody_pydv1.ManyBodyInput ::: qcmanybody.models.manybody_pydv1.ManyBodyProtocolEnum -::: qcmanybody.models.manybody_pydv1.ManyBodyProtocols +::: qcmanybody.models.manybody_input_pydv1.ManyBodyProtocols options: show_root_heading: true -$pydantic: qcmanybody.models.manybody_pydv1.ManyBodyProtocols +$pydantic: qcmanybody.models.manybody_input_pydv1.ManyBodyProtocols --> +!!! note + + The properties model is generated dynamically based on a constant + ``MAX_NBODY``. To not overload the docs table, this is set to 5, which + covers full calculations on tetramers. To use a larger + ``ManyBodyKeywords.max_nbody``, reset this value. + + import qcmanybody as qcmb + qcmb.models.MAX_NBODY = 8 + + ::: qcmanybody.models.ManyBodyResultProperties options: show_root_heading: true @@ -90,7 +103,3 @@ SuccessfulResultBase - copy --> -::: qcmanybody.resize_gradient - options: - show_root_heading: true - diff --git a/mkdocs.yml b/mkdocs.yml index f6543bf..5027688 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -61,6 +61,9 @@ plugins: markdown_extensions: - mdantic_v1 + - admonition + - pymdownx.details + - pymdownx.superfences nav: - Home: index.md diff --git a/qcmanybody/models/__init__.py b/qcmanybody/models/__init__.py index b266573..98ae4b7 100644 --- a/qcmanybody/models/__init__.py +++ b/qcmanybody/models/__init__.py @@ -4,6 +4,7 @@ FragBasIndex, ManyBodyInput, ManyBodyKeywords, + ManyBodySpecification, ) from .manybody_output_pydv1 import ( ManyBodyResult, diff --git a/qcmanybody/qcng_computer.py b/qcmanybody/qcng_computer.py index cef6311..4bde73d 100644 --- a/qcmanybody/qcng_computer.py +++ b/qcmanybody/qcng_computer.py @@ -534,34 +534,7 @@ def get_results(self, external_results: Dict, client: Optional["qcportal.Fractal pp.pprint(qcvars) for qcv, val in qcvars.items(): - if isinstance(val, dict): - if qcv in [ -# #"energies", # retired -# #"ptype", # retired -# "intermediates", -# "intermediates_energy", #"intermediates2", -# "intermediates_gradient", #"intermediates_ptype", -# "intermediates_hessian", #"intermediates_ptype", -# "energy_body_dict", -# "gradient_body_dict", # ptype_body_dict -# "hessian_body_dict", # ptype_body_dict -# "nbody", -# "cp_energy_body_dict", -# "nocp_energy_body_dict", -# "vmfc_energy_body_dict", -# "cp_gradient_body_dict", -# "nocp_gradient_body_dict", -# "vmfc_gradient_body_dict", -# "cp_hessian_body_dict", -# "nocp_hessian_body_dict", -# "vmfc_hessian_body_dict", - ]: - for qcv2, val2 in val.items(): -# try: - qcvars[str(qcv2)] = val2 -# except ValidationError: -# obj.set_variable(f"{self.driver.name} {qcv2}", val2) - else: + if not isinstance(val, dict): qcvars[qcv] = val # v2: component_results = self.model_dump()['task_list'] # TODO when/where include the indiv outputs @@ -593,23 +566,6 @@ def get_results(self, external_results: Dict, client: Optional["qcportal.Fractal return nbody_model - - - -def lab_delabeler(item: str, return_obj: bool = False) -> Union[Tuple[str, str, str], Tuple[int, Tuple[int], Tuple[int]]]: - """Transform labels like string "1_((2,), (1, 2))" into string tuple ("1", "2", "1, 2") or - object tuple (1, (2,), (1, 2)). - - """ - mc, _, fragbas = item.partition("_") - frag, bas = literal_eval(fragbas) - - if return_obj: - return int(mc), frag, bas - else: - return mc, ", ".join(map(str, frag)), ", ".join(map(str, bas)) - - qcvars_to_manybodyproperties = {} # v2: for skprop in ManyBodyResultProperties.model_fields.keys(): for skprop in ManyBodyResultProperties.__fields__.keys():