M3GNet 开源项目使用教程

M3GNet 开源项目使用教程

m3gnetMaterials graph network with 3-body interactions featuring a DFT surrogate crystal relaxer and a state-of-the-art property predictor.项目地址:https://gitcode.com/gh_mirrors/m3/m3gnet

1. 项目的目录结构及介绍

M3GNet 项目的目录结构如下:

m3gnet/
├── pyproject.toml
├── requirements-ci.txt
├── requirements.txt
├── setup.cfg
├── setup.py
├── tasks.py
├── README.md
├── CODE_OF_CONDUCT.md
├── LICENSE
├── m3gnet/
│   ├── __init__.py
│   ├── models/
│   │   ├── __init__.py
│   │   ├── m3gnet.py
│   │   └── ...
│   ├── trainers/
│   │   ├── __init__.py
│   │   ├── potential_trainer.py
│   │   └── ...
│   ├── utils/
│   │   ├── __init__.py
│   │   ├── data_utils.py
│   │   └── ...
│   └── ...
└── tests/
    ├── __init__.py
    ├── test_m3gnet.py
    └── ...

目录结构介绍

  • pyproject.toml: 项目配置文件,用于定义项目的构建系统和依赖。
  • requirements-ci.txtrequirements.txt: 项目依赖文件,分别用于CI环境和常规环境。
  • setup.cfgsetup.py: 用于项目的打包和分发配置。
  • tasks.py: 项目任务脚本,可能包含一些自动化任务。
  • README.md: 项目介绍和使用说明。
  • CODE_OF_CONDUCT.md: 项目的行为准则。
  • LICENSE: 项目的开源许可证。
  • m3gnet/: 项目的主要代码目录,包含模型、训练器、工具等模块。
  • tests/: 项目的测试代码目录。

2. 项目的启动文件介绍

M3GNet 项目的启动文件主要是 m3gnet/models/m3gnet.pym3gnet/trainers/potential_trainer.py

m3gnet.py

m3gnet.py 文件定义了 M3GNet 模型的核心架构,包括模型的初始化、前向传播等。

potential_trainer.py

potential_trainer.py 文件定义了模型的训练器,负责模型的训练过程,包括数据加载、优化器配置、训练循环等。

3. 项目的配置文件介绍

M3GNet 项目的主要配置文件包括 pyproject.tomlsetup.cfg

pyproject.toml

pyproject.toml 文件用于定义项目的构建系统和依赖。例如:

[build-system]
requires = ["setuptools>=42", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "m3gnet"
version = "0.1.0"
description = "Materials Graph Neural Network"
authors = [
    { name="Materials Virtual Lab", email="info@materialsvirtuallab.org" }
]
dependencies = [
    "tensorflow>=2.0",
    "pymatgen",
    "ase",
    "cython"
]

setup.cfg

setup.cfg 文件用于配置项目的打包和分发选项。例如:

[metadata]
name = m3gnet
version = 0.1.0
description = Materials Graph Neural Network
author = Materials Virtual Lab
author_email = info@materialsvirtuallab.org
license = BSD-3-Clause

[options]
packages = find:
install_requires =
    tensorflow>=2.0
    pymatgen
    ase
    cython

[options.package_data]
* = *.py, *.txt, *.md

通过以上配置文件,可以方便地进行项目的安装和分发。

m3gnetMaterials graph network with 3-body interactions featuring a DFT surrogate crystal relaxer and a state-of-the-art property predictor.项目地址:https://gitcode.com/gh_mirrors/m3/m3gnet

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

顾淑慧Beneficient

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值