Skip to content

Commit d9a6043

Browse files
committed
update repeat charge and readme
1 parent 1afd820 commit d9a6043

21 files changed

+7566
-4450
lines changed

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
A **P**artial **A**tomic **C**harge Predicter for Porous **Ma**terials based on Graph Convolutional Neural **N**etwork (**PACMAN**)
88

9-
- DDEC6 ([1](https://doi.org/10.1039/C6RA04656H), [2](https://doi.org/10.1039/C6RA05507A), [3](https://doi.org/10.1039/C7RA07400J), [4](https://doi.org/10.1039/C7RA11829E)), [Bader](https://doi.org/10.1021/jp0482666), [Charge Model 5 (CM5)](https://doi.org/10.1021/ct200866d) for metal-organic frameworks (MOFs)
9+
- DDEC6 ([1](https://doi.org/10.1039/C6RA04656H), [2](https://doi.org/10.1039/C6RA05507A), [3](https://doi.org/10.1039/C7RA07400J), [4](https://doi.org/10.1039/C7RA11829E)), [Bader](https://doi.org/10.1021/jp0482666), [Charge Model 5 (CM5)](https://doi.org/10.1021/ct200866d), [REPEAT](https://doi.org/10.1021/ct9003405) for metal-organic frameworks (MOFs)
1010
- DDEC6 for covalent-organic frameworks (COFs)
1111

1212

@@ -42,17 +42,17 @@ pmcharge.predict(cif_file="./test/Cu-BTC.cif",charge_type="DDEC6",digits=10,atom
4242
4343
**Terminal**
4444
```sh
45-
python pmcharge.py folder-name[path] --charge_type[DDEC6/Bader/CM5] --digits[int] [--atom_type] [--neutral]
45+
python pmcharge.py folder-name[path] --charge_type[DDEC6/Bader/CM5/REPEAT] --digits[int] --atom_type[bool] --neutral[bool]
4646
```
47-
**Example command:** ```python pmcharge.py test_file/test-1/ --charge_type DDEC6 --digits 10 --atom_type --neutral```
47+
**Example command:** ```python pmcharge.py test_file/test-1/ --charge_type DDEC6 --digits 10```
4848

4949
**Help usage information:** ```python pmcharge.py -h```
5050

5151
* folder-name: relative path to a folder with cif files without partial atomic charges
52-
* charge-type (default: DDE6): DDEC6, Bader or CM5
52+
* charge-type (default: DDE6): DDEC6, Bader, CM5 or REPEAT
5353
* digits (default: 6): number of decimal places to print for partial atomic charges. ML models were trained on a 6-digit dataset.
54-
* atom-type (default: False): keep the same partial atomic charge for the same atom types (based on the similarity of partial atomic charges up to 3 & 2 decimal places).
55-
* neutral (default: False): keep the net charge is zero. We use "mean" method to neuralize the system where the excess charges are equally distributed across all atoms.
54+
* atom-type (default: True): keep the same partial atomic charge for the same atom types (based on the similarity of partial atomic charges up to 3 & 2 decimal places).
55+
* neutral (default: True): keep the net charge is zero. We use "mean" method to neuralize the system where the excess charges are equally distributed across all atoms.
5656

5757
# Website & Zenodo
5858
* Predict partial atomic charges using an online APP :point_right: [link](https://pacman-charge-mtap.streamlit.app/).
@@ -78,6 +78,7 @@ If you use PACMAN charge, please consider citing [this paper]():
7878
| CoRE MOF 2014 DDEC | [link](https://zenodo.org/records/3986573#.XzfKiJMzY8N) | 2,932 |
7979
| CoRE MOF 2014 DFT-optimized | [link](https://zenodo.org/records/3986569#.XzfKcpMzY8N) | 502 |
8080
| CURATED-COFs | [link](https://github.com/danieleongari/CURATED-COFs) | 612 |
81+
| ARC-MOF | [link](https://zenodo.org/records/10818822) | 279,118 |
8182

8283

8384
# Bugs and Issues

pmcharge.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
def main():
1414
parser = argparse.ArgumentParser(description="Run PACMaN with the specified configurations")
1515
parser.add_argument('folder_name', type=str, help='Relative path to a folder with cif files without partial atomic charges')
16-
parser.add_argument('--charge_type', type=str, default='DDEC6', choices=['DDEC6', 'Bader', 'CM5'], help='Type of charges to use')
16+
parser.add_argument('--charge_type', type=str, default='DDEC6', choices=['DDEC6', 'Bader', 'CM5', 'REPEAT'], help='Type of charges to use')
1717
parser.add_argument('--digits', type=int, default=6, help='Number of decimal places to print for partial atomic charges')
18-
parser.add_argument('--atom_type', action='store_true', default=False, help='Keep the same partial atomic charge for the same atom types')
19-
parser.add_argument('--neutral', action='store_true', default=False, help='Keep the net charge is zero')
18+
parser.add_argument('--atom_type', type=bool, default=True, help='Keep the same partial atomic charge for the same atom types')
19+
parser.add_argument('--neutral', type=bool, default=True, help='Keep the net charge is zero')
2020
args = parser.parse_args()
2121

2222
path = args.folder_name
@@ -46,6 +46,9 @@ def main():
4646
elif charge_type=="CM5":
4747
model_charge_name = "./pth/best_cm5/cm5.pth"
4848
charge_nor_name = "./pth/best_cm5/normalizer-cm5.pkl"
49+
elif charge_type=="REPEAT":
50+
model_charge_name = "./pth/best_repeat/repeat.pth"
51+
charge_nor_name = "./pth/best_repeat/normalizer-repeat.pkl"
4952
# with open(pbe_nor_name, 'rb') as f:
5053
# pbe_nor = pickle.load(f)
5154
# f.close()
723 Bytes
Binary file not shown.

pth/best_repeat/repeat.pth

36.6 MB
Binary file not shown.

pth/chk_repeat/checkpoint.pth

36.6 MB
Binary file not shown.

0 commit comments

Comments
 (0)