Releases: ale94mleon/moldrug
3.2.2 - 2022.12.12
Fixed
- Bug: The initial individual was not printed properly.
Removed
- Redundant code in
moldrug.utils.GA
3.2.0 - 2022.11.28
Fix
- Bug: The output error name when constraint fails has a idx prefix. E.g.
33_conf_27_error.pbz2
now is:idx_33_conf_27_error.pbz2
. Now it is easy to delete all of this files at the end of the simulation if they are not needed. (on the last version the naming was not changing)
Removed
moldrug.fitness.is_inside_box
- Bug:
constraint_check_inside_box
option for the cost functions ofmoldrug.fitness
3.1.0 - 2022.11.28
Added
moldrug.constraintconf.gen_aligned_conf
- In case that
moldrug.constraintconf.generate_conformers
fails withrdkit.Chem.AllChem.ConstrainedEmbed
it will try withmoldrug.constraintconf.gen_aligned_conf
. moldrug.fitness.is_inside_box
constraint_check_inside_box
arguments to the cost functions ofmoldrug.fitness
. If the coordinates of the constraint conformation are outside the box; use always local_only, by default False
Changed
- The output error name when constraint fails has a idx prefix. E.g. 33_conf_27_error.pbz2 now is: idx_33_conf_27_error.pbz2. Now it is easy to delete all of this files at the end of the simulation if they are not needed.
Fix
- Clean code.
- Improve docs.
3.0.3 - 2022.11.26
Added
- Warning in case
moldrug.utils.Local
ormoldrug.utils.GA
are called with a different MolDrug as they were initialized.
Changed
- Convert to absolute path
receptor_pdbqt_path
andvina_executable
(in case that it points to a file) inside ofmoldruf.fitness.__vinadock
.
Fixed
- Bug for hydrogens coordinates when constrain docking was used.
- Improve docs.
3.0.1 - 2022.11.24
Fixed
- Cleaning code.
- Sort the initial population based on the cost attribute when it is saved on disk.
- Improve docs.
3.0.0 - 2022.11.23
Changed
- Name of
moldrug.fitness.get_mol_cost
tomoldrug.fitness.__get_mol_cost
function. - The class
moldrug.utils.GA
does not have any more the methodroulette_wheel_selection
; now is part a function that could be called frommoldrug.utils
max
formax_conf
inmoldrug.constraintconf.constraintconf()
function.- Entrance point constraintconf was changed to constraintconf_moldrug and now it is link to
moldrug.cli.__constraintconf_cmd
insteadmoldrug.constrainconf.constraintconf_cmd
. - Name of the function
moldrug.fitness.vinadock
now ismoldrug.fitness.__vinadock
. - Name of the function
moldrug.cli.moldrug_cmd
now ismoldrug.cli.__moldrug_cmd
.
Fixed
- Cleaning the code
- If
vina_executable
is provided (to any cost function) and it represents a path. It will be try to convert to absolute path. Previously relative path to the executable were not understood properly. - Improve docs.
Added
ad4map
in all the cost functions of themoldrug.fitness
module. This parameters specify the path where the ad4 map files are. To use this feature you must have the AutoDcok Vina v1.2.3 of above. Now you can use the force fields of AD4 inside of Vina. Future release will extend the integration with this versions.moldrug.utils.to_dataframe
. THis function was previously isolated as a method of the classmoldrug.utils.GA
; now it could also be called as a function.kept_gens
attribute to theIndividual
s inside ofmoldrug.utils.GA
. This is a set that contains the generations for which the Individual was conserved.acceptance
attribute tomoldrug.utils.GA
. This is a dictionary that has as keyword the generation ID, and as values a dictionary with keywords:accepted
(number of generated molecules accepted on the current generation) andgenerated
(number of total molecules generated)- Print
Accepted rate= accepted / generated
during running. - Add hydrogens before create pdbt file with meeko when constrain docking i used.
seed_mol
ofmoldrug.utils.GA
now could be a list (or iterable in a general way) of RDKit molecules. This feature could be used to combine several MolDrug runs and create a final runs with this combined population.seed_mol
from the command line could be: a valid SMILES, a list of valid SMILES or a list of path to the_pop.pbz2
binary files. In the last case all the populations will be combined and sorted based on the cost attribute. If the result population is less thatpopsize
new structures will be generated to complete the initial population. The individuals of this initial population will be reinitialized and the cost function will be calculated.
2.1.12 - 2022.09.29
Added
score_only
bool parameter tomoldrug.fitness.get_mol_cost
.- Print starting date when MolDrug is called from the command line.
Removed
- Type Hints
int
for attributeidx
onmoldrug.utils.Individual
.
Changed
- If vina fails inside
moldrug.fitness.vinadock
; give as pdbqt the string "VinaFailed". - If the molecule has a molecular weight highest than
wt_cutoff
whenmoldrug.fitness.CostOnlyVina
(ormoldrug.fitness.CostMultiReceptorsOnlyVina
) is called; the pdbqt attribute of the returned Individual will be the string "TooHeavy" (or the list of strings List["TooHeavy"])
2.1.7 - 2022.09.02
Fixed
- Bug on
moldrug.fitness.vinadock
during searching of MCS betweenIndividual.mol
andconstraint_ref
. Before was needed to manually specified the atom ids of theseed_mol
that matchconstraint_ref
, now it is not needed any more. - Bug during handling exception in
moldrug.constraintconf.generate_conformers
. - Bug during handling exception
moldrug.constraintconf.generate_conformers
inmoldrug.fitness.vinadock
. - Bug(s) when constraint docking is used on different vina versions. The output of vina is not the same and therefore
moldrug.fitness.vinadock
failed.
Changed
- In case
constraint = True
inmoldrug.fitness.vinadock
,ref_smi
will be the the MCF betweenindividual.mol
amdconstraint_ref
instead the SMILES string ofconstraint_ref
whenmoldrug.constrainconf.generate_conformers
is internally called.
Added
moldrug.fitness.get_mol_cost
function.- Attribute
genID
to the generated individuals during amoldrug.utils.GA
run.
2.1.0 - 2022.08.30
Fixed
- Bug during the calculation of probabilities when costs are larger numbers.
- Expose hidden error if some Exception ocurred during parallel run.
Added
moldrug.constrainconf
module.- Raise
ValueError
ifref_smi
is invalid inmoldrug.utils.constrainconf.generate_conformers
.
Changed
- In case
constraint = True
inmoldrug.fitness.vinadock
,ref_smi
will be the SMILES string ofconstraint_ref
whenmoldrug.constrainconf.generate_conformers
is internally called. This is in order to avoid error whenmoldrug.utils.constrainconf.generate_conformers
tries to guessref_smi
based on MCS and fails, see this RDKit bug. The work around for constraint docking is explained here: Constraint Docking. moldrug.fitness.generate_conformers
does not fail. In case of Exception it returns the samemol
without conformers and write the error in a log file into the working directory.- The attribute name
bestcost
bybest_cost
ofmoldrug.utils.GA
. - The functions
duplicate_conformers
,get_mcs
,generate_conformers
,constraintconf
andconstraintconf_cmd
and the classProteinLigandClashFilter
were moved frommoldrug.fitness
module tomoldrug.constrainconf
module. - Entrance point constraintconf now it is link to
moldrug.constrainconf.constraintconf_cmd
insteadmoldrug.fitness.constraintconf_cmd
.
2.0.0 - 2022.08.25
Added
-
The functions
duplicate_conformers
,get_mcs
,generate_conformers
,constraintconf
andconstraintconf_cmd
and the classProteinLigandClashFilter
. The code was borrowed from Pat Walters. It is used if constraint docking is needed. -
constraintconf
can be called from the command line. -
moldrug.fitness.vinadock()
a simple wrapper around vina. This function will be used for all the implemented cost functions inside of the modulemoldrug.fitness
. It could be used for constraint docking. -
moldrug.data.constraintref
. This module is used for testing in case constraint docking is needed. It has two MolBlock strings:r_6lu7
andr_x0161
. That could be easily converted in RDKit molecules..from rdkit import Chem from moldrug.data import constraintref mol = Chem.MolFromMolBlock(constraintref.r_x0161)
This molecule is needed for the keyword argument
constraint_ref
of the functions of themoldrug.fitness
module in case of constraint docking is used. -
Constraint docking capability in all implemented cost functions of the module
moldrug.fitness
. -
moldrug.data.receptor_pdb
. This module is similar tomoldrug.data.receptor_pdbqt
but in pdb format. -
Documentation and tutorials.
Changed
moldrug.utils.make_sdf
only will create the sdf file based on thepdbqt
attribute. Ifpdbqt
is a list, it will work as previous version works withpdbqts
attribute.- Name of the module
moldrug.data.receptors
tomoldrug.data.receptor_pdbqt
. - Name of keyword argument
receptor_path
toreceptor_pdbqt_path
on the cost functions:moldrug.fitness.Cost
andmoldrug.fitness.CostOnlyVina
. - Name of keyword arguments
receptor_path
,vina_score_types
,boxcenters
andboxsizes
toreceptor_pdbqt_path
,vina_score_type
,boxcenter
andboxsize
respectively on the cost functions:moldrug.fitness.CostMultiReceptors
andmoldrug.fitness.CostMultiReceptorsOnlyVina
. smiles
attribute inmoldrug.utils.Individual
now it is always without explicit Hs, despite if the mol attribute has them.