@@ -29,9 +29,9 @@ def setUp(self):
29
29
30
30
def test_init (self ):
31
31
adaptor = BabelMolAdaptor (self .mol )
32
- obmol = adaptor .openbabel_mol
32
+ ob_mol = adaptor .openbabel_mol
33
33
pybel = adaptor .pybel_mol
34
- assert obmol .NumAtoms () == 5
34
+ assert ob_mol .NumAtoms () == 5
35
35
36
36
adaptor = BabelMolAdaptor (adaptor .openbabel_mol )
37
37
assert adaptor .pymatgen_mol .formula == "H4 C1"
@@ -55,8 +55,8 @@ def test_from_file_return_all_molecules(self):
55
55
def test_from_molecule_graph (self ):
56
56
graph = MoleculeGraph .with_empty_graph (self .mol )
57
57
adaptor = BabelMolAdaptor .from_molecule_graph (graph )
58
- obmol = adaptor .openbabel_mol
59
- assert obmol .NumAtoms () == 5
58
+ ob_mol = adaptor .openbabel_mol
59
+ assert ob_mol .NumAtoms () == 5
60
60
mol = adaptor .pymatgen_mol
61
61
assert mol .formula == "H4 C1"
62
62
@@ -70,9 +70,9 @@ def test_localopt(self):
70
70
self .mol [1 ] = "H" , [0 , 0 , 1.05 ]
71
71
adaptor = BabelMolAdaptor (self .mol )
72
72
adaptor .localopt ()
73
- optmol = adaptor .pymatgen_mol
74
- for site in optmol [1 :]:
75
- assert site .distance (optmol [0 ]) == approx (1.09216 , abs = 1e-1 )
73
+ opt_mol = adaptor .pymatgen_mol
74
+ for site in opt_mol [1 :]:
75
+ assert site .distance (opt_mol [0 ]) == approx (1.09216 , abs = 1e-1 )
76
76
77
77
def test_make3d (self ):
78
78
mol_0d = pybel .readstring ("smi" , "CCCC" ).OBMol
@@ -93,27 +93,27 @@ def test_rotor_search_wrs(self):
93
93
adaptor = BabelMolAdaptor (mol )
94
94
rotor_args = (250 , 50 )
95
95
adaptor .rotor_conformer (* rotor_args , algo = "WeightedRotorSearch" )
96
- optmol = adaptor .pymatgen_mol
97
- for site in optmol [1 :]:
98
- assert site .distance (optmol [0 ]) == approx (1.09216 , abs = 1e-1 )
96
+ opt_mol = adaptor .pymatgen_mol
97
+ for site in opt_mol [1 :]:
98
+ assert site .distance (opt_mol [0 ]) == approx (1.09216 , abs = 1e-1 )
99
99
100
100
def test_rotor_search_srs (self ):
101
101
mol = copy .deepcopy (self .mol )
102
102
mol [1 ] = "H" , [0 , 0 , 1.05 ]
103
103
adaptor = BabelMolAdaptor (mol )
104
104
adaptor .rotor_conformer (200 , algo = "SystematicRotorSearch" )
105
- optmol = adaptor .pymatgen_mol
106
- for site in optmol [1 :]:
107
- assert site .distance (optmol [0 ]) == approx (1.09216 , abs = 1e-1 )
105
+ opt_mol = adaptor .pymatgen_mol
106
+ for site in opt_mol [1 :]:
107
+ assert site .distance (opt_mol [0 ]) == approx (1.09216 , abs = 1e-1 )
108
108
109
109
def test_rotor_search_rrs (self ):
110
110
mol = copy .deepcopy (self .mol )
111
111
mol [1 ] = "H" , [0 , 0 , 1.05 ]
112
112
adaptor = BabelMolAdaptor (mol )
113
113
adaptor .rotor_conformer (250 , 50 , algo = "RandomRotorSearch" )
114
- optmol = adaptor .pymatgen_mol
115
- for site in optmol [1 :]:
116
- assert site .distance (optmol [0 ]) == approx (1.09216 , abs = 1e-1 )
114
+ opt_mol = adaptor .pymatgen_mol
115
+ for site in opt_mol [1 :]:
116
+ assert site .distance (opt_mol [0 ]) == approx (1.09216 , abs = 1e-1 )
117
117
118
118
def test_confab_conformers (self ):
119
119
mol = pybel .readstring ("smi" , "CCCC" ).OBMol
0 commit comments