diff --git a/docs/dev/dev.rst b/docs/dev/dev.rst index 14f7662b..ff5e6d1c 100644 --- a/docs/dev/dev.rst +++ b/docs/dev/dev.rst @@ -3,6 +3,6 @@ Developer Guide .. toctree:: - extending contributing - tools \ No newline at end of file + under_the_hood + extending \ No newline at end of file diff --git a/docs/dev/tools.rst b/docs/dev/tools.rst deleted file mode 100644 index 257fc0e2..00000000 --- a/docs/dev/tools.rst +++ /dev/null @@ -1,13 +0,0 @@ -Developer Tools -=============== - -Custom Model Builders ---------------------- -The following decorator should be used for new model builders, e.g. :: - - @nequip.model.model_builder - def my_new_model_builder(arg1, arg2): - return model(arg1, arg2) - - -.. autofunction:: nequip.model.model_builder \ No newline at end of file diff --git a/docs/dev/under_the_hood.rst b/docs/dev/under_the_hood.rst new file mode 100644 index 00000000..0b118a6f --- /dev/null +++ b/docs/dev/under_the_hood.rst @@ -0,0 +1,23 @@ +Under The Hood +############## + +This page explains key aspects of the infrastructure. + +Model Building +============== + + +Model Builder Decorator +----------------------- +The following decorator should be used for new model builders, e.g. :: + + @nequip.model.model_builder + def my_new_model_builder(arg1, arg2): + return model(arg1, arg2) + + +.. autofunction:: nequip.model.model_builder + +Dtypes in Model Building +------------------------ +``model_dtype`` is imposed by using ``torch.set_default_dtype()`` to set the default ``dtype`` to ``model_dtype`` for the duration of model building, such that parameter tensors created during model building will be in the default ``dtype``, which was set to ``model_dtype``. \ No newline at end of file