Eastsheng's Wiki

LAMMPS 小技巧

2022-03-20 00:58:28

PyLAT用法

1
python /home/chends/softwares/PyLAT/PyLAT.py -g -d --mol Saturate --mol Aromatic --mol Resin --mol Asphaltene --mol water --nummol 66 --nummol 16 --nummol 20 --nummol 3 --nummol 3000 -p ./ -v 2 log_interface.lammps 1_system_out_498.data traj_out_1.lammpstrj -f output.json

Units

  • 力单位转换
1
2
3
4
5
1 kJ/mol-Angstrom = 1.66053892103219×10^−11  J/m
1 kcal/mol-Angstrom = 1.66053892103219/0.239006 ×10^−11 J/m = 6.947687×10^−11 N
1 kcal/mol-Angstrom = 6.947687×10^−11 N
1 N = 1.4393279374848x10^10 kcal/mol-Angstrom

LAMMPS PYTHON

安装

1
2
make mpi mode=shlib
make install-python

添加环境变量

1
2
3
4
sudo vim ~/.bashrc
export PYTHONPATH=$PYTHONPATH:/home/.../lammps-3Mar20/python
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/.../lammps-3Mar20/src
source ~/.bashrc

测试

1
2
from lammps import lammps
lmp=lammps()

参考