Hi Thijs,
please use the developer mailing list, to avoid me answering questions
multiple times and a more descriptive subject than 'bug'.
You can also use the bug-tracking system.
good point :-)
Actually i've never tested this class, because the rotamere generation
sources are still not complete ported from the stalled OELib.
The original C++ class is ctransform.cpp.
So, if you're familiar with C++ and pointer references you can have a
look at your own at OELib or his successor OpenBabel.
I will have a look, but actually i'm not working actively at the rotamer
generation, but i think it should be:
System.arraycopy(in_xyz, 3 * 2, y, 0, 3);
System.arraycopy(in_xyz, 3 * 3, z, 0, 3);
Because the API docu, i've now added,says:
in_xyz A length 12 array containing 4 coordinates
(0,0,0), (1,0,0), (0,1,0) and (0,0,1) from the initial
reference frame transformed into the final reference frame
If this not works, i closer look at the matrix transformation is required.
Kind regards, Joerg
> Hi,
>
> I was playing around a bit with your resources and found what i think is
> a a bug.
>
> class:joelib.math.JOECoordTrans
> method: public boolean setup(double[] in_xyz)
> line 509
>
> public boolean setup(double[] in_xyz)
> {
> //Copy coordinate array
> double[] xyz = new double[12];
> double[] y = new double[4];
>
> //;xyz[3*2];
> double[] z = new double[4];
>
> //xyz[3*3];
> int i;
>
> //for (i=0 ; i<12 ; i++) xyz[i] = in_xyz[i];
> System.arraycopy(in_xyz, 0, xyz, 0, 12);
> System.arraycopy(in_xyz, 3 * 2, y, 0, 4);
> System.arraycopy(in_xyz, 3 * 3, z, 0, 4);
> Here it goes wrong, since element (3*3) + 4 = 12 does not exist in xyz, and
> i get an arrayindexoutofbounds exception
>
> The solution is not obvious to me,
>
> Hopefully you can help me out.
>
> Thijs Beuming
>
>
--
Dipl. Chem. Joerg K. Wegner
Center of Bioinformatics Tuebingen (ZBIT)
Department of Computer Architecture
Univ. Tuebingen, Sand 1, D-72076 Tuebingen, Germany
Phone: (+49/0) 7071 29 78970
Fax: (+49/0) 7071 29 5091
E-Mail: mailto:we...@in...
WWW: http://www-ra.informatik.uni-tuebingen.de
--
Never mistake motion for action.
(E. Hemingway)
Never mistake action for meaningful action.
(Hugo Kubinyi,2004)
|