Hello Yikan--

> I want to do ensemble simulation to search an ensemble to fit the SAXS data 
> with
> Xplor-NIH. The relative scripts are as follows:

...

> 
> But when I run this scripts I find that my ensemble weights are still 0.6, 
> 0.2,
> 0.2 in the result. I know Xplor-NIH can optimize the ensemble weights in the
> running; But how?
> 

Correct. That script uses fixed ensemble weights. A script with an
example of varying weights can be found in eginput/capsid/refine2.py
in the Xplor-NIH distribution. In brief, you want

from ensWeightsTools import create_EnsWeights
aWeights=create_EnsWeights("aWeights")

#This energy term implements regularization- so weights don't fluctuate wildly.
potList.append(aWeights)

#set the current ensemble weights
aWeights.setWeights( weights )

#set target weights, used in the regularization energy - by default 1/Ne
aWeights.setTargetWeights( weights )

#set the minimal weight is to 0.05 * 1/Ne  (Ne = enesemble size)
aWeights.setMinFrac(0.05) 
#aWeights.setFreedom('fix') # if uncommented, weights will not vary.

#these regularization force constants may need to be adjusted.
rampedParams.append(MultRamp(2500*ensembleSize,20*ensembleSize,
                             "ensWeights.setScale(VALUE)"))   #original scale 
50*ensembleSize (force constant at the begining), 0.1*ensembleSize (force 
constant at the end)


Then, to use these weights for a particular observable, use
the addEnsWeights method of the corresponding energy term. For
instance, for a SAXS term there are usually two terms: xray and
xrayCorrect you would have:

xray.addEnsWeights( aWeights )
xrayCorrect.addEnsWeights( aWeights )

best regards--
Charles
_______________________________________________
Xplor-nih mailing list
[email protected]
https://dcb.cit.nih.gov/mailman/listinfo/xplor-nih

Reply via email to