计算重叠积分的第二种方法

2023-10-17 22:40

本文主要是介绍计算重叠积分的第二种方法,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

重叠积分可表示为

其中

其中的F函数就是前文得到的FmNN(  int m ,int N, int N1    )方法,gαβ函数就是前文得到的gαβ( int La, int Lb, int λ, int α ,int β   )方法,由这个公式得到了第二种计算重叠积分的方法Sab(double R,double za,double zb, int n1,int L1 ,int mm ,int n2 ,int L2   )。

如计算

double d= Sab ( 2.5, 4.2, 4.4 ,    2, 1 , 1 ,3 ,2 ); // -0.012921364537272557

*Computation of Overlap Integrals Over Slater-Type Orbitals Using Auxiliary Functions

I. I. GUSEINOV, A. OZMEN, U. ATAV, H. YUKSEL

Department of Physics, Faculty of Arts and Sciences, Selc ¸ uk University, 42079 Campus, Konya,Turkey

Received 6 January 1997; revised 5 July 1997; accepted 30 September 1997

*《量子化学》徐光宪 P547

Java 程序

package greenwood;import java.io.DataInputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.text.DecimalFormat;
import java.text.ParseException;public class auxiliarySab {public static  double FACT( double n ) throws IOException, ParseException {double prodt=1.0;for(int a=1 ;a<n+1 ;a++){prodt=prodt*a;}if(n<0){System.out.println( prodt+   "  负数阶乘 "  );}return prodt;}//38apublic static  double FmNN( int m ,int N, int N1    ) throws IOException, ParseException, InterruptedException {//System.out.println(  m+"  "+N+"  "+N1+ " **** m N N1"  );double d=0.0;double d1=0.0;double d2=0.0;double f1=0;for(int k=0 ;k<N1+1;k++){if(k<0||m-k<0||N1-k<0 || N-m+k<0 ){d2=0;}if(k>=0&&m-k>=0&&N1-k>=0 && N-m+k>=0 ){d=Math.pow( -1, k );d1=FACT(k)*FACT(m-k)*FACT(N1-k)*FACT(N-m+k);d2=d/d1;}f1=f1+d2;//System.out.println(k+"  "+  (m-k)+"  "+(N1-k)+"  "+(N-m+k)+" ** FmNN  "+d1+"  "+d2 +"  "+f1 );}double d3=FACT(N)*FACT(N1)*f1;//System.out.println(  d3+"  "+f1+" ** d3 FmNN "  );return d3;}//https://blog.csdn.net/georgesale/article/details/118762949public static  double calc2( String stra ) throws IOException, ParseException, InterruptedException {FileWriter fileWriter5 = new FileWriter("d:/工业/hk/python/表达式.csv");//stra="hin( fx1,fx1)";//stra="jin( rj1,rj2)";stra=stra.replaceAll(",","#");fileWriter5.write( stra + "\r\n");fileWriter5.flush();String exe = "python";String command = "D:/Download/cal.py";	String[] cmdArr = new String[] {exe ,command  };Process process = Runtime.getRuntime().exec(cmdArr);InputStream is = process.getInputStream();DataInputStream dis = new DataInputStream(is);String str = dis.readLine();process.waitFor();//System.out.println(str); double df= Double.parseDouble(str.trim());	 return df;}public static  double Ak(int k, double p ) throws IOException, ParseException, InterruptedException {//System.out.println( N+"  "+N1+"  "+q+ " ** QNNq "  );String s1="μ**"+k+"*sympy.exp(-"+p+"*μ)";String s2= "integrate("+  s1 +  ", (μ , 1, float('inf')))";//System.out.println( s2+ " ** ak"  );double ds=calc2(  s2 );return ds;}public static  double Bk(int k, double p, double t ) throws IOException, ParseException, InterruptedException {String s1="v**"+k+"*sympy.exp(-"+p*t+"*v)";String s2= "integrate("+  s1 +  ",  ( v , -1, 1))";//System.out.println( s2+ " ** bk"  );double ds=calc2(  s2 );return ds;}public static  double Sab(double R,double za,double zb, int n1,int L1 ,int mm ,int n2 ,int L2   ) throws IOException, ParseException, InterruptedException {double f=0;DecimalFormat df = new DecimalFormat( "0.00000000");  double p=R*(za+zb)/2;double t=(za-zb)/(za+zb);double d3= Math.pow((2*za),(n1+0.5))* Math.pow((2*zb) ,(n2+0.5) )/  Math.pow( (  FACT(2*n1)*FACT(2*n2) ),0.5)  * Math.pow( (R/2),(n1+n2+1)) ;int λ=mm; double f3=0;for( int α=-λ  ;  α<L1+1   ;α++ ){for(int  β=λ  ; β<L2+1    ;β++ ){double d4= gαβP.gαβ( L1, L2,  λ,  α , β   );System.out.println( d4+" *** d4 " +L1+"  "+L2+"  "+ λ+"  λ  "+α+"  "+β+"  α+β+1  "+ (α+β+1)  );double f1=0;if(Math.abs(d4)>1e-6){for(int q=0 ;q<α+β+1; q++){double d5=FmNN( q ,α+λ , β- λ   );double f2=0;if(Math.abs(d5)>1e-6){for(int m=0 ;m<n1+n2-α-β+1 ;m++){double d6=FmNN( m ,n1-α , n2-β   );double d7=0;if(Math.abs(d6)>1e-6){d7=Ak( n1+n2-α-β-m+q, p)*Bk(m+q,p,t);}f2=f2+d6*d7;System.out.println( df.format(d6)+" d6 "+df.format(d7)+"  "+df.format(f2)+ "  f2   "+m);}}f1=f1+d5*f2;				   System.out.println( q+"  q  "+df.format(d5)+" d5 "+df.format(f2)+"         *** f1 " +f1+"  * "+ (n1+n2-α-β+1 ) );}}f3=f3+d4*f1;System.out.println( d4+" "+f1+"         *** f3 " +f3 +"  ***  "+α+"  "+β );}}f=Math.pow(-1 , L2+mm )*d3*f3;//System.out.println( d3+" "+f3+ "       *** d f"  );return f;}public static  void so(    ) throws IOException, ParseException, InterruptedException {//double d= Sab ( 2.5, 4.2, 4.4 ,    2, 1 , 1 ,3 ,2 );   //-0.012921364533721143  -0.012921364537272557 //double d= Sab ( 2.5, 2.3, 2.3,    3, 2, 0, 2, 1  );  //-0.2252196665380932  -0.2252196665381199double d= Sab ( 0.2, 5.8, 4.5,    3, 2, 2, 3, 2  );  //0.8783587074281796  0.8783587025446252System.out.println( d+ "       *** d ***"  );}public static void main(String[] args) throws IOException, ParseException, InterruptedException {so(    );}}

                   

        

这篇关于计算重叠积分的第二种方法的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/228424

相关文章

PHP轻松处理千万行数据的方法详解

《PHP轻松处理千万行数据的方法详解》说到处理大数据集,PHP通常不是第一个想到的语言,但如果你曾经需要处理数百万行数据而不让服务器崩溃或内存耗尽,你就会知道PHP用对了工具有多强大,下面小编就... 目录问题的本质php 中的数据流处理:为什么必不可少生成器:内存高效的迭代方式流量控制:避免系统过载一次性

python获取指定名字的程序的文件路径的两种方法

《python获取指定名字的程序的文件路径的两种方法》本文主要介绍了python获取指定名字的程序的文件路径的两种方法,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要... 最近在做项目,需要用到给定一个程序名字就可以自动获取到这个程序在Windows系统下的绝对路径,以下

JavaScript中的高级调试方法全攻略指南

《JavaScript中的高级调试方法全攻略指南》什么是高级JavaScript调试技巧,它比console.log有何优势,如何使用断点调试定位问题,通过本文,我们将深入解答这些问题,带您从理论到实... 目录观点与案例结合观点1观点2观点3观点4观点5高级调试技巧详解实战案例断点调试:定位变量错误性能分

Python中 try / except / else / finally 异常处理方法详解

《Python中try/except/else/finally异常处理方法详解》:本文主要介绍Python中try/except/else/finally异常处理方法的相关资料,涵... 目录1. 基本结构2. 各部分的作用tryexceptelsefinally3. 执行流程总结4. 常见用法(1)多个e

Python实现精确小数计算的完全指南

《Python实现精确小数计算的完全指南》在金融计算、科学实验和工程领域,浮点数精度问题一直是开发者面临的重大挑战,本文将深入解析Python精确小数计算技术体系,感兴趣的小伙伴可以了解一下... 目录引言:小数精度问题的核心挑战一、浮点数精度问题分析1.1 浮点数精度陷阱1.2 浮点数误差来源二、基础解决

JavaScript中比较两个数组是否有相同元素(交集)的三种常用方法

《JavaScript中比较两个数组是否有相同元素(交集)的三种常用方法》:本文主要介绍JavaScript中比较两个数组是否有相同元素(交集)的三种常用方法,每种方法结合实例代码给大家介绍的非常... 目录引言:为什么"相等"判断如此重要?方法1:使用some()+includes()(适合小数组)方法2

504 Gateway Timeout网关超时的根源及完美解决方法

《504GatewayTimeout网关超时的根源及完美解决方法》在日常开发和运维过程中,504GatewayTimeout错误是常见的网络问题之一,尤其是在使用反向代理(如Nginx)或... 目录引言为什么会出现 504 错误?1. 探索 504 Gateway Timeout 错误的根源 1.1 后端

MySQL 表空却 ibd 文件过大的问题及解决方法

《MySQL表空却ibd文件过大的问题及解决方法》本文给大家介绍MySQL表空却ibd文件过大的问题及解决方法,本文给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友参考... 目录一、问题背景:表空却 “吃满” 磁盘的怪事二、问题复现:一步步编程还原异常场景1. 准备测试源表与数据

python 线程池顺序执行的方法实现

《python线程池顺序执行的方法实现》在Python中,线程池默认是并发执行任务的,但若需要实现任务的顺序执行,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋... 目录方案一:强制单线程(伪顺序执行)方案二:按提交顺序获取结果方案三:任务间依赖控制方案四:队列顺序消

SpringBoot通过main方法启动web项目实践

《SpringBoot通过main方法启动web项目实践》SpringBoot通过SpringApplication.run()启动Web项目,自动推断应用类型,加载初始化器与监听器,配置Spring... 目录1. 启动入口:SpringApplication.run()2. SpringApplicat