9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-12-22 19:43:32 +01:00

added the point charges

This commit is contained in:
eginer 2023-01-18 11:36:15 +01:00
parent 7eb14fc0f8
commit 8ea1b5c023
2 changed files with 12 additions and 6 deletions

View File

@ -204,7 +204,7 @@ BEGIN_PROVIDER [ double precision, ao_integrals_pt_chrg, (ao_num,ao_num)]
!$OMP DEFAULT (NONE) & !$OMP DEFAULT (NONE) &
!$OMP PRIVATE (i,j,k,l,m,alpha,beta,A_center,B_center,C_center,power_A,power_B,& !$OMP PRIVATE (i,j,k,l,m,alpha,beta,A_center,B_center,C_center,power_A,power_B,&
!$OMP num_A,num_B,Z,c,c1,n_pt_in) & !$OMP num_A,num_B,Z,c,c1,n_pt_in) &
!$OMP SHARED (ao_num,ao_prim_num,ao_expo_ordered_transp,ao_power,ao_nucl,pts_charge_coord,ao_coef_normalized_ordered_transp,& !$OMP SHARED (ao_num,ao_prim_num,ao_expo_ordered_transp,ao_power,ao_nucl,pts_charge_coord,ao_coef_normalized_ordered_transp,nucl_coord,&
!$OMP n_pt_max_integrals,ao_integrals_pt_chrg,n_pts_charge,pts_charge_z) !$OMP n_pt_max_integrals,ao_integrals_pt_chrg,n_pts_charge,pts_charge_z)
n_pt_in = n_pt_max_integrals n_pt_in = n_pt_max_integrals
@ -214,13 +214,13 @@ BEGIN_PROVIDER [ double precision, ao_integrals_pt_chrg, (ao_num,ao_num)]
do j = 1, ao_num do j = 1, ao_num
num_A = ao_nucl(j) num_A = ao_nucl(j)
power_A(1:3)= ao_power(j,1:3) power_A(1:3)= ao_power(j,1:3)
A_center(1:3) = pts_charge_coord(num_A,1:3) A_center(1:3) = nucl_coord(num_A,1:3)
do i = 1, ao_num do i = 1, ao_num
num_B = ao_nucl(i) num_B = ao_nucl(i)
power_B(1:3)= ao_power(i,1:3) power_B(1:3)= ao_power(i,1:3)
B_center(1:3) = pts_charge_coord(num_B,1:3) B_center(1:3) = nucl_coord(num_B,1:3)
do l=1,ao_prim_num(j) do l=1,ao_prim_num(j)
alpha = ao_expo_ordered_transp(l,j) alpha = ao_expo_ordered_transp(l,j)
@ -240,7 +240,7 @@ BEGIN_PROVIDER [ double precision, ao_integrals_pt_chrg, (ao_num,ao_num)]
c1 = NAI_pol_mult( A_center, B_center, power_A, power_B & c1 = NAI_pol_mult( A_center, B_center, power_A, power_B &
, alpha, beta, C_center, n_pt_in ) , alpha, beta, C_center, n_pt_in )
c = c - Z * c1 c = c + Z * c1
enddo enddo
ao_integrals_pt_chrg(i,j) = ao_integrals_pt_chrg(i,j) & ao_integrals_pt_chrg(i,j) = ao_integrals_pt_chrg(i,j) &

View File

@ -2,6 +2,11 @@
import os import os
import sys import sys
# First argument is the EZFIO file
# It reads a file EZFIO_point_charges.xyz written in this way:
# charge x y z (Angstrom)
# for all charges
def zip_in_ezfio(ezfio,tmp): def zip_in_ezfio(ezfio,tmp):
tmpzip=tmp+".gz" tmpzip=tmp+".gz"
@ -22,9 +27,10 @@ EZFIO=EZFIO.replace("/", "")
print(EZFIO) print(EZFIO)
# Reading the point charges and convert the Angstrom geometry in Bohr for QP # Reading the point charges and convert the Angstrom geometry in Bohr for QP
f = open('point_charges.xyz','r') f = open(EZFIO+'_point_charges.xyz','r')
lines = f.readlines() lines = f.readlines()
convert_angs_to_bohr=1.88973 convert_angs_to_bohr=1.8897259885789233
n_charges=0 n_charges=0
coord_x=[] coord_x=[]
coord_y=[] coord_y=[]