Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NRL update #57

Merged
merged 5 commits into from
Dec 29, 2023
Merged

NRL update #57

merged 5 commits into from
Dec 29, 2023

Conversation

QG-phy
Copy link
Collaborator

@QG-phy QG-phy commented Dec 27, 2023

  1. update the NRL to support both v0 and v1 version of the overlap formula in NRL TB.
  2. add a new tool to automatically transfer the NRLTB parameter file to the json checkpoint for dptb.
  3. add the example of Cu
  4. update the example of Si with both sp and spd models.

@QG-phy QG-phy requested a review from floatingCatty December 27, 2023 13:58
@QG-phy QG-phy added the Feature Request New feature or request label Dec 27, 2023
@@ -35,15 +35,14 @@ def __init__(self, functype='varTang96',overlap=False) -> None:
self.num_paras = 2
assert hasattr(self, 'powerlaw')

elif functype == 'NRL':
elif re.search("NRL",functype):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这边原来"=="会出啥问题嘛

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

你应该也看到了,我为了兼容两种版本的NRL, 在input json里面指定模式的时候,NRLv0 和NRLv1 两种字段。这样的改成正则的判断是否是NRL就可以兼容这两种。最小变动。


if not "skfunction" in input_nrl['model_options'].keys():
input_nrl['model_options']['skfunction'] = {}
input_nrl['model_options']['skfunction']['sk_cutoff'] = Rcut * bohr2ang
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这边会给cutoff decay等重新赋值,那输入input.json 里的值是可以随便设的?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是的,可以随便。这些参数在NRL的本身的模型参数已经指定了。因此在读入NRL文件之后,就直接进行单位转换,然后赋值到input里面一步到位最合适了。

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

事实上,我们的ckpt.json模型,单独的一个json是不能够作为模型使用的。必须搭配对应的input json 所以我想可能json的模型或许可以更新一下,既要有formula的参数数值,也要包含一些设置的参数,比如cutoff decay这些。

@floatingCatty floatingCatty merged commit fed61a6 into deepmodeling:main Dec 29, 2023
2 checks passed
@QG-phy QG-phy deleted the nrl_update branch April 12, 2024 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants