Skip to content

Comments

Add pairwise tabulation as an independent model#3101

Merged
wanghan-iapcm merged 5 commits intodeepmodeling:develfrom
njzjz:pair-tab-model
Jan 3, 2024
Merged

Add pairwise tabulation as an independent model#3101
wanghan-iapcm merged 5 commits intodeepmodeling:develfrom
njzjz:pair-tab-model

Conversation

@njzjz
Copy link
Member

@njzjz njzjz commented Jan 2, 2024

Add pairwise tabulation as an independent model, which can be summed with DP (DP + PairTab) by the linear model, other than interpolation. PairTab can be used for any pairwise potentials, e.g., d3, LJ, ZBL, etc.

Fix #3099.

njzjz added 3 commits January 1, 2024 10:07
Add pairwise tabulation as an independent model, which can be summed with DP (DP + PairTab) by the linear model, other than interpolation.
PairTab can be used for any pairwise potentials, e.g., d3, LJ, ZBL, etc.

Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Comment on lines +24 to +26
from deepmd.model.model import (
Model,
)

Check notice

Code scanning / CodeQL

Cyclic import

Import of module [deepmd.model.model](1) begins an import cycle.
Comment on lines +269 to +271
from deepmd.entrypoints.train import (
update_one_sel,
)

Check notice

Code scanning / CodeQL

Cyclic import

Import of module [deepmd.entrypoints.train](1) begins an import cycle.
@codecov
Copy link

codecov bot commented Jan 2, 2024

Codecov Report

Attention: 9 lines in your changes are missing coverage. Please review.

Comparison is base (985a886) 75.82% compared to head (eae75e5) 75.86%.

Files Patch % Lines
deepmd/model/pairtab.py 87.32% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            devel    #3101      +/-   ##
==========================================
+ Coverage   75.82%   75.86%   +0.04%     
==========================================
  Files         246      247       +1     
  Lines       24995    25075      +80     
  Branches     1597     1597              
==========================================
+ Hits        18952    19023      +71     
- Misses       5105     5114       +9     
  Partials      938      938              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
@github-actions github-actions bot added the Docs label Jan 2, 2024
@njzjz njzjz requested a review from wanghan-iapcm January 2, 2024 05:03
Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
trainable=False,
initializer=tf.constant_initializer(tab_data, dtype=tf.float64),
)
t_tmap = tf.constant(" ".join(self.type_map), name="tmap", dtype=tf.string)

Check notice

Code scanning / CodeQL

Unused local variable

Variable t_tmap is not used.
initializer=tf.constant_initializer(tab_data, dtype=tf.float64),
)
t_tmap = tf.constant(" ".join(self.type_map), name="tmap", dtype=tf.string)
t_mt = tf.constant(self.model_type, name="model_type", dtype=tf.string)

Check notice

Code scanning / CodeQL

Unused local variable

Variable t_mt is not used.
)
t_tmap = tf.constant(" ".join(self.type_map), name="tmap", dtype=tf.string)
t_mt = tf.constant(self.model_type, name="model_type", dtype=tf.string)
t_ver = tf.constant(MODEL_VERSION, name="model_version", dtype=tf.string)

Check notice

Code scanning / CodeQL

Unused local variable

Variable t_ver is not used.
t_ver = tf.constant(MODEL_VERSION, name="model_version", dtype=tf.string)

with tf.variable_scope("fitting_attr" + suffix, reuse=reuse):
t_dfparam = tf.constant(0, name="dfparam", dtype=tf.int32)

Check notice

Code scanning / CodeQL

Unused local variable

Variable t_dfparam is not used.

with tf.variable_scope("fitting_attr" + suffix, reuse=reuse):
t_dfparam = tf.constant(0, name="dfparam", dtype=tf.int32)
t_daparam = tf.constant(0, name="daparam", dtype=tf.int32)

Check notice

Code scanning / CodeQL

Unused local variable

Variable t_daparam is not used.
t_dfparam = tf.constant(0, name="dfparam", dtype=tf.int32)
t_daparam = tf.constant(0, name="daparam", dtype=tf.int32)
with tf.variable_scope("descrpt_attr" + suffix, reuse=reuse):
t_ntypes = tf.constant(self.ntypes, name="ntypes", dtype=tf.int32)

Check notice

Code scanning / CodeQL

Unused local variable

Variable t_ntypes is not used.
t_daparam = tf.constant(0, name="daparam", dtype=tf.int32)
with tf.variable_scope("descrpt_attr" + suffix, reuse=reuse):
t_ntypes = tf.constant(self.ntypes, name="ntypes", dtype=tf.int32)
t_rcut = tf.constant(

Check notice

Code scanning / CodeQL

Unused local variable

Variable t_rcut is not used.
@wanghan-iapcm wanghan-iapcm merged commit a905817 into deepmodeling:devel Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] _Integrate Grimme DFTD-3 or DFTD-4 into DeepMD-kit

2 participants