.. _examples: *************** Examples *************** In the chilli_py/chilli_py/tests directory you can find various tests. .. _installing-docdir: Bash examples ============= You can check the basic functionality of chilli using the following command. .. code-block:: bash :caption: Check chilli.py [chilli_py] :name: check-chilli-py cd chilli_py/chilli_py/tests/ python3 -m pytest tests.py Python examples =============== A simple test calculation can be performed with the following example. .. code-block:: python :caption: simple_run_example.py :name: simple-run-example-py from chilli_py.simple_run import run run("H2O","RKS") A basic example using H2O and RHF may look like the following script. .. code-block:: python :caption: basic_example.py :name: basix-example-py from chilli_py.atoms import atoms_from_xyz from chilli_py.RHF import RHF from chilli_py import __path__ as pkg_path def basic_example(): """ basic_example Run chilli_py calculation. """ print('RHF, chilli_py') f_xyz = pkg_path[0]+"/structs"+"/H2O.xyz" atoms = atoms_from_xyz(f_xyz) rhf = RHF(atoms, basis_name="sto-3g", use_avg=True, maxiter=300, Etol=1e-6) rhf.kernel() return rhf.Etot if __name__ == "__main__": basic_example()