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

_crd2frag: use OB native PBC implementation #1006

Merged
merged 7 commits into from
Nov 24, 2022

Conversation

njzjz
Copy link
Member

@njzjz njzjz commented Oct 22, 2022

The previous PBC implementation is to create ghost atoms and pass them to the OpenBabel. Since OpenBabel has supported PBC condition in v3.1.0, the previous implementation is migrated to the native one in this PR.

The previous PBC implementation is to create ghost atoms and pass them to the OpenBabel. Since OpenBabel has supported PBC condition in v3.1.0, the previous implementation is migrated to the native one in this PR.
@njzjz njzjz marked this pull request as draft October 22, 2022 01:35
@codecov-commenter
Copy link

codecov-commenter commented Oct 22, 2022

Codecov Report

Attention: Patch coverage is 71.42857% with 2 lines in your changes missing coverage. Please review.

Project coverage is 39.42%. Comparing base (b666f15) to head (c4623b7).
Report is 215 commits behind head on devel.

Files with missing lines Patch % Lines
dpgen/generator/lib/gaussian.py 71.42% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            devel    #1006      +/-   ##
==========================================
+ Coverage   38.84%   39.42%   +0.58%     
==========================================
  Files          99       99              
  Lines       17995    17979      -16     
==========================================
+ Hits         6990     7089      +99     
+ Misses      11005    10890     -115     

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

@njzjz njzjz marked this pull request as ready for review October 22, 2022 01:50
@njzjz njzjz marked this pull request as draft October 22, 2022 01:57
@njzjz njzjz marked this pull request as ready for review October 22, 2022 01:59
@njzjz
Copy link
Member Author

njzjz commented Oct 22, 2022

@AnguseZhang Please check why the following test fails when open babel is installed.

@unittest.skipIf(importlib.util.find_spec("openbabel") is None, "requires openbabel")
def test_make_fp_gaussian(self):
make_fp_gaussian(iter_index=0, jdata=self.jdata)
candi = np.loadtxt(os.path.join(self.fp_path, "candidate.shuffled.000.out"), dtype=np.str)
candi_ref = np.loadtxt(os.path.join(self.dirname, "outputs", "candidate.shuffled.000.out"), dtype=np.str)
self.assertEqual(sorted([int(i) for i in candi[:,1]]), [0,10,20,30,50])

@AnguseZhang
Copy link
Collaborator

I've fixed the ut in this PR njzjz#108. Please check and merge in your PR.

@AnguseZhang Please check why the following test fails when open babel is installed.

@unittest.skipIf(importlib.util.find_spec("openbabel") is None, "requires openbabel")
def test_make_fp_gaussian(self):
make_fp_gaussian(iter_index=0, jdata=self.jdata)
candi = np.loadtxt(os.path.join(self.fp_path, "candidate.shuffled.000.out"), dtype=np.str)
candi_ref = np.loadtxt(os.path.join(self.dirname, "outputs", "candidate.shuffled.000.out"), dtype=np.str)
self.assertEqual(sorted([int(i) for i in candi[:,1]]), [0,10,20,30,50])

@AnguseZhang AnguseZhang merged commit 287fa17 into deepmodeling:devel Nov 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants