From 977dcab59308a4bfd1cfa76f491fb59fdac78c87 Mon Sep 17 00:00:00 2001 From: jean paul nshuti Date: Thu, 9 Oct 2025 18:22:59 +0200 Subject: [PATCH] add the genetic parameter of pyramidal --- Makefile | 2 +- ...3_planar.f90 => genetic_param_nh3_pyr.f90} | 62 +++++++++++-------- src/model/invariants_no3.f90 | 6 +- src/model/model_nh3.f90 | 24 +++---- src/model/nncoords_no3.f90 | 18 +++--- 5 files changed, 60 insertions(+), 52 deletions(-) rename src/model/{genetic_param_nh3_planar.f90 => genetic_param_nh3_pyr.f90} (94%) diff --git a/Makefile b/Makefile index 1fdf3b0..a90dd79 100644 --- a/Makefile +++ b/Makefile @@ -100,7 +100,7 @@ genann_objects = geNNetic.o iNNterface.o puNNch.o \ # Objects depending on model #mod_objects = nnmodel.o nncoords.o -pln_objects = invariants_no3.o nncoords_no3.o genetic_param_nh3_planar.o model_nh3.o nnadia_nh3.o +pln_objects = invariants_no3.o nncoords_no3.o genetic_param_nh3_pyr.o model_nh3.o nnadia_nh3.o # Objects belonging to internal library diff --git a/src/model/genetic_param_nh3_planar.f90 b/src/model/genetic_param_nh3_pyr.f90 similarity index 94% rename from src/model/genetic_param_nh3_planar.f90 rename to src/model/genetic_param_nh3_pyr.f90 index 2c3c3da..0c5d6b8 100644 --- a/src/model/genetic_param_nh3_planar.f90 +++ b/src/model/genetic_param_nh3_pyr.f90 @@ -1,25 +1,25 @@ Module dip_param IMPLICIT NONE - Integer,parameter :: np=58 - Double precision :: p(58) + Integer,parameter :: np=66 + Double precision :: p(66) integer :: pst(2,400) contains SUBROUTINE init_dip_planar_data() implicit none - p( 1)= 0.101430388D+01 + p( 1)= 0.515449059D+00 p( 2)= 0.000000000D+00 - p( 3)= 0.157490804D+01 + p( 3)= 0.978476807D+00 p( 4)= 0.000000000D+00 - p( 5)= -0.343280555D+01 + p( 5)= -0.225153302D+01 p( 6)= 0.000000000D+00 - p( 7)= 0.246060523D+00 + p( 7)= -0.196655329D+00 p( 8)= 0.000000000D+00 p( 9)= 0.000000000D+00 - p( 10)= 0.408099282D-01 + p( 10)= 0.000000000D+00 p( 11)= 0.000000000D+00 p( 12)= 0.000000000D+00 - p( 13)= -0.769396889D+01 + p( 13)= -0.308320582D+01 p( 14)= 0.000000000D+00 p( 15)= 0.000000000D+00 p( 16)= 0.000000000D+00 @@ -28,10 +28,10 @@ p( 19)= 0.000000000D+00 p( 20)= 0.000000000D+00 p( 21)= 0.000000000D+00 - p( 22)= 0.217421464D+00 - p( 23)= 0.464794515D+00 + p( 22)= 0.155576080D+00 + p( 23)= 0.399570072D+00 p( 24)= 0.000000000D+00 - p( 25)= -0.243354772D+00 + p( 25)= -0.168532613D+00 p( 26)= 0.000000000D+00 p( 27)= 0.000000000D+00 p( 28)= 0.000000000D+00 @@ -46,25 +46,33 @@ p( 37)= 0.000000000D+00 p( 38)= 0.000000000D+00 p( 39)= 0.000000000D+00 - p( 40)= 0.000000000D+00 - p( 41)= 0.000000000D+00 + p( 40)= 0.400000000D-01 + p( 41)= -0.348763946D+00 p( 42)= 0.000000000D+00 - p( 43)= 0.000000000D+00 + p( 43)= -0.352820810D+00 p( 44)= 0.000000000D+00 p( 45)= 0.000000000D+00 - p( 46)= 0.000000000D+00 - p( 47)= 0.000000000D+00 + p( 46)= -0.567363489D+00 + p( 47)= -0.244801150D+00 p( 48)= 0.000000000D+00 p( 49)= 0.000000000D+00 p( 50)= 0.000000000D+00 - p( 51)= 0.000000000D+00 - p( 52)= -0.565000000D-02 - p( 53)= 0.180418089D+00 + p( 51)= -0.128708810D-01 + p( 52)= 0.000000000D+00 + p( 53)= 0.000000000D+00 p( 54)= 0.000000000D+00 - p( 55)= 0.118050680D-01 + p( 55)= -0.111374303D+01 p( 56)= 0.000000000D+00 - p( 57)= 0.000000000D+00 + p( 57)= -0.194029120D+01 p( 58)= 0.000000000D+00 + p( 59)= 0.000000000D+00 + p( 60)= 0.270000000D-01 + p( 61)= -0.231405897D+00 + p( 62)= 0.000000000D+00 + p( 63)= -0.278734547D+00 + p( 64)= 0.000000000D+00 + p( 65)= 0.000000000D+00 + p( 66)= -0.929361369D+00 pst(1, 1)= 1 pst(2, 1)= 2 pst(1, 2)= 3 @@ -98,16 +106,16 @@ pst(1, 16)= 43 pst(2, 16)= 4 pst(1, 17)= 47 - pst(2, 17)= 0 - pst(1, 18)= 47 + pst(2, 17)= 8 + pst(1, 18)= 55 pst(2, 18)= 2 - pst(1, 19)= 49 + pst(1, 19)= 57 pst(2, 19)= 3 - pst(1, 20)= 52 + pst(1, 20)= 60 pst(2, 20)= 1 - pst(1, 21)= 53 + pst(1, 21)= 61 pst(2, 21)= 2 - pst(1, 22)= 55 + pst(1, 22)= 63 pst(2, 22)= 4 pst(1, 23)= 0 pst(2, 23)= 0 diff --git a/src/model/invariants_no3.f90 b/src/model/invariants_no3.f90 index 57bb00c..2cfef00 100644 --- a/src/model/invariants_no3.f90 +++ b/src/model/invariants_no3.f90 @@ -6,10 +6,10 @@ Module invariants_mod implicit none !include "nnparams.incl" double precision, intent(in) :: a, xs, ys, xb, yb, b - double precision, intent(out) :: inv(3) + double precision, intent(out) :: inv(4) double precision:: invar(24) complex(8) :: q1, q2 - LOGICAL,PARAMETER:: debg =.TRUE. + LOGICAL,PARAMETER:: debg =.false. integer :: i ! express the coordinate in complex @@ -64,7 +64,7 @@ Module invariants_mod inv(1) = invar(1) inv(2) = invar(5) inv(3) = invar(9) - + inv(4) = invar(23) if (debg) then write(14,"(A,*(f10.5))")"Invar II", (invar(i),i=1,4) write(14,"(A,*(f10.5))") "Invar III", (invar(i),i=5,12) diff --git a/src/model/model_nh3.f90 b/src/model/model_nh3.f90 index 89cd3ca..b261634 100644 --- a/src/model/model_nh3.f90 +++ b/src/model/model_nh3.f90 @@ -14,12 +14,12 @@ module diabmodel integer(idp) id,i,j ,ii real(dp) xs,xb,ys,yb,a,b,ss,sb,v3_vec(8) real(dp),dimension(12):: shift,scal - xs=q(5) - ys=q(6) - xb=q(7) - yb=q(8) - a=q(4) - b=q(9) + xs=q(6) + ys=q(7) + xb=q(8) + yb=q(9) + a=q(5) + b=q(10) call init_dip_planar_data() @@ -207,12 +207,12 @@ module diabmodel integer(idp) id,i,j, ii real(dp) xs,xb,ys,yb,a,b,ss,sb,v3_vec(8) real(dp),dimension(12):: shift,scal - xs=q(5) - ys=q(6) - xb=q(7) - yb=q(8) - a=q(4) - b=q(9) + xs=q(6) + ys=q(7) + xb=q(8) + yb=q(9) + a=q(5) + b=q(10) call init_dip_planar_data() ! modify the parametr diff --git a/src/model/nncoords_no3.f90 b/src/model/nncoords_no3.f90 index feb0255..0005ee0 100644 --- a/src/model/nncoords_no3.f90 +++ b/src/model/nncoords_no3.f90 @@ -87,7 +87,7 @@ contains double precision aR !a1-modes H-Dist., double precision exR, exAng !ex components H-Dist., H-Ang. double precision eyR, eyAng !ey components H-Dist., H-Ang. - double precision inv(3) + double precision inv(4) ! debugging logical, parameter :: dbg = .false. @@ -139,14 +139,14 @@ contains ! call invariants and get them ! 24 invariants - call invariants(0.0d0,exR,eyR,exAng,eyAng,umb,inv) - q(1:3)=inv(1:3) - q(4) = aR - q(5) = exR - q(6) = eyR - q(7) = exAng - q(8) = -1.0d0*eyAng - q(9) = umb + call invariants(aR,exR,eyR,exAng,eyAng,umb,inv) + q(1:4)=inv(1:4) + q(5) = aR + q(6) = exR + q(7) = eyR + q(8) = exAng + q(9) = eyAng + q(10) = umb ! pairwise distances as second coordinate set !call pair_distance(q, t(1:6))