Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions package/CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ The rules for this file:
* 2.11.0

Fixes
* Fix doctests in universe.py for newer NumPy and optional rdkit
(Issue #3925, PR #5297)
* Fixes TypeError with np.int64 indexing in GSD Reader (Issue #5224)
* Fixed bug in add_transformations allowing non-callable transformations
(Issue #2558, PR #2558)
Expand Down
14 changes: 7 additions & 7 deletions package/MDAnalysis/core/universe.py
Original file line number Diff line number Diff line change
Expand Up @@ -1123,7 +1123,7 @@ def add_TopologyAttr(self, topologyattr, values=None):
>>> u = mda.Universe(PSF, DCD)
>>> u.add_TopologyAttr('tempfactors')
>>> u.atoms.tempfactors
array([0., 0., 0., ..., 0., 0., 0.])
array([0., 0., 0., ..., 0., 0., 0.], shape=(3341,))

.. versionchanged:: 0.17.0
Can now also add TopologyAttrs with a string of the name of the
Expand Down Expand Up @@ -1775,18 +1775,18 @@ def from_smiles(
--------
To create a Universe with 10 conformers of ethanol:

>>> from rdkit.Chem import AllChem
>>> u = mda.Universe.from_smiles('CCO', numConfs=10)
>>> u
>>> from rdkit.Chem import AllChem # doctest: +SKIP
>>> u = mda.Universe.from_smiles('CCO', numConfs=10) # doctest: +SKIP
>>> u # doctest: +SKIP
<Universe with 9 atoms>
>>> u.trajectory
>>> u.trajectory # doctest: +SKIP
<RDKitReader with 10 frames of 9 atoms>

To use a different conformer generation algorithm, like ETKDGv3:

>>> u = mda.Universe.from_smiles('CCO', rdkit_kwargs=dict(
>>> u = mda.Universe.from_smiles('CCO', rdkit_kwargs=dict( # doctest: +SKIP
... params=AllChem.ETKDGv3()))
>>> u.trajectory
>>> u.trajectory # doctest: +SKIP
<RDKitReader with 1 frames of 9 atoms>


Expand Down
Loading