From 2b00680d53e32bd697bc2282a684855a59abd933 Mon Sep 17 00:00:00 2001 From: Qiming Sun Date: Mon, 23 Dec 2024 06:30:28 -0800 Subject: [PATCH] Update mcol example --- examples/dft/14-collinear_gks.py | 17 ----------------- examples/dft/14-non_collinear_gks.py | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 17 deletions(-) delete mode 100644 examples/dft/14-collinear_gks.py create mode 100644 examples/dft/14-non_collinear_gks.py diff --git a/examples/dft/14-collinear_gks.py b/examples/dft/14-collinear_gks.py deleted file mode 100644 index d6926c0476..0000000000 --- a/examples/dft/14-collinear_gks.py +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env python -# -# Author: Qiming Sun -# - -''' -GKS with collinear functional -''' - -from pyscf import gto - -mol = gto.M(atom="H 0 0 0; F 0 0 1", basis='unc-sto3g', verbose=4) -mf = mol.GKS() -mf.xc = 'pbe' -# Enable collinear functional. GKS calls non-collinear functional by default -mf.collinear = 'mcol' -mf.kernel() diff --git a/examples/dft/14-non_collinear_gks.py b/examples/dft/14-non_collinear_gks.py new file mode 100644 index 0000000000..5e25839da5 --- /dev/null +++ b/examples/dft/14-non_collinear_gks.py @@ -0,0 +1,21 @@ +#!/usr/bin/env python +# +# Author: Qiming Sun +# + +''' +GKS with non-collinear functional +''' + +from pyscf import gto + +mol = gto.M(atom="H 0 0 0; F 0 0 1", basis='unc-sto3g', verbose=4) +mf = mol.GKS() +mf.xc = 'pbe' +# Enable non-collinear functional. GKS calls collinear functional by default +# mcol is short for multi-collinear functional. This is one treatment of +# non-collinear method which avoids the singularity issue in functional. +# For more details of multi-collinear method, please see +# Noncollinear density functional theory, Zhichen Pu, et. al., Rev. Research 5, 013036 +mf.collinear = 'mcol' +mf.kernel()