-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add dgl ion capabilities * move files around and update tests * add test model and tidy files * add ion tests * remove commented out lines * add pointer to apache 2 license * update changelog [skip ci]
- Loading branch information
1 parent
dffc164
commit 6cb4387
Showing
102 changed files
with
3,833 additions
and
83 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
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
52 changes: 52 additions & 0 deletions
52
openff/nagl/tests/data/example_charges/generate-new-sdfs.py
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,52 @@ | ||
import pathlib | ||
|
||
import click | ||
import tqdm | ||
|
||
from openff.toolkit import Molecule | ||
from openff.units import unit | ||
from openff.nagl import GNNModel | ||
|
||
|
||
@click.command() | ||
@click.option( | ||
"--input", "-i", | ||
"input_directory", | ||
required=True, | ||
type=click.Path(exists=True, file_okay=False, dir_okay=True), | ||
) | ||
@click.option( | ||
"--output", "-o", | ||
"output_directory", | ||
required=True, | ||
type=click.Path(file_okay=False, dir_okay=True), | ||
) | ||
@click.option( | ||
"--model", "-m", | ||
"model_path", | ||
required=True, | ||
type=click.Path(exists=True, file_okay=True, dir_okay=False), | ||
) | ||
def main( | ||
input_directory: str, | ||
output_directory: str, | ||
model_path: str, | ||
): | ||
input_files = sorted(pathlib.Path(input_directory).glob("*.sdf")) | ||
output_directory = pathlib.Path(output_directory) | ||
output_directory.mkdir(exist_ok=True, parents=True) | ||
|
||
model = GNNModel.load(model_path, eval_mode=True) | ||
|
||
for input_file in tqdm.tqdm(input_files): | ||
mol = Molecule.from_file(input_file, "SDF", allow_undefined_stereo=True) | ||
mol._partial_charges = ( | ||
model.compute_property(mol, as_numpy=True) | ||
* unit.elementary_charge | ||
) | ||
output_file = output_directory / input_file.name | ||
mol.to_file(output_file, "SDF") | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
14 changes: 14 additions & 0 deletions
14
openff/nagl/tests/data/example_charges/openff-gnn-am1bcc-0.1.0-rc.3/C#N.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
-OEChem-10172415303D | ||
|
||
3 2 0 0 0 0 0 0 0999 V2000 | ||
0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 | ||
1.0000 0.0000 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0 | ||
-0.7500 0.0000 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 | ||
1 2 3 0 0 0 0 | ||
1 3 1 0 0 0 0 | ||
M END | ||
> <atom.dprop.PartialCharge> | ||
0.190730 -0.372090 0.181360 | ||
|
||
$$$$ |
27 changes: 27 additions & 0 deletions
27
openff/nagl/tests/data/example_charges/openff-gnn-am1bcc-0.1.0-rc.3/C1CC1.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
|
||
-OEChem-10172415303D | ||
|
||
9 9 0 0 0 0 0 0 0999 V2000 | ||
0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 | ||
1.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 | ||
0.5000 0.8682 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 | ||
-0.1300 -0.7387 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 | ||
-0.7050 0.2560 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 | ||
1.7050 0.2560 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 | ||
1.1300 -0.7387 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 | ||
-0.0747 1.3501 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 | ||
1.0747 1.3501 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 | ||
1 3 1 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 | ||
2 6 1 0 0 0 0 | ||
2 7 1 0 0 0 0 | ||
3 8 1 0 0 0 0 | ||
3 9 1 0 0 0 0 | ||
M END | ||
> <atom.dprop.PartialCharge> | ||
-0.136720 -0.136690 -0.136690 0.068350 0.068350 0.068350 0.068350 0.068350 0.068350 | ||
|
||
$$$$ |
33 changes: 33 additions & 0 deletions
33
openff/nagl/tests/data/example_charges/openff-gnn-am1bcc-0.1.0-rc.3/C1CCC1.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
|
||
-OEChem-10172415303D | ||
|
||
12 12 0 0 0 0 0 0 0999 V2000 | ||
0.0000 1.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 | ||
0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 | ||
1.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 | ||
1.0000 1.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 | ||
-0.7500 1.0000 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 | ||
-0.0000 1.7500 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 | ||
-0.0000 -0.7500 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 | ||
-0.7500 0.0000 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 | ||
1.7500 0.0000 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 | ||
1.0000 -0.7500 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 | ||
1.0000 1.7500 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 | ||
1.7500 1.0000 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 | ||
1 4 1 0 0 0 0 | ||
1 2 1 0 0 0 0 | ||
2 3 1 0 0 0 0 | ||
3 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 | ||
3 10 1 0 0 0 0 | ||
4 11 1 0 0 0 0 | ||
4 12 1 0 0 0 0 | ||
M END | ||
> <atom.dprop.PartialCharge> | ||
-0.096850 -0.096850 -0.096850 -0.096850 0.048425 0.048425 0.048425 0.048425 0.048425 0.048425 0.048425 0.048425 | ||
|
||
$$$$ |
41 changes: 41 additions & 0 deletions
41
openff/nagl/tests/data/example_charges/openff-gnn-am1bcc-0.1.0-rc.3/C1CNC(=O)CC1.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
|
||
-OEChem-10172415303D | ||
|
||
16 16 0 0 0 0 0 0 0999 V2000 | ||
0.8674 0.4976 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 | ||
0.8674 1.5027 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 | ||
-0.0000 2.0102 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0 | ||
-0.8674 1.5027 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 | ||
-1.7349 2.0002 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 | ||
-0.8674 0.4976 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 | ||
0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 | ||
1.6061 0.6272 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 | ||
1.1226 -0.2076 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 | ||
1.1266 2.2065 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 | ||
1.6058 1.3710 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 | ||
-0.0000 2.7602 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 | ||
-1.1226 -0.2076 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 | ||
-1.6061 0.6272 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 | ||
0.4816 -0.5750 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 | ||
-0.4816 -0.5750 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 | ||
1 7 1 0 0 0 0 | ||
1 2 1 0 0 0 0 | ||
2 3 1 0 0 0 0 | ||
3 4 1 0 0 0 0 | ||
4 5 2 0 0 0 0 | ||
4 6 1 0 0 0 0 | ||
6 7 1 0 0 0 0 | ||
1 8 1 0 0 0 0 | ||
1 9 1 0 0 0 0 | ||
2 10 1 0 0 0 0 | ||
2 11 1 0 0 0 0 | ||
3 12 1 0 0 0 0 | ||
6 13 1 0 0 0 0 | ||
6 14 1 0 0 0 0 | ||
7 15 1 0 0 0 0 | ||
7 16 1 0 0 0 0 | ||
M END | ||
> <atom.dprop.PartialCharge> | ||
-0.105587 0.100671 -0.583052 0.702970 -0.645974 -0.149781 -0.084091 0.052848 0.052848 0.041457 0.041457 0.321251 0.075829 0.075829 0.051663 0.051663 | ||
|
||
$$$$ |
37 changes: 37 additions & 0 deletions
37
openff/nagl/tests/data/example_charges/openff-gnn-am1bcc-0.1.0-rc.3/C1CNCC1.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
|
||
-OEChem-10172415303D | ||
|
||
14 14 0 0 0 0 0 0 0999 V2000 | ||
0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 | ||
-0.3065 0.9519 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 | ||
0.5007 1.5426 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0 | ||
1.3131 0.9519 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 | ||
1.0014 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 | ||
0.0777 -0.7460 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 | ||
-0.7339 -0.1546 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 | ||
-0.9919 0.6473 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 | ||
-0.6824 1.6009 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 | ||
0.4996 2.2926 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 | ||
1.6888 1.6010 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 | ||
1.9978 0.6457 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 | ||
1.7348 -0.1571 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 | ||
0.9224 -0.7458 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 | ||
1 5 1 0 0 0 0 | ||
1 2 1 0 0 0 0 | ||
2 3 1 0 0 0 0 | ||
3 4 1 0 0 0 0 | ||
4 5 1 0 0 0 0 | ||
1 6 1 0 0 0 0 | ||
1 7 1 0 0 0 0 | ||
2 8 1 0 0 0 0 | ||
2 9 1 0 0 0 0 | ||
3 10 1 0 0 0 0 | ||
4 11 1 0 0 0 0 | ||
4 12 1 0 0 0 0 | ||
5 13 1 0 0 0 0 | ||
5 14 1 0 0 0 0 | ||
M END | ||
> <atom.dprop.PartialCharge> | ||
-0.102176 0.146808 -0.808465 0.146808 -0.102176 0.048320 0.048320 0.043794 0.043794 0.350745 0.043794 0.043794 0.048320 0.048320 | ||
|
||
$$$$ |
Oops, something went wrong.