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

Segmentation fault (core dumped) on Linux and std::bad_alloc on Windows #2

Closed
Wes-V3 opened this issue Jun 8, 2022 · 6 comments
Closed

Comments

@Wes-V3
Copy link

Wes-V3 commented Jun 8, 2022

On Windows:

C:\Users\11\Downloads\calibur.win32 (1)>calibur.exe -o pdblist.txt
Filtering on
Signature mode on
Using chains 'A', 'C', ' ' in PDB files
Read 60 decoy names
Estimating threshold range... complete
Estimated threshold range = [9999999.00000, 0.00000]
Most frequent distance = 9833330.00000
10.00000 percent distances below nan
Finding threshold to keep 35.93041% edges
Threshold = nan
Reading decoys with signature mode on and filter mode on
Read 60 decoys. Filtered 0 outlier decoys.
Decoys read in 0.01000 s
Initialized 60 decoys.
Use of SCUD's bound off
Using MATRIX mode
Auxiliary clustering... 98.3%
AuxiliaryClustering... completed in 0.02600 s
 completedcoys' neighbors... completed 98.3%
Finding and removing largest clusters...terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc

On Linux:

(base) :~/calibur-main$ ./calibur-lite /calibur-main/predicted_structures/pdblist.txt 
Filtering on
Signature mode on
Using chains 'A', 'C', ' ' in PDB files
Read 60 decoy names
Segmentation fault (core dumped)

Using calibur in Rosetta on Linux:

(base) :~$ $ROSETTA/calibur.linuxgccrelease -pdb_list /pdblist
core.init: Checking for fconfig files in pwd and ./rosetta/flags 
core.init: Rosetta version: rosetta.binary.linux.release-315 r315 2022.12+release.a4d7970 a4d79705213bc2acd6b51e370eddbb2738df6866 https://www.rosettacommons.org 2022-03-22T15:27:26.590656
core.init: command: /Rosetta/main/source/bin/calibur.linuxgccrelease -pdb_list /pdblist
basic.random.init_random_generator: 'RNG device' seed mode, using '/dev/urandom', seed=-678486154 seed_offset=0 real_seed=-678486154
basic.random.init_random_generator: RandomGenerator:init: Normal mode, seed=-678486154 RG_type=mt19937
core.init: Resolved executable path: /Rosetta/main/source/build/src/release/linux/5.4/64/x86/gcc/9/default/calibur.default.linuxgccrelease
core.init: Looking for database based on location of executable: /Rosetta/main/database/
Using C-alphas #1-end
Filtering on
Signature mode off
Using chains 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ' ' in PDB files
Read 578 decoy names
Estimating threshold range...

AN INTERNAL ERROR HAS OCCURED. PLEASE SEE THE CONTENTS OF ROSETTA_CRASH.log FOR DETAILS.


Segmentation fault (core dumped)

I'm using calibur to clustering RNA structures.
pdblist.txt

@kalngyk
Copy link
Owner

kalngyk commented Jun 8, 2022

This is embarrassing, but it appears that calibur ran out of memory to allocate.

I wonder if it is possible for me to look at the decoys data that caused the problem? That will help me confirm if it really is a memory allocation problem, and perhaps find a workaround.

@Wes-V3
Copy link
Author

Wes-V3 commented Jun 8, 2022

Of course! Thank you!
RNA_structures.zip

This is embarrassing, but it appears that calibur ran out of memory to allocate.

I wonder if it is possible for me to look at the decoys data that caused the problem? That will help me confirm if it really is a memory allocation problem, and perhaps find a workaround.

@kalngyk
Copy link
Owner

kalngyk commented Jun 9, 2022

A quick glance showed a negative threshold RMSD value. This could be due to a floating point value overflow, which implies that the input decoys could be very dissimilar.

But give me some time to confirm and fix this. I will update you ASAP.

@kalngyk
Copy link
Owner

kalngyk commented Jun 9, 2022

This is what happened.

calibur uses only the coordinates of the lines marked with CA (carbon alpha) in the pdb files. For example, in the following, only the coordinates of the second line is used.

ATOM      1  N   VAL A 238      11.251  -9.834  -2.389  1.00  0.00           N
ATOM      2  CA  VAL A 238      11.896  -8.749  -3.115  1.00  0.00           C
ATOM      3  C   VAL A 238      13.369  -8.689  -2.728  1.00  0.00           C

However, the decoy files you tested contain no CA elements. Because of this, all the RMSD computed are set to NaN. This resulted in no cluster discovered, causing calibur to go into an infinite loop.

To solve this quickly, replace the symbol of the lines which you want to use as CA elements with CA. For example, the following bash command would substitute all the lines of symbols C1', C2', ..., C5', to CA

for F in *.pdb; do cat $F |sed 's/ 0 / A /' |sed "s/C.'/CA /" > output/$F; done

(The command will also change the chain from 0 to A, since calibur defaults to use only the chains A, C, or " ".)

@Wes-V3
Copy link
Author

Wes-V3 commented Jun 10, 2022

This is what happened.

calibur uses only the coordinates of the lines marked with CA (carbon alpha) in the pdb files. For example, in the following, only the coordinates of the second line is used.

ATOM 1 N VAL A 238 11.251 -9.834 -2.389 1.00 0.00 N
ATOM 2 CA VAL A 238 11.896 -8.749 -3.115 1.00 0.00 C
ATOM 3 C VAL A 238 13.369 -8.689 -2.728 1.00 0.00 C
However, the decoy files you tested contain no CA elements. Because of this, all the RMSD computed are set to NaN. This resulted in no cluster discovered, causing calibur to go into an infinite loop.

To solve this quickly, replace the symbol of the lines which you want to use as CA elements with CA. For example, the following bash command would substitute all the lines of symbols C1', C2', ..., C5', to CA

for F in *.pdb; do cat $F |sed 's/ 0 / A /' |sed "s/C.'/CA /" > output/$F; done

(The command will also change the chain from 0 to A, since calibur defaults to use only the chains A, C, or " ".)

This solves my problem, thank you for your quick reply and solution.
If possible, could you provide an option like "-RNA" to make it better applicable to clustering RNA structures? In any case, thanks for your excellent work!

@Wes-V3 Wes-V3 closed this as completed Jun 10, 2022
@kalngyk
Copy link
Owner

kalngyk commented Jun 11, 2022

Thanks for the suggestion. But I am not yet familiar with RNA notations so I am not sure how to make the change.
OTOH, I have added an option to allow renaming of the atom for comparison, as well as an option to allow all chains.
I hope these changes make the analysis of RNAs easier.

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