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

run the checkensemble on Ubuntu #1

Open
ahmedo047 opened this issue Jun 10, 2015 · 13 comments
Open

run the checkensemble on Ubuntu #1

ahmedo047 opened this issue Jun 10, 2015 · 13 comments

Comments

@ahmedo047
Copy link

Hi,
I am trying to run the checkensemble.py script to check my simulation system is consistent with the nose-hoover thermostat and v-rescale. But I couldn't work it :(

After I downloaded the checkensemble:

-python checkensemble.py energy.xvg: this command doesn't work
-python checkensemble.py --help :Also this command doesn't work

How can I run the checkensemble? My OS is Ubuntu.

@mrshirts
Copy link
Contributor

What is the problem that you have? There are many, many, many ways to not work. Can you attach the result you get?

the command 'python' alone works, correct?

You're in the folder with checkensemble.py?

@ahmedo047
Copy link
Author

Yes. Python works alone. But checkensemble.py doesn't work.
ab@ab:~/Desktop/checkensemble-master/checkensemble$ python checkensemble.py energy.xvg
When I type above command, nothing happens.

@mrshirts
Copy link
Contributor

Did you try running the examples to see if they work?

@ahmedo047
Copy link
Author

Yes. I tried them. I get "import checkensemble" error for all examples. For instance:
ab@ab:~/Desktop/checkensemble-master/examples$ python harmonic_pressure.py
Traceback (most recent call last):
File "harmonic_pressure.py", line 9, in
import checkensemble
ImportError: No module named checkensemble

@mrshirts
Copy link
Contributor

I'll need to generate a setup.py script eventually, but for now, try putting the checkensemble folder in your PYTHONPATH

@mrshirts
Copy link
Contributor

Specifically, as it says in the README

"Until a proper setup.py is installed, add INSTALLDIR/checkensemble/checkensemble in the PYTHONPATH to run the scripts"

@ahmedo047
Copy link
Author

I added the following line to the .bashrc file in the home directory on ubuntu. Now all examples work.
export PYTHONPATH="${PYTHONPATH}:/home/ab/Desktop/checkensemble-master/checkensemble"

For the simulation with v-rescale I have only one energy.xvg. But you have used two input files to analysis. Why did you use two input files? And you have used two values for -t flag. Why? Can you explain a little bit why you used "i", "g", "e" and "v" flags?

python analyze-md.py --filetype gromacs -d example_data -f vrescale.argon.down.xvg vrescale.argon.up.xvg -t 132.915071475571 137.138128524429 -b 200 -i 20 -v -g vrescale -e total -s 12345 > vrescale.txt

@ahmedo047
Copy link
Author

We need the two files of different temperature for analysis. Why?

@ahmedo047
Copy link
Author

python analyze-md.py --help it explains each flag. But I couldn't understand why we need the two files of different temperature for analysis.

@mrshirts
Copy link
Contributor

Read the accompanying paper listed in the README first!

On Thu, Jun 11, 2015 at 8:39 AM, ahmedo047 notifications@github.com wrote:

python analyze-md.py --help it explains each flag. But I couldn't
understand why we need the two files of different temperature for analysis.


Reply to this email directly or view it on GitHub
#1 (comment)
.

@ahmedo047
Copy link
Author

I read it already. As far as I know, I need two energy files of different temperatures to check if a molecular simulation is consistent with the thermodynamic ensemble. That means I should perform two different simulations with the same parameters except temperature, right? For example at 298 K and 305 K.

@mrshirts
Copy link
Contributor

Yep, that is what the paper explains!

On Thu, Jun 11, 2015 at 10:09 AM, ahmedo047 notifications@github.com
wrote:

I read it already. As far as I know, I need two energy files of different
temperatures to check if a molecular simulation is consistent with the
thermodynamic ensemble. That means I should perform two different
simulations with the same parameters except temperature, right? For example
at 298 K and 305 K.


Reply to this email directly or view it on GitHub
#1 (comment)
.

@ahmedo047
Copy link
Author

I did two simulations of 1ns with NH thermostat in single precision at 288 K and 298 K. For each simulation I got the energy file including potential, kinetic, total, conserved energy and temperature using gmx energy tool. And then I putted those energy files (288.xvg and 298.xvg) into "example_data" folder.

When I used the following command to run the checkensemble, I got a lot of error. I ran all examples in the checkensemble before. They all work. But the checkensemble doesn't work for my input files :(. Do you have any suggestion to fix those warnings/errors?

ab@ab:~/Desktop/checkensemble-master/examples$ python analyze-md.py --filetype gromacs -d example_data -f 288.xvg 298.xvg -t 288.15 298.15 -b 200 -i 20 -v -g vrescale -e total -s 12345 > vrescale.txt

Warning: If the inherent timescales of the system are long compared to those being analyzed, this statistical inefficiency may be an underestimate. The estimate presumes the use of many statistically independent samples. Tests should be performed to assess whether this condition is satisfied. Be cautious in the interpretation of the data.
/home/ab/Desktop/checkensemble-master/checkensemble/checkensemble.py:910: RuntimeWarning: divide by zero encountered in divide
ratio = numpy.log(hlist[1]/hlist[0]) # this should have the proper exponential distribution
/home/ab/Desktop/checkensemble-master/checkensemble/checkensemble.py:910: RuntimeWarning: invalid value encountered in divide
ratio = numpy.log(hlist[1]/hlist[0]) # this should have the proper exponential distribution
/home/ab/Desktop/checkensemble-master/checkensemble/checkensemble.py:910: RuntimeWarning: divide by zero encountered in log
ratio = numpy.log(hlist[1]/hlist[0]) # this should have the proper exponential distribution
/home/ab/Desktop/checkensemble-master/checkensemble/checkensemble.py:911: RuntimeWarning: invalid value encountered in divide
dratio = numpy.sqrt((dhlist[0]/hlist[0])**2 + (dhlist[1]/hlist[1])**2)
/home/ab/Desktop/checkensemble-master/checkensemble/checkensemble.py:1020: RuntimeWarning: divide by zero encountered in divide
ratio = (hlist[1]/hlist[0]) # this should have the proper exponential distribution
/home/ab/Desktop/checkensemble-master/checkensemble/checkensemble.py:1020: RuntimeWarning: invalid value encountered in divide
ratio = (hlist[1]/hlist[0]) # this should have the proper exponential distribution
/home/ab/Desktop/checkensemble-master/checkensemble/checkensemble.py:1021: RuntimeWarning: invalid value encountered in divide
dratio = ratio_(numpy.sqrt((dhlist[0]/hlist[0])__2 + (dhlist[1]/hlist[1])_*2))
Traceback (most recent call last):
File "analyze-md.py", line 247, in
checkensemble.ProbabilityAnalysis(N_k,type=analysis_type,T_k=T_k,P_k=P_k,mu_k=mu_k,U_kn=U_kn,V_kn=V_kn,N_kn=N_kn,title=title,figname=figname,nbins=nbins,reptype='bootstrap',g=g,nboots=nboots,bMaxwell=(type=='kinetic'),bLinearFit=bLinearFit,bNonLinearFit=bNonLinearFit,bMaxLikelihood=bMaxLikelihood,seed=options.seed,kB=kB)
File "/home/ab/Desktop/checkensemble-master/checkensemble/checkensemble.py", line 1327, in ProbabilityAnalysis
fitvals = NonLinFit(bins,N_k,dp,const,vr,df=df)
File "/home/ab/Desktop/checkensemble-master/checkensemble/checkensemble.py", line 1031, in NonLinFit
(a,da) = SolveNonLin(ExpFit,dExpFit,a,ratio,dratio,xaxis,tol=tol)
File "/home/ab/Desktop/checkensemble-master/checkensemble/checkensemble.py", line 978, in SolveNonLin
incr_a = numpy.linalg.solve(Z,numpy.dot(JTW,dy))
File "/usr/lib/python2.7/dist-packages/numpy/linalg/linalg.py", line 381, in solve
r = gufunc(a, b, signature=signature, extobj=extobj)
File "/usr/lib/python2.7/dist-packages/numpy/linalg/linalg.py", line 90, in _raise_linalgerror_singular
raise LinAlgError("Singular matrix")
numpy.linalg.linalg.LinAlgError: Singular matrix

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

No branches or pull requests

2 participants