当前位置:网站首页>计算重叠积分的第二种方法
计算重叠积分的第二种方法
2022-07-27 10:26:00 【黑榆】
重叠积分可表示为

其中




其中的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;
}
//38a
public 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/118762949
public 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.2252196665381199
double d= Sab ( 0.2, 5.8, 4.5, 3, 2, 2, 3, 2 ); //0.8783587074281796 0.8783587025446252
System.out.println( d+ " *** d ***" );
}
public static void main(String[] args) throws IOException, ParseException, InterruptedException {
so( );
}
}
边栏推荐
- 学习笔记-微信支付
- Integrated design of communication perception based on CSI: problems, challenges and Prospects
- File upload vulnerability bypass method
- Learning C language together: structure (2)
- MySQL 索引、事务与存储引擎
- 7z用法
- C语言 2:求三数字最大值,求三数字中间值,编写程序步骤
- How to smooth the online and offline of Web Services
- Kgdb debug kernel cannot execute breakpoints and kdb-22:permisson denied
- 厉害了!VMware ESXi安装记录,附下载
猜你喜欢

No identifier specified for entity solution

服务器访问速度

YonBuilder赋能创新,用友第四届开发者大赛“金键盘奖”开启竞逐!

The difference between scalar, vector, matrix and tensor in deep learning

Apache cannot start in phpstudy

Beijing publicized the spot check of 8 batches of children's shoes, and qierte was listed as unqualified

phpstudy中Apache无法启动

It is thought-provoking: is syntax really important? Qiu Xipeng group proposed a powerful baseline for aspect based emotional analysis

Advanced operation of MySQL data table

深度解析:什么是Diffusion Model?
随机推荐
gyp ERR! configure error. gyp ERR! stack Error: gyp failed with exit code: 1
jvm--字节码浅析
Self optimization of wireless cell load balancing based on machine learning technology
Integrated design of communication perception based on CSI: problems, challenges and Prospects
Edata base, a secondary development project based on spark packaging, is introduced
MySQL日志管理、备份与恢复
Tdengine helps Siemens' lightweight digital solution simicas simplify data processing process
北京公示儿童鞋抽查 8组批产品不合格琪尔特登榜
ECCV 2022 | 同时完成四项跟踪任务!Unicorn: 迈向目标跟踪的大统一
搭建 Samba 服务
[Linux] mariadb/mysql scheduled full backup script and data recovery
File upload vulnerability related
Recruit top talents! The "megeagle creator program" of Kuangshi technology was officially launched
学习笔记-简易服务器实现
厉害了!VMware ESXi安装记录,附下载
JVM -- Analysis of bytecode
antd table+checkbox 默认值显示
[Linux] install MySQL
对象数组去重
Tensorflow notes - basic functions and concepts