Netiquette · Download · News · Gallery · Homepage · DSSR Manual · G-quadruplexes · DSSR-Jmol · DSSR-PyMOL · DSSR Licensing · Video Overview· RNA Covers

Miscellaneous items > SCHNAaP/SCHNArP

SCHNArP/SCHNAaP c source code

(1/2) > >>

clarebonk:
I am working on an RMSD minimization procedure.  I create (with my own c code) an initial RNA helix from a reduced pdb file, then I use 3DNA's analyze and rebuild to make a new helix.  I find the RMSD between the original helix and the one created with rebuild.  I use Powell's minimizatoin method to find bp_step parameters that give the minimum RMSD between the original helix and the one created with 3DNA's rebuild.

My problem is that the minimization procedure calls 3DNA's rebuild many, many times and I have no way of integrating the executables into my c code.  Since I do many other calculations, I need the code to be fast and efficient.

I've read both SCHNAaP and SCHNArP papers, and both conclusions state the source code is available upon request from the authors.

May I access the c code?  I, of course, will be happy to cite the authors' work and take no credit for that particular portion of the methodology.  It would save me a lot of time if I didn't have to rewrite the code myself.

admin:
I have just went through the code (it was a piece of work 10+ year ago!), and made some minor changes to make the code compile happily with today's gcc. A separate email I am sending to you contains download instructions. Please share with the community by posting back here any issues you have with the code.

Xiang-Jun

clarebonk:
I successfully compiled the code after making the additional changes, which were very easy to do from the helpful comments.  I changed the floats to doubles, and also changed free_vector to free_dvector.

However, when I run one of the examples, I get an error message:
$ schnaap ../Examples/1bna.inp
*** glibc detected *** schnaap: free(): invalid next size (normal): 0x0000000000637910 ***

I think there is a malloc/free issue somewhere in the code.  I will diligently look through the code to try to find the error, but in the meantime I was wondering if you had seen this before.

Relevant info:
Linux version 2.6.22.14-72.fc6
(gcc version 4.1.2 20070626 (Red Hat 4.1.2-13)) #1 SMP

Thanks.

xiangjun:
Very strange. It should work -:)

What OS and compiler are you using? Is it 'gcc'? Did you change all four NR functions? For verification purpose, please send me your finished 'cmn_fncs.c' file by email.

Xiang-Jun

clarebonk:
This problem is seen only on 64 bit machines, but this fix should be applied to nrutil.c regardless of architecture:

nrutil.c:18:    v = (long *) malloc((size_t) ((nh - nl + 1 + NR_END) * sizeof(int)));
nrutil.c:80:    m = (long **) malloc((size_t) ((nrow + NR_END) * sizeof(int *)));
nrutil.c:87:    m[nrl] = (long *) malloc((size_t) ((nrow * ncol + NR_END) * sizeof(int)));

Change sizeof(int) to sizeof(long) on lines 18, 80, and 87 in nrutil.c.

Also, this line:

 #include "cmn_fncs.h"

should be added to pdb2inp.c (thanks Xiang-Jun).

Navigation

[0] Message Index

[#] Next page

Created and maintained by Dr. Xiang-Jun Lu [律祥俊] (xiangjun@x3dna.org)
The Bussemaker Laboratory at the Department of Biological Sciences, Columbia University.

Go to full version