- 博客(32)
- 收藏
- 关注
原创 本地部署二次开发的openmm库
http://docs.openmm.org/latest/userguide/library/02_compiling.html
2023-11-30 16:18:16
416
原创 gromacs errors
b. gmx_mpi 版本:修改 mpirun -np x(x == lambda 数目)a. gmx 版本: 添加 -ntmpi 1。
2023-05-25 08:55:12
605
原创 画损失函数三维图
import numpy as npimport scipy as spimport randomimport torchfrom matplotlib import pyplot as pltfrom mpl_toolkits.mplot3d import Axes3Dxx = np.arange(-5,5,0.1)yy = np.arange(-5,5,0.1)X, Y = np.meshgrid(xx, yy)X = torch.tensor(X)Y = torch.tens
2021-12-17 16:47:35
1033
原创 python 查看类的属性和方法
class A(): def __init__(self): self.a = 1 self.b = 2 def aa(self): print('i am ok')cl = A()print(cl.__dict__)# {'a': 1, 'b': 2}print(dir(cl))#[....'__subclasshook__', '__weakref__', 'a', 'aa', 'b']print(help(cl))
2021-11-30 18:47:19
3737
原创 画单个分子
from rdkit import Chemfrom rdkit.Chem import Drawfrom rdkit.Chem.Draw.MolDrawing import MolDrawing, DrawingOptionssmiles = 'NC1=CCC(C2=CCC#CN2CC2OC3=CN2C(=O)C(=O)C3Nc2nc(C(F)(F)F)c(N=O)c(=O)[nH]2)C1=O'mol = Chem.MolFromSmiles(smiles)opts = DrawingOpt
2021-11-25 15:42:49
120
原创 itertools.combinations()测试
import itertoolsatoms = ['a','b','c','d','h']for atom1, atom2 in itertools.combinations(atoms, 2): print(atom1,atom2)output:a ba ca da hb cb db hc dc hd h
2021-11-23 09:20:34
185
原创 absl参数理解
from absl import app, flags, loggingimport sys#设置参数,第一个是参数名称,第二个是参数默认值,无默认值可取None,第三个是参数解释flags.DEFINE_string(‘str_1’, ‘hello’, ‘Input a string.’)flags.DEFINE_string(‘str_2’, ‘world’, ‘Input a string.’)flags.DEFINE_integer(‘num_1’, 0, ‘Input a integer
2021-11-11 15:06:33
1084
原创 anaconda安装早期tensorflow环境
#创建新环境conda create --n ‘your environment name’#激活环境conda activate ‘your environment name’#关闭环境conda deactivate#为了安装tensorflow早期版本conda install python=3.6conda install tensorflow==1.15conda install -c conda-forge rdkit...
2021-11-10 16:50:52
1417
原创 Ubantu ‘ZLIB_1.2.9‘ not found 错误处理
错误出现原因:你所安装软件软件的libz.so.1版本比较老,没有包含‘ZLIB_1.2.9’字体版本;你可以通过:strings libz.so.1 | grep ‘ZLIB*’ 命令查看你软件包含的字体版本,例如:ZLIB_1.2.0…解决方法:你可以使用:sudo find / -name “libz.so.1”命令来看着电脑的其他位置较新的‘libz.so.1’文件,然后把安装软件李的老文件给替换了就行。为了以防万一不要直接删除老文件,将它改名后保存。...
2021-10-25 16:49:26
1872
原创 windows环境创建mysql数据库
cd C:\Windows\System32open cmd.ext with administrator’s authoriitylog in mysql databasemysql -u root -ppassword: nonecreate databasecreate DATABASE ‘databse_name’;show all databasesshow databases;show basic info of ‘database_name’show crea
2021-10-21 11:57:25
734
原创 生成复杂分子3D结构
from rdkit import Chemfrom rdkit.Chem import AllChemimport ossmiles = '[NH3+][C@@H](C(=O)N[C@@H](C(=O)N[C@@H](C(=O)N[C@H](C(=O)N[C@@H]1C(=O)N2[C@H](C(=O)N[C@@H](C(=O)N[C@@H](C(=O)N[C@@H](C(=O)N[C@H](C(=O)N[C@@H](C(=O)N[C@H](C(=O)N3[C@@H](C(=O)N[C@@H](
2021-09-22 10:46:56
726
原创 将含有protein和ligands 的mol2文件转化成sdf文件
import osimport sysfrom rdkit import Chemdef split_mol2(mol_path, out_path): with open (mol_path,'r') as f: lines = f.readlines() if not os.path.exists(out_path): os.makedirs(out_path) path_protein = os.path.
2021-07-16 17:04:44
1365
原创 测试rdkit分子结构输出
import rdkit from rdkit import Chemfrom rdkit.Chem import AllChemsmiles_1 = 'C[C@H]1[C@@H]2Cc3ccc(O)cc3[C@]1(C)CCN2C'#smiles_1 = 'N/C(F)(C)C\(=O)O'#smiles_1 = 'CC(C)(C)OC(=O)N[C@@](C)(Cc1ccccc1)C(=O)NC(Cc1ccccc1)C(=O)NCCCCCCCC(=O)O'smiles_2 = 'CC1C2
2021-07-14 09:43:51
537
原创 测试symply
mport sympy as spimport mathfrom sympy import *import time import matplotlib.pyplot as pltdef get_R(a_x, a_y, a_z): #a_x, a_y, a_z
2021-07-14 09:41:13
118
原创 python 计算时间差
import timea = "Sat Mar 28 22:24:24 2016"print (time.mktime(time.strptime(a,"%a %b %d %H:%M:%S %Y")))b = '2021-04-19 03:32:29'print (time.mktime(time.strptime(b,"%Y-%m-%d %H:%M:%S")))c = '2021-04-20 03:32:29'bb = time.mktime(time.strptime(b,"%Y-%m-%
2021-07-06 15:01:17
149
原创 SDF 文件格式说明
XXXXXX #分子名称XXXXXX # 产生该文件的软件名称9 8 0 0 0 0 0 0 0999 V2000 #第一二参数分别代表原子数量和键的数量0.5369 0.9749 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 「1.4030 0.4749 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 02.2690 0.9749
2021-06-23 13:14:07
1913
1
原创 根据中心原子切割分子碎片
class cut_fragment(): def __init__(self,center_atoms,mol): self.center_atoms = center_atoms self.mol = mol self.break_bond = [] self.connect_atom = self.center_atoms self.ssr = Chem.GetSymmSSSR(self.mol)
2021-04-15 14:38:53
157
原创 筛选骨架差异较大分子
from rdkit import Chemfrom rdkit.Chem import AllChem, Drawfrom rdkit.Chem.Scaffolds import MurckoScaffoldfrom rdkit import DataStructsdef cal_mol_similar(m1,m2): core1 = MurckoScaffold.GetScaffoldForMol(m1) core2 = MurckoScaffold.GetScaffoldF
2021-04-14 14:46:51
174
原创 linux 打来文件后替换关键字命令:
linux 打来文件后替换关键字命令:gg 回到文档开头V 选择当前行G 回到末尾ggVG:s/“查找内容”/ “新内容”/ gc
2021-04-02 10:06:15
131
原创 Ubuntu 因为掉驱动而进不去主界面解决方案
Ubuntu 因为掉驱动而进不去主界面解决方案重装nvidia驱动cd /zfs/packagesudo systemctl stop lightdm.servicesudo ./NVIDIA-Linux-x86_64-418.56.runsudo systemctl start lightdm.service恢复down的节点sudo /usr/local/sbin/slurmd -n -19sudo scontrol update node=“your node name” state
2021-03-31 10:54:49
202
翻译 创建git_hub命令
create your git_hub branchstep 1: git clone remote_pathstep 2: git remote add origin remote_pathstep 3: cd your downloaded folderstep 4: git branch -a # you will see all branchesstep 5: git checkout -b your_branch_namestep 6: git push origin your_b
2021-03-30 15:16:02
67
转载 RDkit: smiles 转化inche, inchikey
原网址链接:http://rdkit.org/docs/source/rdkit.Chem.inchi.htmlrdkit.Chem.inchi modulerdkit.Chem.inchi.MolToInchiAndAuxInfo(mol, options=’’, logLevel=None, treatWarningAsError=False)Returns the standard InChI string and InChI auxInfo for a moleculeKeyword arg
2021-02-06 17:58:05
2449
翻译 根据Morgan指纹预测分子logP
from rdkit import Chem, DataStructsfrom rdkit.Chem.Crippen import MolLogPfrom rdkit.Chem import AllChemimport numpy as npimport torchimport torch.nn as nnfile = "shulin_test.log"with open(file,'r')as f: lines = f.readlines() smiles = [l.sp
2021-02-04 17:14:15
629
1
原创 利用rdkit获取分子的基本属性
from rdkit import Chemfrom rdkit.Chem import Drawfrom rdkit.Chem.Draw import IPythonConsolefrom rdkit.Chem.Draw.MolDrawing import MolDrawing, DrawingOptions#import pymysqlelem_table = {"H": [1, 1.008, [0.3], ], "He": [2, 4.003, [1.1
2021-02-04 14:46:17
880
翻译 基于torchni做结构优化
from ase.lattice.cubic import Diamondfrom ase.md.langevin import Langevinfrom ase.optimize import BFGSfrom ase import unitsimport torchani#h2 = Atoms('H2',# positions = [[0,0,0],[0,0,0.7]])#h2.calc = NWChem(xc='PBE')#opt = BFGS(h2)#opt.
2021-02-04 10:13:38
169
原创 基于 torchani预测分子能量和力
import torchimport torchanidevice = torch.device('cuda' if torch.cuda.is_available() else 'cpu')#periodic_table_index: 使用c,h,o,n....#(1, Na, 3) 1: 分子的结构数量;Na: atom number in molecule; 3 ?model = torchani.models.ANI2x(periodic_table_index=True).to(d..
2021-02-04 09:43:04
388
3
原创 python绘制柱状图
使用python 绘制横向柱状图def plt_pic_1(x,y1,y2):x = x[5:10]y1 = y1[5:10]y_11 = []for i in range(len(y1)):y_11.append(int(float(y1[i])))y2 = y2[5:10]y_22 = []for i in range(len(y2)):y_22.append(int((float(y2[i])100)))params = {‘figure.figsize’: ‘20, 50’}
2020-12-23 11:26:19
1192
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人