Selfies

Latest version: v2.1.2

Safety actively analyzes 681912 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

2.1.2

- Fixed recursion bug for very long molecules (thanks haydn-jones)
- Added warning when dot-symbol (".") exists in peculiar cases (thanks vandrw)

2.1.1

- Fixed index bug in attribution

2.1.0

Changed:
- Dropped support for Python 3.5-3.6 and will continue to support only current Python versions.

Added:
- optional attribution to map encoder/decoder output string back to input string (Issue 48, 79)

2.0.0

Changed:
- Improved SMILES parsing (by using adjacencey lists internally), with tighter error handling
(e.g. issues 62 and 60).
- Faster and improved kekulization algorithm (issue 55 fixed).
- Support for symbols that are constrained to 0 bonds (e.g., `[CH4]`) or >8 bonds
(users can now specify custon bond constraints with over 8 bonds).
- New `strict=True` flag to `selfies.encoder`, which raises an error if the input
SMILES violates the current bond constraints. `True` by default, can be `False` for speed-up (if
SMILES are guaranteed to be correct).
- Added bond constraints for B (max. 3 bonds) to the default and preset constraints.
- Updated the syntax of SELFIES symbols to be cleaner and more readable.
- Removing `expl` from atomic symbols, e.g., `[CHexpl]` becommes `[CH]`
- Cleaner branch symbols, e.g., `[BranchL_2]` becomes `[=BranchL]`
- Cleaner ring symbols, e.g., `[Expl=RingL]` becomes `[=RingL]`
- If you want to use the old symbols, use the `compatible=True` flag to `selfies.decoder`,
e.g., `sf.decoder('[C][C][Expl=Ring1]',compatible=True)` (not recommended!)
- More logically consistent behaviour of `[Ring]` symbols.
- Standardized SELFIES alphabet, i.e., no two symbols stand for the same atom/ion (issue 58), e.g.,
`[N+1]` and `[N+]` are equivalent now.
- Indexing symbols are now included in the alphabet returned by `selfies.get_semantic_robust_alphabet`.

Removed
- Removed `constraints` flag from `selfies.decoder`; please use `selfies.set_semantic_constraints()`
and pass in `"hypervalent"` or `"octet_rule"` instead.
- Removed `print_error` flag in `selfies.encoder` and `selfies.decoder`,
which now raise errors `selfies.EncoderError` and `selfies.DecoderError`, respectively.

Bug Fixes
- Potential chirality inversion of atoms making ring bonds (e.g. ``[CH]12CCC2CCNC1``):
fixed by inverting their chirality in ``selfies.encoder`` such that they are decoded with
the original chirality preserved.
- Failure to represent mismatching stereochemical specifications at ring bonds
(e.g. ``F/C=C/C/C=C\C``): fixed by adding new ring symbols (e.g. ``[-/RingL]``, ``[\/RingL]``, etc.).

---

1.0.4

Added:
* decoder option for relaxed hypervalence rules, `decoder(...,constraints='hypervalent')`
* decoder option for strict octet rules, `decoder(...,constraints='octet_rule')`
Bug Fix:
* Fixed constraint for Phosphorus

---

1.0.3

Added:
* Support for aromatic Si and Al (is not officially supported by Daylight SMILES, but RDKit supports it and examples exist in PubChem).

---

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.