pwdata 0.4.3__tar.gz → 0.4.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pwdata might be problematic. Click here for more details.
- {pwdata-0.4.3 → pwdata-0.4.4}/PKG-INFO +1 -1
- pwdata-0.4.4/pwdata/test/mdtrajs2config.py +30 -0
- pwdata-0.4.4/pwdata/test/mptraj2lmdb.py +94 -0
- pwdata-0.4.4/pwdata/test.py +164 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata.egg-info/PKG-INFO +1 -1
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata.egg-info/SOURCES.txt +3 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/setup.py +1 -1
- {pwdata-0.4.3 → pwdata-0.4.4}/LICENSE +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/README.md +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/__init__.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/atomconfig.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/build/__init__.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/build/cell.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/build/geometry.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/build/supercells.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/build/write_struc.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/calculators/__init__.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/calculators/const.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/calculators/unitconvert_lmps.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/calculators/units.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/check_envs.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/config.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/convert_files.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/cp2kdata.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/datasets_saver.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/deepmd.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/dump.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/extendedxyz.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/fairchem/__init__.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/fairchem/common/__init__.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/fairchem/common/registry.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/fairchem/common/typing.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/fairchem/common/utils.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/fairchem/datasets/__init__.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/fairchem/datasets/_utils.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/fairchem/datasets/ase_datasets.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/fairchem/datasets/base_dataset.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/fairchem/datasets/embeddings/__init__.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/fairchem/datasets/embeddings/atomic_radii.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/fairchem/datasets/embeddings/continuous_embeddings.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/fairchem/datasets/embeddings/khot_embeddings.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/fairchem/datasets/embeddings/qmof_khot_embeddings.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/fairchem/datasets/lmdb_database.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/fairchem/datasets/target_metadata_guesser.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/fairchem/modules/__init__.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/fairchem/modules/transforms.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/fairchem/preprocessing/__init__.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/image.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/lammpsdata.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/lmps.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/main.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/meta.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/movement.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/movement_saver.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/outcar.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/pertub/__init__.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/pertub/perturbation.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/pertub/scale.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/poscar.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/pwmlff.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/test/__init__.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/utils/__init__.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata/utils/constant.py +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata.egg-info/dependency_links.txt +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata.egg-info/entry_points.txt +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata.egg-info/requires.txt +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/pwdata.egg-info/top_level.txt +0 -0
- {pwdata-0.4.3 → pwdata-0.4.4}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pwdata
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.4
|
|
4
4
|
Summary: pwdata is a data pre-processing tool for PWMLFF, which can be used to extract features and labels. It also provides convenient interfaces for data conversion between different software.
|
|
5
5
|
Home-page: https://github.com/LonxunQuantum/pwdata
|
|
6
6
|
Author: LonxunQuantum
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'''
|
|
2
|
+
description:
|
|
3
|
+
Convert various trajectory files ('pwmat/movement','vasp/outcar','cp2k/md', or 'lammps/dump')
|
|
4
|
+
to a single structure format ('pwmat/config', 'vasp/poscar', 'lammps/lmp')
|
|
5
|
+
'''
|
|
6
|
+
|
|
7
|
+
from pwdata import Config
|
|
8
|
+
from pwdata.utils.constant import FORMAT
|
|
9
|
+
|
|
10
|
+
def trajs2config():
|
|
11
|
+
atom_types = ["Hf", "O"] # for lammps
|
|
12
|
+
input_file = "/data/home/wuxingxing/codespace/pwdata/examples/lmps_data/HfO2/30.lammpstrj"
|
|
13
|
+
input_format="lammps/dump"
|
|
14
|
+
save_format = "pwmat/config"
|
|
15
|
+
|
|
16
|
+
image = Config(data_path=input_file, format=input_format, atom_names=atom_types)
|
|
17
|
+
tmp_image_data = image.images
|
|
18
|
+
save_dir = "./tmp_test"
|
|
19
|
+
for id, config in enumerate(tmp_image_data):
|
|
20
|
+
savename = "{}_{}".format(id, FORMAT.get_filename_by_format(save_format))
|
|
21
|
+
image.iamges = [config]
|
|
22
|
+
image.to(output_path = save_dir,
|
|
23
|
+
data_name = savename,
|
|
24
|
+
save_format = save_format,
|
|
25
|
+
sort = True)
|
|
26
|
+
|
|
27
|
+
if __name__=="__main__":
|
|
28
|
+
trajs2config()
|
|
29
|
+
|
|
30
|
+
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
'''
|
|
2
|
+
description:
|
|
3
|
+
Convert MPtraj JSON file to aselmdb format
|
|
4
|
+
'''
|
|
5
|
+
|
|
6
|
+
from pwdata import Config
|
|
7
|
+
from pwdata.utils.constant import FORMAT
|
|
8
|
+
import json
|
|
9
|
+
from pwdata.fairchem.datasets.ase_datasets import LMDBDatabase
|
|
10
|
+
from ase import Atoms
|
|
11
|
+
from ase.db.row import AtomsRow
|
|
12
|
+
from pwdata.utils.constant import get_atomic_number_from_name
|
|
13
|
+
from tqdm import tqdm
|
|
14
|
+
import numpy as np
|
|
15
|
+
|
|
16
|
+
def MPjson2lmdb():
|
|
17
|
+
mp_file = "/data/home/wuxingxing/codespace/pwdata/examples/mp_data/mptest.json"
|
|
18
|
+
save_file = "/data/home/wuxingxing/codespace/pwdata/examples/mp_data/sub.aselmdb"
|
|
19
|
+
Mpjson = json.load(open(mp_file))
|
|
20
|
+
db = LMDBDatabase(filename=save_file, readonly=False)
|
|
21
|
+
for key_1, val_1 in tqdm(Mpjson.items(), total=len(Mpjson.keys())):
|
|
22
|
+
for key_2, val_2 in val_1.items():
|
|
23
|
+
_atomrow, data = cvt_dict_2_atomrow(val_2)
|
|
24
|
+
db._write(_atomrow, key_value_pairs={}, data=data)
|
|
25
|
+
db.close()
|
|
26
|
+
|
|
27
|
+
def cvt_dict_2_atomrow(config:dict):
|
|
28
|
+
# read cell
|
|
29
|
+
cell = read_from_dict('matrix', config['structure']['lattice'], require=True)
|
|
30
|
+
# read position
|
|
31
|
+
atom_type_list = get_atomic_number_from_name([_['label'] for _ in config['structure']['sites']])
|
|
32
|
+
position = [_['xyz'] for _ in config['structure']['sites']]
|
|
33
|
+
# read magmom
|
|
34
|
+
magmom = read_from_dict('magmom', config, require=True)
|
|
35
|
+
|
|
36
|
+
atom = Atoms(positions=position,
|
|
37
|
+
numbers=atom_type_list,
|
|
38
|
+
magmoms=magmom,
|
|
39
|
+
cell=cell)
|
|
40
|
+
|
|
41
|
+
atom_rows = AtomsRow(atom)
|
|
42
|
+
atom_rows.pbc = np.ones(3, bool)
|
|
43
|
+
# read stress -> xx, yy, zz, yz, xz, xy
|
|
44
|
+
stress = read_from_dict('stress', config, require=True)
|
|
45
|
+
atom_rows.stress = [stress[0][0],stress[1][1],stress[2][2],stress[1][2],stress[0][2],stress[0][1]]
|
|
46
|
+
# read force and energy
|
|
47
|
+
force = read_from_dict('force', config, require=True)
|
|
48
|
+
energy = read_from_dict('corrected_total_energy', config, require=True)
|
|
49
|
+
atom_rows.__setattr__('force', force)
|
|
50
|
+
atom_rows.__setattr__('energy', energy)
|
|
51
|
+
data = {}
|
|
52
|
+
data['uncorrected_total_energy'] = read_from_dict('uncorrected_total_energy', config, default=None)
|
|
53
|
+
data['corrected_total_energy'] = read_from_dict('uncorrected_total_energy', config, default=None)
|
|
54
|
+
data['energy_per_atom'] = read_from_dict('energy_per_atom', config, default=None)
|
|
55
|
+
data['ef_per_atom'] = read_from_dict('ef_per_atom', config, default=None)
|
|
56
|
+
data['e_per_atom_relaxed'] = read_from_dict('e_per_atom_relaxed', config, default=None)
|
|
57
|
+
data['ef_per_atom_relaxed'] = read_from_dict('ef_per_atom_relaxed', config, default=None)
|
|
58
|
+
data['bandgap'] = read_from_dict('bandgap', config, default=None)
|
|
59
|
+
data['mp_id'] = read_from_dict('mp_id', config, default=None)
|
|
60
|
+
# atom_rows._data = data
|
|
61
|
+
return atom_rows, data
|
|
62
|
+
|
|
63
|
+
def read_from_dict(key:str, config:dict, default=None, require=False):
|
|
64
|
+
if key in config:
|
|
65
|
+
return config[key]
|
|
66
|
+
else:
|
|
67
|
+
if require:
|
|
68
|
+
raise ValueError("key {} not found in config".format(key))
|
|
69
|
+
else:
|
|
70
|
+
return default
|
|
71
|
+
|
|
72
|
+
# def test_lmdb():
|
|
73
|
+
# from pwdata.fairchem.datasets.ase_datasets import AseDBDataset
|
|
74
|
+
# search_dict = {'src': '/data/home/wuxingxing/codespace/pwdata/examples/meta_data/alex_val/alex_go_aao_001.aselmdb'}
|
|
75
|
+
# dataset = AseDBDataset(config=search_dict)
|
|
76
|
+
# atom_list = list(dataset.dbs[0].select("Li"))
|
|
77
|
+
# std = atom_list[0]
|
|
78
|
+
|
|
79
|
+
# search_dict = {'src': '/data/home/wuxingxing/codespace/pwdata/examples/MPtrj.aselmdb'}
|
|
80
|
+
# dataset2 = AseDBDataset(config=search_dict)
|
|
81
|
+
# atom_list2 = list(dataset2.dbs[0].select("Li"))
|
|
82
|
+
# dev = atom_list2[0]
|
|
83
|
+
|
|
84
|
+
# search_dict = {'src': '/data/home/wuxingxing/codespace/pwdata/examples/mp_data/sub.aselmdb'}
|
|
85
|
+
# dataset3 = AseDBDataset(config=search_dict)
|
|
86
|
+
# atom_list3 = list(dataset3.dbs[0].select())
|
|
87
|
+
# std3 = atom_list3[0]
|
|
88
|
+
|
|
89
|
+
# print()
|
|
90
|
+
|
|
91
|
+
if __name__=="__main__":
|
|
92
|
+
MPjson2lmdb()
|
|
93
|
+
|
|
94
|
+
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import os
|
|
2
|
+
from main import main
|
|
3
|
+
import json
|
|
4
|
+
from pwdata.utils.constant import FORMAT
|
|
5
|
+
from pwdata.convert_files import search_images
|
|
6
|
+
|
|
7
|
+
# scale_cell super_cell pertub convert_config convert_images
|
|
8
|
+
def test_convert_config():
|
|
9
|
+
res_list = []
|
|
10
|
+
configs = json.load(open("./config.json"))["convert_image"]
|
|
11
|
+
save_dir = "./test_workdir"
|
|
12
|
+
for config in configs:
|
|
13
|
+
config_file = config["input_file"]
|
|
14
|
+
config_format= config["input_format"]
|
|
15
|
+
if "atom_types" in config.keys():
|
|
16
|
+
atom_types = config["atom_types"]
|
|
17
|
+
else:
|
|
18
|
+
atom_types = None
|
|
19
|
+
for format in ["pwmat/config","vasp/poscar","lammps/lmp"]:
|
|
20
|
+
cmd_list = ["", "cvt_config", "-i", config_file, "-f", config_format, "-s", os.path.join(save_dir, "{}_{}".format("cvtcnf", FORMAT.get_filename_by_format(format))), "-o", format, "-c"]
|
|
21
|
+
if atom_types is not None:
|
|
22
|
+
cmd_list.append("-t")
|
|
23
|
+
cmd_list.extend(atom_types)
|
|
24
|
+
main(cmd_list)
|
|
25
|
+
res_list.append(cmd_list)
|
|
26
|
+
return res_list
|
|
27
|
+
|
|
28
|
+
def test_scale_cell():
|
|
29
|
+
res_list = []
|
|
30
|
+
configs = json.load(open("./config.json"))["convert_image"]
|
|
31
|
+
save_dir = "./test_workdir"
|
|
32
|
+
for idi, config in enumerate(configs):
|
|
33
|
+
config_file = config["input_file"]
|
|
34
|
+
config_format= config["input_format"]
|
|
35
|
+
if "atom_types" in config.keys():
|
|
36
|
+
atom_types = config["atom_types"]
|
|
37
|
+
else:
|
|
38
|
+
atom_types = None
|
|
39
|
+
for idj, format in enumerate(["pwmat/config","vasp/poscar","lammps/lmp"]):
|
|
40
|
+
save_path = os.path.join(save_dir, "scale_{}_{}_{}".format(idi, idj, FORMAT.get_filename_by_format(format)))
|
|
41
|
+
cmd_list = ["", "scale_cell", "-r", "0.98", "0.99", "0.97", "0.95", "-i", config_file, "-s", save_path, "-o", format, "-c"]#"-f", config_format,
|
|
42
|
+
if atom_types is not None:
|
|
43
|
+
cmd_list.append("-t")
|
|
44
|
+
cmd_list.extend(atom_types)
|
|
45
|
+
main(cmd_list)
|
|
46
|
+
res_list.append(cmd_list)
|
|
47
|
+
return res_list
|
|
48
|
+
|
|
49
|
+
def test_super_cell():
|
|
50
|
+
res_list = []
|
|
51
|
+
configs = json.load(open("./config.json"))["convert_image"]
|
|
52
|
+
save_dir = "./test_workdir"
|
|
53
|
+
for idi, config in enumerate(configs):
|
|
54
|
+
config_file = config["input_file"]
|
|
55
|
+
config_format= config["input_format"]
|
|
56
|
+
if "atom_types" in config.keys():
|
|
57
|
+
atom_types = config["atom_types"]
|
|
58
|
+
else:
|
|
59
|
+
atom_types = None
|
|
60
|
+
for idj, format in enumerate(["pwmat/config","vasp/poscar","lammps/lmp"]):
|
|
61
|
+
save_path = os.path.join(save_dir, "super_{}_{}_{}".format(idi, idj, FORMAT.get_filename_by_format(format)))
|
|
62
|
+
cmd_list = ["", "super_cell", "-m", "2", "3", "4", "-i", config_file, "-s", save_path, "-o", format, "-c"]# "-f", config_format,
|
|
63
|
+
if atom_types is not None:
|
|
64
|
+
cmd_list.append("-t")
|
|
65
|
+
cmd_list.extend(atom_types)
|
|
66
|
+
main(cmd_list)
|
|
67
|
+
res_list.append(cmd_list)
|
|
68
|
+
return res_list
|
|
69
|
+
|
|
70
|
+
def test_pertub():
|
|
71
|
+
res_list = []
|
|
72
|
+
configs = json.load(open("./config.json"))["convert_image"]
|
|
73
|
+
save_dir = "./test_workdir"
|
|
74
|
+
for idi, config in enumerate(configs):
|
|
75
|
+
config_file = config["input_file"]
|
|
76
|
+
config_format= config["input_format"]
|
|
77
|
+
if "atom_types" in config.keys():
|
|
78
|
+
atom_types = config["atom_types"]
|
|
79
|
+
else:
|
|
80
|
+
atom_types = None
|
|
81
|
+
for idj, format in enumerate(["pwmat/config","vasp/poscar","lammps/lmp"]):
|
|
82
|
+
save_path = os.path.join(save_dir, "perturb_{}_{}_{}".format(idi, idj, FORMAT.get_filename_by_format(format).split('.')[0]))
|
|
83
|
+
cmd_list = ["", "perturb", "-e", "0.01", "-d", "0.04", "-n", "20", "-i", config_file, "-s", save_path, "-o", format, "-c"]#"-f", config_format,
|
|
84
|
+
if atom_types is not None:
|
|
85
|
+
cmd_list.append("-t")
|
|
86
|
+
cmd_list.extend(atom_types)
|
|
87
|
+
main(cmd_list)
|
|
88
|
+
res_list.append(cmd_list)
|
|
89
|
+
return res_list
|
|
90
|
+
|
|
91
|
+
def test_convert_configs():
|
|
92
|
+
res_list = []
|
|
93
|
+
configs = json.load(open("./config.json"))["convert_configs"]
|
|
94
|
+
save_dir = "./test_workdir"
|
|
95
|
+
for idi, config in enumerate(configs):
|
|
96
|
+
config_file = config["input_file"]
|
|
97
|
+
if isinstance(config_file, str):
|
|
98
|
+
config_file = [config_file]
|
|
99
|
+
|
|
100
|
+
for _ in config_file:
|
|
101
|
+
if not os.path.exists(_):
|
|
102
|
+
print("{} not exists".format(_))
|
|
103
|
+
config_format= config["input_format"]
|
|
104
|
+
if "atom_types" in config.keys():
|
|
105
|
+
atom_types = config["atom_types"]
|
|
106
|
+
else:
|
|
107
|
+
atom_types = None
|
|
108
|
+
|
|
109
|
+
# res = search_images(config_file, config_format)
|
|
110
|
+
# print(res)
|
|
111
|
+
# if config_format == FORMAT.meta:
|
|
112
|
+
# print()
|
|
113
|
+
for idj, format in enumerate([FORMAT.pwmlff_npy, FORMAT.extxyz]):
|
|
114
|
+
save_path = os.path.join(save_dir, "{}_{}_{}_{}".format(idi, idj, config_format.replace('/','_'), FORMAT.get_filename_by_format(format).split('.')[0]))
|
|
115
|
+
cmd_list = ["", "convert_configs"]
|
|
116
|
+
cmd_list.append("-i")
|
|
117
|
+
cmd_list.extend(config_file)
|
|
118
|
+
cmd_list.extend([ "-s", save_path, "-o", format, "-p", "1.0", "-r", "-g", "1", "-m", '1'])#"-f", config_format,
|
|
119
|
+
if atom_types is not None:
|
|
120
|
+
cmd_list.append("-t")
|
|
121
|
+
cmd_list.extend(atom_types)
|
|
122
|
+
main(cmd_list)
|
|
123
|
+
res_list.append(cmd_list)
|
|
124
|
+
return res_list
|
|
125
|
+
|
|
126
|
+
def test_meata_data():
|
|
127
|
+
res_list = []
|
|
128
|
+
# res = search_images(config_file, config_format)
|
|
129
|
+
# print(res)
|
|
130
|
+
atom_types = ["Pt", "Ge"]
|
|
131
|
+
save_dir = "./test_workdir"
|
|
132
|
+
for idj, format in enumerate([FORMAT.extxyz]):
|
|
133
|
+
save_path = os.path.join(save_dir, "test_{}_meta_{}".format(idj, FORMAT.get_filename_by_format(format).split('.')[0]))
|
|
134
|
+
cmd_list = ["", "convert_configs"]
|
|
135
|
+
cmd_list.append("-i")
|
|
136
|
+
cmd_list.append("./meta_data.json")
|
|
137
|
+
cmd_list.extend([ "-s", save_path, "-o", format, "-p", "0.8", "-r"])#, "-c", "10" , "-q", "HfGeH" "-f", "meta",
|
|
138
|
+
if atom_types is not None:
|
|
139
|
+
cmd_list.append("-t")
|
|
140
|
+
cmd_list.extend(atom_types)
|
|
141
|
+
main(cmd_list)
|
|
142
|
+
res_list.append(cmd_list)
|
|
143
|
+
for res in res_list:
|
|
144
|
+
print(" ".join(res))
|
|
145
|
+
|
|
146
|
+
if __name__ == "__main__":
|
|
147
|
+
# run_cmd(["", "-h"])
|
|
148
|
+
# run_cmd(["", "cvt_config", "-h"])
|
|
149
|
+
# run_cmd(["", "scale_cell", "-h"])
|
|
150
|
+
# run_cmd(["", "super_cell", "-h"])
|
|
151
|
+
# run_cmd(["", "perturb", "-h"])
|
|
152
|
+
# run_cmd(["", "cvt_configs", "-h"])
|
|
153
|
+
os.chdir(os.path.join(os.path.dirname(os.path.dirname(__file__)), "examples"))
|
|
154
|
+
cmd_list = []
|
|
155
|
+
cmd_list.extend(test_scale_cell())
|
|
156
|
+
cmd_list.extend(test_super_cell())
|
|
157
|
+
cmd_list.extend(test_pertub())
|
|
158
|
+
cmd_list.extend(test_convert_config())
|
|
159
|
+
cmd_list.extend(test_convert_configs())
|
|
160
|
+
|
|
161
|
+
for cmd in cmd_list:
|
|
162
|
+
print(" ".join(cmd))
|
|
163
|
+
|
|
164
|
+
# test_meata_data()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pwdata
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.4
|
|
4
4
|
Summary: pwdata is a data pre-processing tool for PWMLFF, which can be used to extract features and labels. It also provides convenient interfaces for data conversion between different software.
|
|
5
5
|
Home-page: https://github.com/LonxunQuantum/pwdata
|
|
6
6
|
Author: LonxunQuantum
|
|
@@ -21,6 +21,7 @@ pwdata/movement_saver.py
|
|
|
21
21
|
pwdata/outcar.py
|
|
22
22
|
pwdata/poscar.py
|
|
23
23
|
pwdata/pwmlff.py
|
|
24
|
+
pwdata/test.py
|
|
24
25
|
pwdata.egg-info/PKG-INFO
|
|
25
26
|
pwdata.egg-info/SOURCES.txt
|
|
26
27
|
pwdata.egg-info/dependency_links.txt
|
|
@@ -59,5 +60,7 @@ pwdata/pertub/__init__.py
|
|
|
59
60
|
pwdata/pertub/perturbation.py
|
|
60
61
|
pwdata/pertub/scale.py
|
|
61
62
|
pwdata/test/__init__.py
|
|
63
|
+
pwdata/test/mdtrajs2config.py
|
|
64
|
+
pwdata/test/mptraj2lmdb.py
|
|
62
65
|
pwdata/utils/__init__.py
|
|
63
66
|
pwdata/utils/constant.py
|
|
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
|
|
|
5
5
|
|
|
6
6
|
setuptools.setup(
|
|
7
7
|
name="pwdata",
|
|
8
|
-
version="0.4.
|
|
8
|
+
version="0.4.4",
|
|
9
9
|
author="LonxunQuantum",
|
|
10
10
|
author_email="lonxun@pwmat.com",
|
|
11
11
|
description="pwdata is a data pre-processing tool for PWMLFF, which can be used to extract features and labels. It also provides convenient interfaces for data conversion between different software.",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|