Running DeepMD-Kit with Pharmaforge ==================================== The goal of this tutorial is to demonstrate the use of the `pharmaforge` package in conjunction with `dftb+` and `deepmd-kit` to take a query from the database (see the previous example on database querying. Learning Objectives ------------------- - Learn hopw to use the `pharmaforge` package to run a deep potential on queried configurations from the database. - Learn how to use the dftb+ package to run a DFTB calculation on queried configurations from the database using `pharmaforge`. - Calculate the correction energy using the QDPi1 model. Required Files -------------- - The tutorial python script is located in examples/CalculateMLP - The QDPi1 deepmd-kit model is located at `https://gitlab.com/RutgersLBSR/qdpi`, and should be downloaded into inputs. - DFTB+ should be installed (https://dftbplus.github.io/). - DFTB+ slater-Koster files must be downloaded somewhere. The path to these files should be pointed to within the run_qdpi1.py script. Tutorial -------- First thing, make sure all the required files are in the correct location (See above) and that DFTB+ is installed. Then, set the skf file locations as follows (or putting them into this location): .. literalinclude:: ../../../../examples/CalculateMLP/run_qdpi1.py :language: python :end-at: skf_location= Now, we will first calculate the deep potential energy using the QDPi1 model, which if you recall is a deepmd-kit :math:`\Delta MLP` model. The script to do this is as follows: .. literalinclude:: ../../../../examples/CalculateMLP/run_qdpi1.py :language: python :start-at: Test DeepMdKit :end-before: Test DFTB3 As with the previous examples, you will see the energies and forces printed out. Next, we will calculate the DFTB energy using the dftb+ package. The script to do this is as follows: .. literalinclude:: ../../../../examples/CalculateMLP/run_qdpi1.py :language: python :start-at: Test DFTB3 :end-at: print(energies) Now, for a :math:`\Delta MLP` the higher level potential energy is described by the following .. math:: E_{higher level} = E_{MLP} + E_{DFTB} :label: eq:MLP_DFTB So, we can calcualte the correction energy as follows: .. literalinclude:: ../../../../examples/CalculateMLP/run_qdpi1.py :language: python :start-after: print(energies) Note that these numbers are very similar to the numbers you found during your data_labeling tutorial! Full Code --------- .. literalinclude:: ../../../../examples/CalculateMLP/run_qdpi1.py :language: python