Materials Studio 2023(MS2023)安装与配置指南

2026-03-28
2分钟阅读时长

一、MS2023 安装步骤

1. 基础安装操作

  1. 解压安装包:tar -zxvf MaterialsStudio2023.tar.gz
  2. 进入解压目录:cd MaterialsStudio2023
  3. 执行安装程序:./install

2. 交互式配置项说明

执行 ./install 后按以下要求配置(未提及项默认回车):

配置项 操作/输入值 说明
Do you wish to perform an RPM installation? (Y/n) 输入 y 并回车 推荐root用户使用RPM安装
Please enter the location in which to install Materials Studio 2023 默认 /opt/BIOVIA(可自定义) 安装根目录
Please enter the username under which you wish to run the Gateway service. 输入普通用户(示例:wsco 运行Gateway服务的用户
The BIOVIA License Pack is required… install it to that location? [Y/n] 回车默认 Y 安装License Pack到指定目录
Do you expect to require Apache? (Y/n) 回车默认 Y 依赖Apache组件
Would you like to specify an alternative Gateway port number (default is 18888) 回车默认 N 使用默认端口18888
1) Enter temporary license password
2) Set connection to license server
3) List command line license administration tools
99) Finished with license configuration
输入 99 并回车 跳过临时许可证配置,后续统一处理

二、许可证激活与认证

1. 许可证文件修改

  1. 编辑许可证文件(示例路径:/root/src/msi2023.lic): vim /root/src/msi2023.lic
  2. 将第一行 SERVER this_host ANY 27000 中的 this_host 替换为服务器主机名(示例:node01)。
  3. 确保主机名在 /etc/hosts 中配置:cat /etc/hosts # 需包含:127.0.0.1 node01(主机名需与许可证中一致)

2. 许可证安装

  1. 进入License Pack二进制目录:cd /opt/BIOVIA/BIOVIA_LicensePack/linux/bin
  2. 添加环境变量并生效:echo 'export PATH=/opt/BIOVIA/BIOVIA_LicensePack/linux/bin:$PATH' >> /etc/profile source /etc/profile
  3. 安装许可证:
    1. lp_install /root/src/msi2023.lic
    2. 安装成功会提示:The license file has been successfully installed...

3. 刷新许可证环境

  1. 执行环境变量刷新:. /opt/BIOVIA/BIOVIA_LicensePack/etc/lp_profile
  2. 写入系统配置永久生效:echo 'source /opt/BIOVIA/BIOVIA_LicensePack/etc/lp_profile' >> /etc/profile

4. 修改Gateway监听地址

  1. 修改配置文件权限:
    1. chmod u+w /opt/BIOVIA/MaterialsStudio23.1/etc/Gateway/configurations/default/conf/gwport.conf
  2. 编辑配置文件,将监听地址改为全网段:
    1. vim /opt/BIOVIA/MaterialsStudio23.1/etc/Gateway/configurations/default/conf/gwport.conf
    2. 原内容:Listen 127.0.0.1:18888
    3. 修改后:Listen 0.0.0.0:18888
  3. 恢复文件权限:chmod u-w /opt/BIOVIA/MaterialsStudio23.1/etc/Gateway/configurations/default/conf/gwport.conf

三、Gateway 服务配置

1. 添加Gateway用户

  1. 进入Gateway配置目录:cd /opt/BIOVIA/MaterialsStudio23.1/etc/Gateway
  2. 添加用户(密码需8位以上复杂密码):./gwusers -add wsco 按提示输入并确认密码

2. 设置开机自启动

  1. 复制启动脚本:cp msgateway_control_18888 /etc/rc.d/init.d/
  2. 添加到系统服务:chkconfig --add msgateway_control_18888

3. 创建计算工具软链接

为确保计算工具可全局调用,创建软链接:

MS_HOME=/opt/BIOVIA/MaterialsStudio23.1
ln -sf $MS_HOME/etc/CASTEP/bin/RunCASTEP.sh $MS_HOME/bin/RunCASTEP.sh
ln -sf $MS_HOME/etc/DFTB/bin/RunDFTB.sh $MS_HOME/bin/RunDFTB.sh
ln -sf $MS_HOME/etc/DMol3/bin/RunDMol3.sh $MS_HOME/bin/RunDMol3.sh
ln -sf $MS_HOME/etc/MesoDyn/bin/RunMesoDyn.sh $MS_HOME/bin/RunMesoDyn.sh
ln -sf $MS_HOME/etc/GULP/bin/RunGULP.sh $MS_HOME/bin/RunGULP.sh
ln -sf $MS_HOME/etc/ONETEP/bin/RunONETEP.sh $MS_HOME/bin/RunONETEP.sh
ln -sf $MS_HOME/etc/Kinetix/bin/RunKinetix.sh $MS_HOME/bin/RunKinetix.sh
ln -sf $MS_HOME/etc/VAMP/bin/RunVAMP.sh $MS_HOME/bin/RunVAMP.sh

4. 配置系统环境变量

编辑 /etc/profile,添加以下内容:

# ==================== BIOVIA License Pack 环境变量 ====================
export BIOVIA_LICENSEPACK=/opt/BIOVIA/BIOVIA_LicensePack
export PATH=$BIOVIA_LICENSEPACK/linux/bin:$PATH
source $BIOVIA_LICENSEPACK/etc/lp_profile

# ==================== Materials Studio 2023 环境变量 ====================
export MS_HOME=/opt/BIOVIA/MaterialsStudio23.1
export PATH=$MS_HOME/bin:$MS_HOME/etc/Gateway:$PATH
export LD_LIBRARY_PATH=$MS_HOME/lib:$MS_HOME/lib64:$BIOVIA_LICENSEPACK/lib:$LD_LIBRARY_PATH
# ==================== MS 配置结束 ====================

5. 启动并验证Gateway服务

  1. 重启Gateway服务:/etc/rc.d/init.d/msgateway_control_18888 restart # 成功提示:Restarting Materials Studio gateway: [ OK ]

  2. 验证端口监听:

    方式1:lsof查看 lsof -i:18888

    方式2:netstat查看 netstat -ntulp | grep 18888 ( 预期结果:0.0.0.0:18888 处于LISTEN状态,用户为配置的普通用户)

四、Windows客户端配置与测试

1. 服务器Gateway配置

  1. 打开Windows端MS2023,点击顶栏 Tools -> Server Console -> Server Management -> Server Gateways
  2. 新建Server Gateway,填写Linux服务器IP、端口18888及配置的Gateway用户(如wsco)。
  3. 右键新建的Gateway,选择 Test Server Gateway,测试成功即配置正常。

2. 提交测试任务

  1. 导入测试结构:File -> Import,选择路径:

    C:\Program Files (x86)\BIOVIA\Materials Studio 23.1\share\Structures\semiconductors\Si.msi

  2. 打开CASTEP Calculation,保持默认参数,切换到 Job Control 标签页:

    Gateway location 下拉菜单中选择上述配置的Linux服务器Gateway。

  3. 点击 Run 提交任务。

3. 查看任务状态与结果

  1. 左侧 Job Explorer 面板查看任务状态:

    Running:任务已在服务器启动;

    Completed:任务执行完成。

  2. 结果查看:计算完成后,点击 Modules -> CASTEP -> Analysis,可查看优化后的晶胞参数、能量、电荷密度等(如选择Structure后点击Update查看最终结构)。