Skip to content

Releases: lukasturcani/stk

v2021.5.26.0

26 May 08:32
Compare
Choose a tag to compare
  • (#343) @lukasturcani changed construction slightly to prevent non-determinism due to the use of the svd algorithm. Most molecular structures should be unaffected.
  • (#338) @lukasturcani made changes to the polymer.Linear topology graph so that it can be used to create a polymer consisting of a single BuildingBlock.
  • (#337) @lukasturcani removed a bunch of deprecation warnings, as well as the deprecated features they were warning about.
  • (#332) @andrewtarzia added a warning to the Macrocycle topology graph for macrocycles consisting of 2 molecules, because in this case it may end up with crossed bonds.
  • (#326) @lukasturcani added caching of fitness values to the PropertyVector fitness calculator.
  • (#336) @lukasturcani changed updated all the code examples in the documentation to doctest blocks, which means they now get run and tested as part of CI.

v2021.04.27.0

27 Apr 19:41
74f124d
Compare
Choose a tag to compare

No code changes here, just various improvements to the CI.

v2021.04.26.0

26 Apr 13:33
Compare
Choose a tag to compare
  • @andrewtarzia added the PeriodicCollapser. This is an Optimizer which can be used with periodic molecules such as covalent organic frameworks. It uses https://github.com/andrewtarzia/MCHammer internally.
  • @lukasturcani added PeriodicConstructionResult which can be used to get the PeriodicInfo of a constructed molecule. TopologyGraph.get_periodic_info() has been deprecated. See #313 for a discussion on why.
  • @lukasturcani added ConstructedMolecule.init_from_construction_result().

v2021.03.11.0

11 Mar 23:26
4dc93dd
Compare
Choose a tag to compare

v2020.12.26

26 Dec 16:59
Compare
Choose a tag to compare
  • @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.

v2020.09.17.0

17 Sep 15:31
Compare
Choose a tag to compare
  • @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

    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)

v2020.08.28.0

28 Aug 10:37
Compare
Choose a tag to compare

v2020.08.27.0

27 Aug 15:55
Compare
Choose a tag to compare

v2020.08.25.0

25 Aug 19:57
Compare
Choose a tag to compare
  • @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.

v2020.08.23.0

23 Aug 11:20
56c8ad0
Compare
Choose a tag to compare
  • @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