10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-12-26 06:14:43 +01:00
quantum_package/scripts/qp_set_frozen_core.py

37 lines
737 B
Python
Raw Normal View History

2018-04-30 18:43:13 +02:00
#!/usr/bin/env python2
2015-01-23 17:32:31 +01:00
import os
import sys
2015-07-14 00:19:45 +02:00
sys.path = [ os.environ["QP_ROOT"]+"/install/EZFIO/Python" ] + sys.path
2015-01-23 17:32:31 +01:00
from ezfio import ezfio
2018-05-25 14:47:05 +02:00
filename = sys.argv[1]
if filename == '-q': filename = sys.argv[2]
ezfio.set_filename(filename)
2015-01-23 17:32:31 +01:00
nb = 0
2018-05-30 13:46:48 +02:00
if not ezfio.pseudo_do_pseudo:
for charge in ezfio.nuclei_nucl_charge:
if charge < 5:
pass
elif charge < 13:
nb += 1
else:
nb += 5
2015-01-23 17:32:31 +01:00
mo_tot_num = ezfio.mo_basis_mo_tot_num
2016-09-09 19:31:30 +02:00
if len(sys.argv)>2:
2018-05-25 14:47:05 +02:00
if '-q' in sys.argv:
2016-09-09 19:31:30 +02:00
print nb
sys.exit(0)
if nb == 0:
2015-03-16 18:30:38 +01:00
os.system( """qp_set_mo_class -act "[1-%d]" %s"""%(mo_tot_num, sys.argv[1]) )
else:
os.system( """qp_set_mo_class -core "[1-%d]" -act "[%d-%d]" %s"""%(nb, nb+1, mo_tot_num, sys.argv[1]) )
2015-01-23 17:32:31 +01:00