ExcitedStates / qfit-3.0

qFit: Automated and unbiased multi-conformer models from X-ray and EM maps.
MIT License
35 stars 11 forks source link

Cvxpy reduce main #402

Closed dhogan-io closed 7 months ago

dhogan-io commented 7 months ago

use CVXPY to solve QP and MIQP problems, removing CPLEX

Solve QP and MIQP problems with CVXPY (which in turn calls SCIP). Due to some portions of qfit calling the solver with identical matrix rows, those must be removed before attempting optimization since identical rows cause optimal solutions not to be unique. Rows are removed by iterating through the rows, removing any that have L2 distance below a threshold when compared to any row seen before. The indices of removed rows are tracked, and that info is used to construct a self.weights that maintains compatibility.

Some of the implementation is kludgy due to maintaining compatibility with the CPLEX solver and tests have not been updated.

dhogan-io commented 7 months ago

Closes #361