From 8ea1b5c023de6acfdde896baf1a9cd24ed1dd556 Mon Sep 17 00:00:00 2001 From: eginer Date: Wed, 18 Jan 2023 11:36:15 +0100 Subject: [PATCH] added the point charges --- src/ao_one_e_ints/point_charges.irp.f | 8 ++++---- src/ao_one_e_ints/write_pt_charges.py | 10 ++++++++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/ao_one_e_ints/point_charges.irp.f b/src/ao_one_e_ints/point_charges.irp.f index aa80e167..c038458d 100644 --- a/src/ao_one_e_ints/point_charges.irp.f +++ b/src/ao_one_e_ints/point_charges.irp.f @@ -204,7 +204,7 @@ BEGIN_PROVIDER [ double precision, ao_integrals_pt_chrg, (ao_num,ao_num)] !$OMP DEFAULT (NONE) & !$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 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) 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 num_A = ao_nucl(j) 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 num_B = ao_nucl(i) 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) 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 & , alpha, beta, C_center, n_pt_in ) - c = c - Z * c1 + c = c + Z * c1 enddo ao_integrals_pt_chrg(i,j) = ao_integrals_pt_chrg(i,j) & diff --git a/src/ao_one_e_ints/write_pt_charges.py b/src/ao_one_e_ints/write_pt_charges.py index 086f1e52..d4b6d251 100755 --- a/src/ao_one_e_ints/write_pt_charges.py +++ b/src/ao_one_e_ints/write_pt_charges.py @@ -2,6 +2,11 @@ import os 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): tmpzip=tmp+".gz" @@ -22,9 +27,10 @@ EZFIO=EZFIO.replace("/", "") print(EZFIO) # 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() -convert_angs_to_bohr=1.88973 +convert_angs_to_bohr=1.8897259885789233 + n_charges=0 coord_x=[] coord_y=[]