-
Notifications
You must be signed in to change notification settings - Fork 836
/
pymatgen.io.babel.html
505 lines (373 loc) · 26.6 KB
/
pymatgen.io.babel.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pymatgen.io.babel module — pymatgen 2021.1.28 documentation</title>
<link rel="canonical" href="https://pymatgen.orgpymatgen.io.babel.html"/>
<script type="text/javascript" src="_static/js/modernizr.min.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/custom.css" type="text/css" />
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="pymatgen.io.cif module" href="pymatgen.io.cif.html" />
<link rel="prev" title="pymatgen.io.atat module" href="pymatgen.io.atat.html" />
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-33990148-1']);
_gaq.push(['_trackPageview']);
</script>
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" style="background: linear-gradient(0deg, rgba(23,63,162,1) 0%, rgba(0,70,192,1) 100%)" >
<a href="index.html" class="icon icon-home"> pymatgen
</a>
<div class="version">
2021.1.28
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="introduction.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="change_log.html">Change log</a></li>
<li class="toctree-l1"><a class="reference internal" href="usage.html">Usage</a></li>
<li class="toctree-l1"><a class="reference internal" href="team.html">Development Team</a></li>
<li class="toctree-l1"><a class="reference internal" href="references.html">References</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="modules.html">API Docs</a><ul class="current">
<li class="toctree-l2 current"><a class="reference internal" href="pymatgen.html">pymatgen package</a><ul class="current">
<li class="toctree-l3 current"><a class="reference internal" href="pymatgen.html#subpackages">Subpackages</a><ul class="current">
<li class="toctree-l4"><a class="reference internal" href="pymatgen.alchemy.html">pymatgen.alchemy package</a></li>
<li class="toctree-l4"><a class="reference internal" href="pymatgen.analysis.html">pymatgen.analysis package</a></li>
<li class="toctree-l4"><a class="reference internal" href="pymatgen.apps.html">pymatgen.apps package</a></li>
<li class="toctree-l4"><a class="reference internal" href="pymatgen.cli.html">pymatgen.cli package</a></li>
<li class="toctree-l4"><a class="reference internal" href="pymatgen.command_line.html">pymatgen.command_line package</a></li>
<li class="toctree-l4"><a class="reference internal" href="pymatgen.core.html">pymatgen.core package</a></li>
<li class="toctree-l4"><a class="reference internal" href="pymatgen.electronic_structure.html">pymatgen.electronic_structure package</a></li>
<li class="toctree-l4"><a class="reference internal" href="pymatgen.entries.html">pymatgen.entries package</a></li>
<li class="toctree-l4"><a class="reference internal" href="pymatgen.ext.html">pymatgen.ext package</a></li>
<li class="toctree-l4 current"><a class="reference internal" href="pymatgen.io.html">pymatgen.io package</a></li>
<li class="toctree-l4"><a class="reference internal" href="pymatgen.optimization.html">pymatgen.optimization package</a></li>
<li class="toctree-l4"><a class="reference internal" href="pymatgen.phonon.html">pymatgen.phonon package</a></li>
<li class="toctree-l4"><a class="reference internal" href="pymatgen.plugins.html">pymatgen.plugins package</a></li>
<li class="toctree-l4"><a class="reference internal" href="pymatgen.symmetry.html">pymatgen.symmetry package</a></li>
<li class="toctree-l4"><a class="reference internal" href="pymatgen.transformations.html">pymatgen.transformations package</a></li>
<li class="toctree-l4"><a class="reference internal" href="pymatgen.util.html">pymatgen.util package</a></li>
<li class="toctree-l4"><a class="reference internal" href="pymatgen.vis.html">pymatgen.vis package</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="pymatgen.html#submodules">Submodules</a></li>
<li class="toctree-l3"><a class="reference internal" href="pymatgen.html#module-pymatgen">Module contents</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">pymatgen</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content style-external-links">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html">Docs</a> »</li>
<li><a href="modules.html">pymatgen</a> »</li>
<li><a href="pymatgen.html">pymatgen package</a> »</li>
<li><a href="pymatgen.io.html">pymatgen.io package</a> »</li>
<li>pymatgen.io.babel module</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/materialsproject/pymatgen/blob/master/docs_rst/pymatgen.io.babel.rst" class="fa fa-github"> Edit on GitHub</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="module-pymatgen.io.babel">
<span id="pymatgen-io-babel-module"></span><h1>pymatgen.io.babel module<a class="headerlink" href="#module-pymatgen.io.babel" title="Permalink to this headline">¶</a></h1>
<p>OpenBabel interface module, which opens up access to the hundreds of file
formats supported by OpenBabel. Requires openbabel with python bindings to be
installed. Please consult the
<a class="reference external" href="http://openbabel.org/wiki/Main_Page">openbabel documentation</a>.</p>
<dl class="py class">
<dt id="pymatgen.io.babel.BabelMolAdaptor">
<em class="property">class </em><code class="sig-name descname">BabelMolAdaptor</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2021.1.28/pymatgen/io/babel.py#L34-L368"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.babel.BabelMolAdaptor" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Adaptor serves as a bridge between OpenBabel’s Molecule and pymatgen’s
Molecule.</p>
<p>Initializes with pymatgen Molecule or OpenBabel”s OBMol.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>mol</strong> – pymatgen’s Molecule/IMolecule or OpenBabel OBMol</p>
</dd>
</dl>
<dl class="py method">
<dt id="pymatgen.io.babel.BabelMolAdaptor.add_hydrogen">
<code class="sig-name descname">add_hydrogen</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2021.1.28/pymatgen/io/babel.py#L139-L143"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.babel.BabelMolAdaptor.add_hydrogen" title="Permalink to this definition">¶</a></dt>
<dd><p>Add hydrogens (make all hydrogen explicit).</p>
</dd></dl>
<dl class="py method">
<dt id="pymatgen.io.babel.BabelMolAdaptor.confab_conformers">
<code class="sig-name descname">confab_conformers</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">forcefield</span><span class="o">=</span><span class="default_value">'mmff94'</span></em>, <em class="sig-param"><span class="n">freeze_atoms</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">rmsd_cutoff</span><span class="o">=</span><span class="default_value">0.5</span></em>, <em class="sig-param"><span class="n">energy_cutoff</span><span class="o">=</span><span class="default_value">50.0</span></em>, <em class="sig-param"><span class="n">conf_cutoff</span><span class="o">=</span><span class="default_value">100000</span></em>, <em class="sig-param"><span class="n">verbose</span><span class="o">=</span><span class="default_value">False</span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2021.1.28/pymatgen/io/babel.py#L234-L300"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.babel.BabelMolAdaptor.confab_conformers" title="Permalink to this definition">¶</a></dt>
<dd><p>Conformer generation based on Confab to generate all diverse low-energy
conformers for molecules. This is different from rotor_conformer or
gen3d_conformer as it aims to not simply to find a low energy
conformation but to generate several different conformations.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>forcefield</strong> (<em>str</em>) – Default is mmff94. Options are ‘gaff’, ‘ghemical’,
‘mmff94’, ‘mmff94s’, and ‘uff’.</p></li>
<li><p><strong>freeze_atoms</strong> (<em>[</em><em>int</em><em>]</em>) – index of atoms to be freezed when performing
conformer search, default is None.</p></li>
<li><p><strong>rmsd_cutoff</strong> (<em>float</em>) – rmsd_cufoff, default is 0.5 Angstrom.</p></li>
<li><p><strong>energy_cutoff</strong> (<em>float</em>) – energy_cutoff, default is 50.0 kcal/mol.</p></li>
<li><p><strong>conf_cutoff</strong> (<em>float</em>) – max number of conformers to test,
default is 1 million.</p></li>
<li><p><strong>verbose</strong> (<em>bool</em>) – whether to display information on torsions found,
default is False.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>list of pymatgen Molecule objects for generated conformers.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>(list)</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="pymatgen.io.babel.BabelMolAdaptor.from_file">
<em class="property">static </em><code class="sig-name descname">from_file</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">filename</span></em>, <em class="sig-param"><span class="n">file_format</span><span class="o">=</span><span class="default_value">'xyz'</span></em>, <em class="sig-param"><span class="n">return_all_molecules</span><span class="o">=</span><span class="default_value">False</span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2021.1.28/pymatgen/io/babel.py#L320-L339"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.babel.BabelMolAdaptor.from_file" title="Permalink to this definition">¶</a></dt>
<dd><p>Uses OpenBabel to read a molecule from a file in all supported formats.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>filename</strong> – Filename of input file</p></li>
<li><p><strong>file_format</strong> – String specifying any OpenBabel supported formats.</p></li>
<li><p><strong>return_all_molecules</strong> – If <code class="docutils literal notranslate"><span class="pre">True</span></code>, will return a list of
<code class="docutils literal notranslate"><span class="pre">BabelMolAdaptor</span></code> instances, one for each molecule found in
the file. If <code class="docutils literal notranslate"><span class="pre">False</span></code>, will return only the first molecule.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>BabelMolAdaptor object or list thereof</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="pymatgen.io.babel.BabelMolAdaptor.from_molecule_graph">
<em class="property">static </em><code class="sig-name descname">from_molecule_graph</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">mol</span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2021.1.28/pymatgen/io/babel.py#L341-L352"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.babel.BabelMolAdaptor.from_molecule_graph" title="Permalink to this definition">¶</a></dt>
<dd><p>Read a molecule from a pymatgen MoleculeGraph object.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>mol</strong> – pymatgen MoleculeGraph object.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>BabelMolAdaptor object</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="pymatgen.io.babel.BabelMolAdaptor.from_string">
<em class="property">static </em><code class="sig-name descname">from_string</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">string_data</span></em>, <em class="sig-param"><span class="n">file_format</span><span class="o">=</span><span class="default_value">'xyz'</span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2021.1.28/pymatgen/io/babel.py#L354-L368"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.babel.BabelMolAdaptor.from_string" title="Permalink to this definition">¶</a></dt>
<dd><p>Uses OpenBabel to read a molecule from a string in all supported
formats.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>string_data</strong> – String containing molecule data.</p></li>
<li><p><strong>file_format</strong> – String specifying any OpenBabel supported formats.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>BabelMolAdaptor object</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="pymatgen.io.babel.BabelMolAdaptor.gen3d_conformer">
<code class="sig-name descname">gen3d_conformer</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2021.1.28/pymatgen/io/babel.py#L211-L232"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.babel.BabelMolAdaptor.gen3d_conformer" title="Permalink to this definition">¶</a></dt>
<dd><p>A combined method to first generate 3D structures from 0D or 2D
structures and then find the minimum energy conformer:</p>
<ol class="arabic simple">
<li><p>Use OBBuilder to create a 3D structure using rules and ring templates</p></li>
<li><p>Do 250 steps of a steepest descent geometry optimization with the
MMFF94 forcefield</p></li>
<li><p>Do 200 iterations of a Weighted Rotor conformational search
(optimizing each conformer with 25 steps of a steepest descent)</p></li>
<li><p>Do 250 steps of a conjugate gradient geometry optimization.</p></li>
</ol>
<p>Warning from openbabel docs:
For many applications where 100s if not 1000s of molecules need to be
processed, gen3d is rather SLOW. Sometimes this function can cause a
segmentation fault.
A future version of Open Babel will provide options for slow/medium/fast
3D structure generation which will involve different compromises
between speed and finding the global energy minimum.</p>
</dd></dl>
<dl class="py method">
<dt id="pymatgen.io.babel.BabelMolAdaptor.localopt">
<code class="sig-name descname">localopt</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">forcefield</span><span class="o">=</span><span class="default_value">'mmff94'</span></em>, <em class="sig-param"><span class="n">steps</span><span class="o">=</span><span class="default_value">500</span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2021.1.28/pymatgen/io/babel.py#L103-L114"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.babel.BabelMolAdaptor.localopt" title="Permalink to this definition">¶</a></dt>
<dd><p>A wrapper to pybel’s localopt method to optimize a Molecule.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>forcefield</strong> – Default is mmff94. Options are ‘gaff’, ‘ghemical’,
‘mmff94’, ‘mmff94s’, and ‘uff’.</p></li>
<li><p><strong>steps</strong> – Default is 500.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="pymatgen.io.babel.BabelMolAdaptor.make3d">
<code class="sig-name descname">make3d</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">forcefield</span><span class="o">=</span><span class="default_value">'mmff94'</span></em>, <em class="sig-param"><span class="n">steps</span><span class="o">=</span><span class="default_value">50</span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2021.1.28/pymatgen/io/babel.py#L116-L137"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.babel.BabelMolAdaptor.make3d" title="Permalink to this definition">¶</a></dt>
<dd><p>A wrapper to pybel’s make3D method generate a 3D structure from a
2D or 0D structure.
The 3D structure is made very quickly using a combination of rules
(e.g. sp3 atoms should have four bonds arranged in a tetrahedron) and
ring templates (e.g. cyclohexane is shaped like a chair). Once 3D
coordinates are generated, hydrogens are added and a quick local
optimization is carried out as default.</p>
<p>The generated 3D structure can have clashes or have high energy
structures due to some strain. Please consider to use the conformer
search or geometry optimization to further optimize the structure.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>forcefield</strong> – Default is mmff94. Options are ‘gaff’, ‘ghemical’,
‘mmff94’, ‘mmff94s’, and ‘uff’.</p></li>
<li><p><strong>steps</strong> – Default is 50.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="pymatgen.io.babel.BabelMolAdaptor.openbabel_mol">
<em class="property">property </em><code class="sig-name descname">openbabel_mol</code><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2021.1.28/pymatgen/io/babel.py"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.babel.BabelMolAdaptor.openbabel_mol" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns OpenBabel’s OBMol.</p>
</dd></dl>
<dl class="py method">
<dt id="pymatgen.io.babel.BabelMolAdaptor.pybel_mol">
<em class="property">property </em><code class="sig-name descname">pybel_mol</code><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2021.1.28/pymatgen/io/babel.py"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.babel.BabelMolAdaptor.pybel_mol" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns Pybel’s Molecule object.</p>
</dd></dl>
<dl class="py method">
<dt id="pymatgen.io.babel.BabelMolAdaptor.pymatgen_mol">
<em class="property">property </em><code class="sig-name descname">pymatgen_mol</code><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2021.1.28/pymatgen/io/babel.py"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.babel.BabelMolAdaptor.pymatgen_mol" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns pymatgen Molecule object.</p>
</dd></dl>
<dl class="py method">
<dt id="pymatgen.io.babel.BabelMolAdaptor.remove_bond">
<code class="sig-name descname">remove_bond</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">idx1</span></em>, <em class="sig-param"><span class="n">idx2</span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2021.1.28/pymatgen/io/babel.py#L145-L157"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.babel.BabelMolAdaptor.remove_bond" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove a bond from an openbabel molecule</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>idx1</strong> – The atom index of one of the atoms participating the in bond</p></li>
<li><p><strong>idx2</strong> – The atom index of the other atom participating in the bond</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="pymatgen.io.babel.BabelMolAdaptor.rotor_conformer">
<code class="sig-name descname">rotor_conformer</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span><span class="n">rotor_args</span></em>, <em class="sig-param"><span class="n">algo</span><span class="o">=</span><span class="default_value">'WeightedRotorSearch'</span></em>, <em class="sig-param"><span class="n">forcefield</span><span class="o">=</span><span class="default_value">'mmff94'</span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2021.1.28/pymatgen/io/babel.py#L159-L209"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.babel.BabelMolAdaptor.rotor_conformer" title="Permalink to this definition">¶</a></dt>
<dd><p>Conformer search based on several Rotor Search algorithms of openbabel.
If the input molecule is not 3D, make3d will be called (generate 3D
structure, add hydrogen, a quick localopt). All hydrogen atoms need
to be made explicit.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>rotor_args</strong> – pass args to Rotor Search in openbabel.
for “WeightedRotorSearch”: (conformers, geomSteps,
sampleRingBonds-default False)
for “SystematicRotorSearch”: (geomSteps-default 2500,
sampleRingBonds-default False)
for “RandomRotorSearch”: (conformers, geomSteps-default 2500,
sampleRingBonds-default False)</p></li>
<li><p><strong>algo</strong> (<em>str</em>) – Default is “WeightedRotorSearch”. Options are
“SystematicRotorSearch”, “RandomRotorSearch”, and
“WeightedRotorSearch”.</p></li>
<li><p><strong>forcefield</strong> (<em>str</em>) – Default is mmff94. Options are ‘gaff’, ‘ghemical’,
‘mmff94’, ‘mmff94s’, and ‘uff’.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="pymatgen.io.babel.BabelMolAdaptor.write_file">
<code class="sig-name descname">write_file</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">filename</span></em>, <em class="sig-param"><span class="n">file_format</span><span class="o">=</span><span class="default_value">'xyz'</span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2021.1.28/pymatgen/io/babel.py#L309-L318"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.babel.BabelMolAdaptor.write_file" title="Permalink to this definition">¶</a></dt>
<dd><p>Uses OpenBabel to output all supported formats.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>filename</strong> – Filename of file to output</p></li>
<li><p><strong>file_format</strong> – String specifying any OpenBabel supported formats.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
</dd></dl>
</div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
© Copyright 2011, Pymatgen Development Team
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
<div class="footer">This page uses <a href="http://analytics.google.com/">
Google Analytics</a> to collect statistics. You can disable it by blocking
the JavaScript coming from www.google-analytics.com.
<script type="text/javascript">
(function() {
var ga = document.createElement('script');
ga.src = ('https:' == document.location.protocol ?
'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
ga.setAttribute('async', 'true');
document.documentElement.firstChild.appendChild(ga);
})();
</script>
</div>
</body>
</html>