msmbuilder / msmbuilder-legacy

Legacy release of MSMBuilder
http://msmbuilder.org
GNU General Public License v2.0
25 stars 28 forks source link

Cluster.py and 0-d Arrays #262

Closed cxhernandez closed 11 years ago

cxhernandez commented 11 years ago

Getting a weird error when I run Cluster.py at line 136:

136  ->         ptraj = np.concatenate(ptraj)
*** ValueError: 0-d arrays can't be concatenated

ptraj is definitely not empty though.

schwancr commented 11 years ago

Can you send he command you're running that gives you this error.

On Fri, Nov 22, 2013 at 12:25 AM, Carlos Hernández <notifications@github.com

wrote:

Getting a weird error when I run Cluster.py at line 136:

136 -> ptraj = np.concatenate(ptraj)*\ ValueError: 0-d arrays can't be concatenated

ptraj is definitely not empty though.

— Reply to this email directly or view it on GitHubhttps://github.com/SimTk/msmbuilder/issues/262 .

schwancr commented 11 years ago

the*

On Fri, Nov 22, 2013 at 12:27 AM, Christian Schwantes <schwancr@stanford.edu

wrote:

Can you send he command you're running that gives you this error.

On Fri, Nov 22, 2013 at 12:25 AM, Carlos Hernández < notifications@github.com> wrote:

Getting a weird error when I run Cluster.py at line 136:

136 -> ptraj = np.concatenate(ptraj)*\ ValueError: 0-d arrays can't be concatenated

ptraj is definitely not empty though.

— Reply to this email directly or view it on GitHubhttps://github.com/SimTk/msmbuilder/issues/262 .

cxhernandez commented 11 years ago
 /hsgs/home/mlawrenz/epd-7.3-1-rh5-x86_64/bin/python2.7 -m pdb /hsgs/home/mlawrenz/epd-7.3-1-rh5-x86_64/bin/Cluster.py -s 250 -o d3/ lprmsd -a sirtuin_Calpha_indices.dat -l p53_Calpha_indices.dat hybrid -d 0.3 
schwancr commented 11 years ago

What are the contents of your atom indices files?

On Fri, Nov 22, 2013 at 12:28 AM, Carlos Hernández <notifications@github.com

wrote:

/hsgs/home/mlawrenz/epd-7.3-1-rh5-x86_64/bin/python2.7 -m pdb /hsgs/home/mlawrenz/epd-7.3-1-rh5-x86_64/bin/Cluster.py -s 250 -o d3/ lprmsd -a sirtuin_Calpha_indices.dat -l p53_Calpha_indices.dat hybrid -d 0.3

— Reply to this email directly or view it on GitHubhttps://github.com/SimTk/msmbuilder/issues/262#issuecomment-29056459 .

cxhernandez commented 11 years ago

rows of atom indices like this:

-bash-4.1$ head p53_Calpha_indices.dat 
3904
3915
3932
3951
3973
3984
4006
4028
4035
4052
-bash-4.1$ head sirtuin_Calpha_indices.dat 
4
21
43
60
82
97
117
136
148
167
rmcgibbo commented 11 years ago

I know that there is code that isn't robust to index files that contain only a single element, since they get loaded as zero-dim arrays by default.

$ cat a.txt
123
rmcgibbo@vspm9  ~ [sci]
$ python -c "import numpy as np; print np.loadtxt('a.txt', dtype=int).ndim"
0
schwancr commented 11 years ago

Can you do this on your Cluster.py script that you're calling. I think this is due to a bug that was fixed a while ago. Are you sure you have the right version of msmbuilder installed? For instance, my TPT branch may not have this bugfix pulled in yet

On Fri, Nov 22, 2013 at 12:32 AM, Carlos Hernández <notifications@github.com

wrote:

rows of atom indices like this:

-bash-4.1$ head p53_Calpha_indices.dat 3904 3915 3932 3951 3973 3984 4006 4028 4035 4052 -bash-4.1$ head sirtuin_Calpha_indices.dat 4 21 43 60 82 97 117 136 148 167

— Reply to this email directly or view it on GitHubhttps://github.com/SimTk/msmbuilder/issues/262#issuecomment-29056620 .

schwancr commented 11 years ago

Do this:

cat scripts/Cluster.py | grep "if isinstance(metric, metrics.Vectorized)"

On Fri, Nov 22, 2013 at 12:39 AM, Christian Schwantes <schwancr@stanford.edu

wrote:

Can you do this on your Cluster.py script that you're calling. I think this is due to a bug that was fixed a while ago. Are you sure you have the right version of msmbuilder installed? For instance, my TPT branch may not have this bugfix pulled in yet

On Fri, Nov 22, 2013 at 12:32 AM, Carlos Hernández < notifications@github.com> wrote:

rows of atom indices like this:

-bash-4.1$ head p53_Calpha_indices.dat 3904 3915 3932 3951 3973 3984 4006 4028 4035 4052 -bash-4.1$ head sirtuin_Calpha_indices.dat 4 21 43 60 82 97 117 136 148 167

— Reply to this email directly or view it on GitHubhttps://github.com/SimTk/msmbuilder/issues/262#issuecomment-29056620 .

cxhernandez commented 11 years ago

No, that line's not there. Maybe, Morgan has your branch then.... I'll pull the latest version and try it now.

rmcgibbo commented 11 years ago

Got it. This is the issue that was fixed in #248.

schwancr commented 11 years ago

The newest msmbuilder version should be fine. The TPT code should get pulled in soon, too

cxhernandez commented 11 years ago

Yep, that works! Thanks, and sorry about that guys!

schwancr commented 11 years ago

No worries! glad it's working.