mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-21 11:03:29 +01:00
Added qp_basis
This commit is contained in:
parent
ad8adda841
commit
4572aa1661
54
bin/qp_basis
Executable file
54
bin/qp_basis
Executable file
@ -0,0 +1,54 @@
|
|||||||
|
#!/usr/bin/env python2
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
"""
|
||||||
|
Installs basis sets in the data directory from Basis Set Exchange.
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
qp_basis list
|
||||||
|
qp_basis get BSE_BASIS
|
||||||
|
qp_basis install BSE_BASIS QP_BASIS
|
||||||
|
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
from __future__ import print_function
|
||||||
|
import sys
|
||||||
|
import os
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
try:
|
||||||
|
from docopt import docopt
|
||||||
|
from qp_path import QP_ROOT
|
||||||
|
except ImportError:
|
||||||
|
print("Please check if you have sourced the ${QP_ROOT}/quantum_package.rc")
|
||||||
|
print("(`source ${QP_ROOT}/quantum_package.rc`)")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
|
def main(arguments):
|
||||||
|
"""Main function"""
|
||||||
|
|
||||||
|
if arguments["list"]:
|
||||||
|
os.system("bse list-basis-sets")
|
||||||
|
|
||||||
|
elif arguments["install"]:
|
||||||
|
bse_basis = arguments["BSE_BASIS"]
|
||||||
|
qp_basis = arguments["QP_BASIS"]
|
||||||
|
for character in """"[]{}()*&%$#!;:,<>?'|\\""":
|
||||||
|
if character in qp_basis:
|
||||||
|
print("Invalid character %s in QP_BASIS"%character)
|
||||||
|
sys.exit(1)
|
||||||
|
path = QP_ROOT+"/data/basis/"+qp_basis
|
||||||
|
os.system("bse get-basis --unc-spdf '%s' gamess_us > %s"%(bse_basis, path))
|
||||||
|
|
||||||
|
elif arguments["get"]:
|
||||||
|
bse_basis = arguments["BSE_BASIS"]
|
||||||
|
os.system("bse get-basis --unc-spdf '%s' gamess_us"%(bse_basis))
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
ARGS = docopt(__doc__)
|
||||||
|
main(ARGS)
|
||||||
|
|
||||||
|
|
8
configure
vendored
8
configure
vendored
@ -507,14 +507,8 @@ echo "If you have PIP, you can install the Basis Sex Exchange command-line tool:
|
|||||||
echo ""
|
echo ""
|
||||||
echo " ./configure -i bse"
|
echo " ./configure -i bse"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Format is GAMESS/US, and combined sp, spd, ... contractions should be removed."
|
echo "This will enable the usage of qp_basis to install extra basis sets."
|
||||||
echo "For example:"
|
|
||||||
echo ""
|
echo ""
|
||||||
echo " bse get-basis --unc-spdf STO-3G gamess_us > sto-3g"
|
|
||||||
echo ""
|
|
||||||
echo "For help, run"
|
|
||||||
echo ""
|
|
||||||
echo " bse -h"
|
|
||||||
echo ""
|
echo ""
|
||||||
printf "\e[m\n"
|
printf "\e[m\n"
|
||||||
|
|
||||||
|
@ -34,9 +34,6 @@ Usage
|
|||||||
By default, the basis set is obtained from the local database of the.
|
By default, the basis set is obtained from the local database of the.
|
||||||
|qp| This option is mandatory .
|
|qp| This option is mandatory .
|
||||||
|
|
||||||
If ``<string>`` is set to ``show``, the list of all available basis
|
|
||||||
sets is displayed.
|
|
||||||
|
|
||||||
|
|
||||||
.. option:: -c, --charge=<int>
|
.. option:: -c, --charge=<int>
|
||||||
|
|
||||||
@ -83,8 +80,8 @@ following should be used::
|
|||||||
|
|
||||||
qp_create_ezfio -b custom.basis molecule.xyz
|
qp_create_ezfio -b custom.basis molecule.xyz
|
||||||
|
|
||||||
Basis set files should be given in |GAMESS| format, where the full
|
Basis set files should be given in |GAMESS| format, without combined sp, spd, ...
|
||||||
names of the atoms are given, and the basis sets for each element are
|
contractions. The full names of the atoms are given, and the basis sets for each element are
|
||||||
separated by a blank line. Here is an example ::
|
separated by a blank line. Here is an example ::
|
||||||
|
|
||||||
HYDROGEN
|
HYDROGEN
|
||||||
@ -128,6 +125,12 @@ separated by a blank line. Here is an example ::
|
|||||||
1 0.3430000 1.0000000
|
1 0.3430000 1.0000000
|
||||||
|
|
||||||
|
|
||||||
|
Files can be extracted from the Basis Set Exchange database
|
||||||
|
https://www.basissetexchange.org , with the ``qp_basis`` tool.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Using custom pseudo-potentials
|
Using custom pseudo-potentials
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user