Stk

Latest version: v2024.3.28.0

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

Scan your dependencies

Page 5 of 6

2020.12.26

* lukasturcani added `AtomInfo.get_building_block_atom()`. This method allows users to determine which atom of a `BuildingBlock` an atom in a `ConstructedMolecule` originates from.
* lukasturcani added `Molecule.get_canonical_atom_ids()`. This method gives a mapping of the current atom ids of a molecule to their canonical ids.
* andrewtarzia added `ReactionResult.get_deleted_bonds()`. This API will allows us to add reactions in the future which can remove bonds during construction. Before this API was added, bonds could only be removed if one of the atoms involved in the bond was removed too.
* andrewtarzia updated documentation of topology graphs to specify the number of functional groups required on building blocks placed on topology graph vertices.
* andrewtarzia fixed issue 184, where rotations on building blocks would also perform an undesired scaling. This was because the rotation matrices used in the implementation were not getting normalized, which they now are.
* lukasturcani updated the interface of `Mutator.mutate()`. Previously this method returned a `MutationRecord` instance. However, it can now return a `MutationRecord` instance or `None`. This is necessary because sometimes a given `Mutator` cannot do a valid mutation on the provided molecule. In cases like this, `None` can be returned. This is not a substitute for error handling, it is meant to signify the specific case where a molecule does not satisfy some preconditions necessary for carrying out the mutation.
* andrewtarzia added support for updating the structure of a `Molecule` from pdb files. The method `Molecule.with_structure_from_file()` can now be used with pdb files.
* lukasturcani changed the representation of a molecule (i.e. `print(some_molecule)`) to be less verbose. The representation of a molecule will not only contain its memory address. The list of atoms, list of bonds and the position matrix have been removed from the default representation.

2020.09.17.0

* lukasturcani Fixed an bug occurs when a `ConstructedMolecule` is also used as a `BuildingBlock`, and both are deposited in a `ConstructedMoleculeMongoDb`. For example, if you constructed a polymer, and then used it to construct a rotaxane, and deposited both the polymer and the rotaxane into a `ConstructedMoleculeMongoDb`, in that order, the structure of the polymer in the `ConstructedMoleculeMongoDb` would be corrupted, because it would not have canonical atom ordering. Now, whenever `with_canonical_atom_ordering` is called on a `ConstructedMolecule`, the building blocks in the `ConstructedMolecule`, will also have canonical atom ordering, this was not the case previously.

Example of code where the bug would have occurred

python

import stk
import pymongo

client = pymongo.MongoClient()

cdb = stk.ConstructedMoleculeMongoDb(
mongo_client=client,
database='reorganization-test',
)

polymer = stk.ConstructedMolecule(
topology_graph=stk.polymer.Linear(
building_blocks=(
stk.BuildingBlock(
smiles='BrCCBr',
functional_groups=[stk.BromoFactory()],
),
),
repeating_unit='A',
num_repeating_units=2,
),
)

cycle = stk.ConstructedMolecule(
topology_graph=stk.macrocycle.Macrocycle(
building_blocks=(
stk.BuildingBlock(
smiles='BrCCCCBr',
functional_groups=[stk.BromoFactory()],
),
),
repeating_unit='A',
num_repeating_units=5,
),
)

rotaxane = stk.ConstructedMolecule(
topology_graph=stk.rotaxane.NRotaxane(
axle=stk.BuildingBlock.init_from_molecule(polymer),
cycles=(
stk.BuildingBlock.init_from_molecule(cycle),
),
repeating_unit='A',
num_repeating_units=4,
),
)

cdb.put(polymer)
cdb.put(cycle)
Depositing the rotaxane corrupts the position matrix of the polymer and cycle,
because it deposits them without canonical atom ordering.
cdb.put(rotaxane)

2020.08.28.0

* andrewtarzia Renamed the vector parameters in `PeriodicInfo`.

2020.08.27.0

* lukasturcani Fixed 236

2020.08.25.0

* andrewtarzia Added molecular writers as a separate api to ``Molecule.write()``. ``Molecule.write()`` will be deprecated in a future release. The new writers can now write periodic information to files! 217
* andrewtarzia Added new periodic COF topologies which provide access to periodic information.
* The default value of the ``position_matrix_collection`` parameter has been changed from ``position_matrices`` to ``building_block_position_matrices`` in the ``MoleculeMongoDb`` class. This should make the default collection consistent with ``ConstructedMoleculeMongoDb``. 234 229 . Users using the default value will receive a warning.

2020.08.23.0

* andrewtarzia Added ``get_all()`` to the interface of molecular databases. You can now go through all molecules deposited in an ``stk`` database! 186 220
* andrewtarzia Fixed an issue with ``with_canonical_atom_ordering()`` not working correctly in the case of dative bonds. 224 225

Page 5 of 6

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.