6
6
7
7
from mp_api .client .routes .molecules .summary import MoleculesSummaryRester
8
8
9
- excluded_params = [
10
- "sort_fields" ,
11
- "chunk_size" ,
12
- "num_chunks" ,
13
- "all_fields" ,
14
- "fields" ,
15
- "has_solvent" ,
16
- "exclude_elements" ,
17
- # Below: currently timing out
18
- "nelements" ,
19
- "has_props" ,
20
- ]
9
+ excluded_params = ["sort_fields" , "chunk_size" , "num_chunks" , "all_fields" , "fields" , "exclude_elements" ]
21
10
22
11
alt_name = {"formula" : "formula_alphabetical" , "molecule_ids" : "molecule_id" }
23
12
24
13
custom_field_tests = {
25
- "molecule_ids" : ["9f153b9f3caa3124fb404b42e4cf82c8-C2H4-0 -1" ],
14
+ "molecule_ids" : ["351ef090ebd90b661a4e1205756f6957-C1Mg1N2O1S1-m2 -1" ],
26
15
"formula" : "C2 H4" ,
27
16
"chemsys" : "C-H" ,
28
- "elements" : ["C" , "H " ],
17
+ "elements" : ["P " ],
29
18
"has_solvent" : "DIELECTRIC=18,500;N=1,415;ALPHA=0,000;BETA=0,735;GAMMA=20,200;PHI=0,000;PSI=0,000" ,
30
19
"has_level_of_theory" : "wB97X-V/def2-TZVPPD/SMD" ,
31
20
"has_lot_solvent" : "wB97X-V/def2-TZVPPD/SMD(SOLVENT=THF)" ,
32
21
"nelements" : 2 ,
22
+ "charge" : 1 ,
23
+ "spin_multiplicity" : 1 ,
33
24
"has_props" : [HasProps .orbitals ],
34
25
} # type: dict
35
26
36
27
37
- @pytest .mark .skipif (
38
- os .environ .get ("MP_API_KEY" , None ) is None , reason = "No API key found."
39
- )
28
+ @pytest .mark .skipif (os .environ .get ("MP_API_KEY" , None ) is None , reason = "No API key found." )
40
29
def test_client ():
41
30
search_method = MoleculesSummaryRester ().search
42
31
@@ -49,6 +38,7 @@ def test_client():
49
38
if param not in excluded_params :
50
39
param_type = entry [1 ].__args__ [0 ]
51
40
q = None
41
+
52
42
print (param )
53
43
54
44
if param in custom_field_tests :
0 commit comments