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

Add pairwise tabulation as an independent model #3101

Merged
merged 5 commits into from
Jan 3, 2024

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.

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>
deepmd/model/model.py Show resolved Hide resolved
Comment on lines +24 to +26
from deepmd.model.model import (
Model,
)

Check notice

Code scanning / CodeQL

Cyclic import Note

Import of module
deepmd.model.model
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 Note

Import of module
deepmd.entrypoints.train
begins an import cycle.
source/tests/test_model_pairtab.py Fixed Show fixed Hide fixed
source/tests/test_model_pairtab.py Fixed Show fixed Hide fixed
deepmd/utils/argcheck.py Fixed Show fixed Hide fixed
source/tests/test_model_pairtab.py Fixed Show fixed Hide fixed
source/tests/test_model_pairtab.py Fixed Show fixed Hide fixed
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>
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 Note

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 Note

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 Note

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 Note

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 Note

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 Note

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 Note

Variable t_rcut is not used.
@wanghan-iapcm wanghan-iapcm merged commit a905817 into deepmodeling:devel Jan 3, 2024
46 checks passed
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