Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use numpy in place of flex for large parts of cosym analysis #1581

Merged
merged 21 commits into from
Feb 17, 2021

Conversation

rjgildea
Copy link
Contributor

@rjgildea rjgildea commented Feb 5, 2021

Since we are using various scipy routines already (e.g. for cluster analysis), this removes many interconversions between flex and numpy arrays. Conversion between flex/numpy arrays is now mostly limited to the wrapper around scitbx.lbfgs. These changes also enable the addition of an option to use scipy L-BFGS-B minimization engine (minimization.engine=scipy).

This appears to be a consequence of using np.random.rand in place
of flex.random_double to initialise the starting coordinates. As
a result the automatic determination of number of dimensions chooses
7 instead of 6 dimensions, which seems to tip the balance from
success to failure. This highlights that this probably isn't the
most robust test case - the resulting likelihood for the correct
space group isn't particularly high, even when the test is working.
@codecov
Copy link

codecov bot commented Feb 6, 2021

Codecov Report

Merging #1581 (623e50f) into master (c125d54) will decrease coverage by 0.00%.
The diff coverage is 87.64%.

@@            Coverage Diff             @@
##           master    #1581      +/-   ##
==========================================
- Coverage   66.71%   66.71%   -0.01%     
==========================================
  Files         616      616              
  Lines       69304    69278      -26     
  Branches     9571     9569       -2     
==========================================
- Hits        46236    46216      -20     
+ Misses      21135    21129       -6     
  Partials     1933     1933              

@rjgildea rjgildea merged commit fa83ed1 into master Feb 17, 2021
@rjgildea rjgildea deleted the cosym-numpy branch February 17, 2021 10:30
rjgildea added a commit to xia2/xia2 that referenced this pull request Feb 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants