-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from mattwthompson/energy-tests
Update energy tests
- Loading branch information
Showing
5 changed files
with
173 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
-OEChem-02242314133D | ||
|
||
9 8 0 0 0 0 0 0 0999 V2000 | ||
1.0616 -0.2681 -0.0006 C 0 0 0 0 0 0 0 0 0 0 0 0 | ||
1.9101 0.9126 -0.4220 C 0 0 0 0 0 0 0 0 0 0 0 0 | ||
1.5170 1.3236 -1.7228 O 0 0 0 0 0 0 0 0 0 0 0 0 | ||
1.3393 -0.6108 1.0001 H 0 0 0 0 0 0 0 0 0 0 0 0 | ||
-0.0000 -0.0002 -0.0006 H 0 0 0 0 0 0 0 0 0 0 0 0 | ||
1.1801 -1.0990 -0.7040 H 0 0 0 0 0 0 0 0 0 0 0 0 | ||
2.9684 0.6361 -0.4446 H 0 0 0 0 0 0 0 0 0 0 0 0 | ||
1.7730 1.7499 0.2687 H 0 0 0 0 0 0 0 0 0 0 0 0 | ||
2.0787 2.0794 -1.9612 H 0 0 0 0 0 0 0 0 0 0 0 0 | ||
1 2 1 0 0 0 0 | ||
2 3 1 0 0 0 0 | ||
1 4 1 0 0 0 0 | ||
1 5 1 0 0 0 0 | ||
1 6 1 0 0 0 0 | ||
2 7 1 0 0 0 0 | ||
2 8 1 0 0 0 0 | ||
3 9 1 0 0 0 0 | ||
M END | ||
> <atom.dprop.PartialCharge> | ||
-0.097100 0.131430 -0.601340 0.044760 0.044760 0.044760 0.017320 0.017320 0.398090 | ||
|
||
$$$$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
-OEChem-02242314343D | ||
|
||
3 2 0 0 0 0 0 0 0999 V2000 | ||
0.0611 0.3887 0.0589 O 0 0 0 0 0 0 0 0 0 0 0 0 | ||
0.7238 -0.3116 -0.0382 H 0 0 0 0 0 0 0 0 0 0 0 0 | ||
-0.7849 -0.0770 -0.0207 H 0 0 0 0 0 0 0 0 0 0 0 0 | ||
1 2 1 0 0 0 0 | ||
1 3 1 0 0 0 0 | ||
M END | ||
$$$$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import os.path | ||
|
||
import pytest | ||
from openff.toolkit.topology import Molecule | ||
|
||
|
||
def get_data(relative_path: str) -> str: | ||
""" | ||
Get the file path to some data in the package for testing. | ||
Args: | ||
relative_path: The relative path of the file to be loaded from deforcefields/data | ||
Returns: | ||
The absolute path to the requested file in deforcefields/data. | ||
""" | ||
from pkg_resources import resource_filename | ||
|
||
file_name = resource_filename("deforcefields", os.path.join("data", relative_path)) | ||
if not os.path.exists(file_name): | ||
raise ValueError( | ||
f"{relative_path} does not exist. If you have just added it, you'll have to re-install." | ||
) | ||
return file_name | ||
|
||
|
||
@pytest.fixture() | ||
def ethanol_with_charges() -> Molecule: | ||
""" | ||
Return and OpenFF Molecule model of ethanol with `am1bccelf10` charges computed with openeye | ||
""" | ||
ethanol = Molecule.from_file(get_data("ethanol.sdf")) | ||
return ethanol | ||
|
||
|
||
@pytest.fixture() | ||
def water() -> Molecule: | ||
""" | ||
Return an OpenFF Molecule model of water with no charges. | ||
""" | ||
return Molecule.from_file(get_data("water.sdf")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters