Releases: lukasturcani/stk
Releases · lukasturcani/stk
v2021.5.26.0
- (#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 singleBuildingBlock
. - (#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
No code changes here, just various improvements to the CI.
v2021.04.26.0
- @andrewtarzia added the
PeriodicCollapser
. This is anOptimizer
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 thePeriodicInfo
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
- @lukasturcani and @andrewtarzia added the
Optimizer
interface for topology graphs - @andrewtarzia added optimizers for topology graphs, which use https://github.com/andrewtarzia/MCHammer
- @andrewtarzia added unaligning vertices for COFs
v2020.12.26
- @lukasturcani added
AtomInfo.get_building_block_atom()
. This method allows users to determine which atom of aBuildingBlock
an atom in aConstructedMolecule
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 aMutationRecord
instance. However, it can now return aMutationRecord
instance orNone
. This is necessary because sometimes a givenMutator
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 methodMolecule.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
- @lukasturcani Fixed an bug occurs when a
ConstructedMolecule
is also used as aBuildingBlock
, and both are deposited in aConstructedMoleculeMongoDb
. For example, if you constructed a polymer, and then used it to construct a rotaxane, and deposited both the polymer and the rotaxane into aConstructedMoleculeMongoDb
, in that order, the structure of the polymer in theConstructedMoleculeMongoDb
would be corrupted, because it would not have canonical atom ordering. Now, wheneverwith_canonical_atom_ordering
is called on aConstructedMolecule
, the building blocks in theConstructedMolecule
, 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
- @andrewtarzia Renamed the vector parameters in
PeriodicInfo
.
v2020.08.27.0
- @lukasturcani Fixed #236
v2020.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 fromposition_matrices
tobuilding_block_position_matrices
in theMoleculeMongoDb
class. This should make the default collection consistent withConstructedMoleculeMongoDb
. #234 #229 . Users using the default value will receive a warning.
v2020.08.23.0
- @andrewtarzia Added
get_all()
to the interface of molecular databases. You can now go through all molecules deposited in anstk
database! #186 #220 - @andrewtarzia Fixed an issue with
with_canonical_atom_ordering()
not working correctly in the case of dative bonds. #224 #225