当前位置: 首页 > news >正文

2023-03-04 区分纳米颗粒核壳原子

声明:未经允许,不得擅自复制、转载。

欢迎引用:

Laser-Assisted Synthesis of Bi-Decorated Pt Aerogel for Efficient Methanol Oxidation Electrocatalysis

Applied Surface Science ( IF 6.707 ) Pub Date : 2022-04-01 , DOI: 10.1016/j.apsusc.2022.153219

Liye Zhu, Ran Zhang, Xuan Liu, Jiayin Zhu, Ziang Guo, Yan Zhao

Click Here!

利用MS构建纳米颗粒R,指定壳厚,可将核原子的坐标和壳原子坐标区分开来。

# /usr/bin/env python
# -*- coding: utf-8 -*-
"""
Author: Liye Zhu
"""from tkinter.filedialog import askopenfilename
import matplotlib.pyplot as plt
from scipy import interpolate
import numpy as npclass xyzReading:def readxyz(self):path_and_name = askopenfilename(title='Select xyz data: ', filetypes=[('TXT', '*.txt')],initialdir='C:\\Users\\Mr. Zhu\\Desktop')x = []y = []z = []with open(path_and_name, 'r') as TXTFile:line = TXTFile.readlines()first_data_line = 9constant = float(line[4].split('     ')[3].lstrip(' '))constant = int(constant)print(constant)# constant = 100for index, row in enumerate(line):if index in range(first_data_line, len(line)):row = row.lstrip('     ')row = row.rstrip('\n')xyz = row.split('         ', 2)xyz = np.array(xyz)xp = float(xyz[0])*constantyp = float(xyz[1])*constantzp = float(xyz[2])*constantx.append(xp)y.append(yp)z.append(zp)x = np.array(x)y = np.array(y)z = np.array(z)return x, y, z, path_and_namefile_output = path_and_name[0:path_and_name.rfind('.', 1) + 1] + 'dat'np.savetxt(file_output, [x, y, z])class xyzProcessing:def __init__(self, x0, y0, z0, path_and_name):self.x0 = x0self.y0 = y0self.z0 = z0self.path_and_name = path_and_namedef findshell(self):xc = (max(self.x0) + min(self.x0)) / 2yc = (max(self.y0) + min(self.y0)) / 2zc = (max(self.z0) + min(self.z0)) / 2r = (max(self.x0) - min(self.x0)) / 2print('xc, yc, zc and radius (脜): ')print(xc, yc, zc, r)thickness = 1num = len(self.x0)Xc = xc*np.ones(num)Yc = yc * np.ones(num)Zc = zc * np.ones(num)dsqure = (self.x0-Xc)**2+(self.y0-Yc)**2 + (self.z0-Zc)**2Xout = self.x0[dsqure > (r-thickness)**2]Yout = self.y0[dsqure > (r-thickness)**2]Zout = self.z0[dsqure > (r-thickness)**2]Xin = self.x0[dsqure < (r - thickness) ** 2]Yin = self.y0[dsqure < (r - thickness) ** 2]Zin = self.z0[dsqure < (r - thickness) ** 2]# Xout = Xout.T# Yout = Yout.T# Zout = Zout.T# Xin = Xin.T# Yin = Yin.T# Zin = Zin.Toutpath = path_and_name[0:path_and_name.rfind('/', 1)]+'/out.dat'inpath = path_and_name[0:path_and_name.rfind('/', 1)]+'/in.dat'np.savetxt(outpath, [Xout, Yout, Zout])np.savetxt(inpath, [Xin, Yin, Zin])print(len(Xout))xyzRead = xyzReading()
[x, y, z, path_and_name] = xyzRead.readxyz()
XYZProcess = xyzProcessing(x, y, z, path_and_name)XYZProcess.findshell()# thickness = input('Please Input a shell thickness: ')
http://www.lryc.cn/news/28640.html

相关文章:

  • review设备管理
  • Cadence Allegro 导出Bill of Material Report (Condensed)详解
  • B. Sherlock and his girlfriend
  • Spring SpEL表达式
  • Nginx反向代理原理详解与配置
  • Happen-Before从入门到踹门
  • 电力系统系统潮流分析【IEEE 57 节点】(Matlab代码实现)
  • Java——N皇后问题
  • Mybatis一级缓存与二级缓存
  • LQB,手打,PCF8591,ADDA转换,AD1是光敏电阻,AD3是电位器,DA输出
  • 【计组笔记06】计算机组成与原理之控制器和总线结构
  • elisp简单实例: auto-save
  • 写字楼/园区/购物中心空置率太高?快用快鲸智慧楼宇系统
  • 【JavaSE】数组的定义和使用(上)
  • 计算机的学习路线
  • TD算法超详细解释,一篇文章看透彻!
  • 4.1 路由器(华硕 官改/梅林 华为 小米 路由) 使用花生壳 实现远程管理
  • 内容算法解读:提高内容摘要与原文的一致性(Faithfulness)
  • python用openpyxl包操作xlsx文件,统计表中合作电影数目最多的两个演员
  • Lesson12---人工神经网络(1)
  • 算法练习-排序(二)
  • 202302读书笔记|《长安的荔枝》——只要肯努力,办法总比困难多
  • java封装继承多态详解
  • 【uni-app教程】UniAPP 常用组件和 常用 API 简介# 知心姐姐聊天案例
  • 阿尔法开发板 .bin 文件烧写
  • Ceres-Solver 安装与卸载ubuntu20.04
  • 汇编系列02-借助操作系统输出Hello World
  • 【2023unity游戏制作-mango的冒险】-前六章API,细节,BUG总结小结
  • 进程控制及其操作
  • Git常用命令复习笔记