Prob_Angle Segmentation Fault or Bug?

  • jdmoore
  • jdmoore's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 3 months ago #289 by jdmoore
When I try to add

Does Prob_Angle have a bug or am I making a syntax error?

# Prob_Angle
60

to the Examples/NPT/pentane I get a segmentation fault.

In another case for my specific problem I am getting this error

************ERROR************
Attempted to change an angle of molecule 14 of species 3
but the molecule energy is too high
This error occurred in subroutine Angle_Distortion on step 13.
Fatal Error. Stopping program.

I am pretty sure my angle coefficients and angles are correct for my model, but maybe I have a mistake. However, since the pentane example is showing a segmentation fault, I thought they might be related.

Am I making an error in the use of the Angle move or is there a bug?

Thanks.

Josh.

Please Log in to join the conversation.

  • jdmoore
  • jdmoore's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 3 months ago #291 by jdmoore
I think the problem might be on line 199 of move_angle.f90

I think the integer angle_to_move is being used before it has been defined. So it seg faults when angle_list is trying to use angle_to_move

atom1 = angle_list(angle_to_move,is)%atom1
atom2 = angle_list(angle_to_move,is)%atom2
atom3 = angle_list(angle_to_move,is)%atom3

Code runs if I peg angle_to_move = 1 at beginning of subroutine.

What needs to go here before here to define angle_to_move?

Thanks.

Josh

Please Log in to join the conversation.

  • jdmoore
  • jdmoore's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 3 months ago #292 by jdmoore
Ahh, I think this is what is missing. Can you confirm?

! Select a angle at random
angle_to_move = INT( rranf() * nangles(is) ) + 1

Should be before line 199 of angle.f90, before

atom1 = angle_list(angle_to_move,is)%atom1
atom2 = angle_list(angle_to_move,is)%atom2
atom3 = angle_list(angle_to_move,is)%atom3


This would then match move_dihedral, where dihedral_to_move is chosen randomly.

Thanks.

Josh

Please Log in to join the conversation.

  • jdmoore
  • jdmoore's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 3 months ago #293 by jdmoore
After adding

! Select a angle at random
angle_to_move = INT( rranf() * nangles(is) ) + 1

I am now sometimes getting other errors related to the prob_this_theta being too low in the

6.9531649819728962E-310
This error occurred in subroutine Get_Theta_Prob on step 88.
Fatal Error. Stopping program.

However, sometimes in other examples, I get a different error

Attempted to change an angle of molecule 50 of species 3
but the molecule energy is too high
This error occurred in subroutine Angle_Distortion on step 64.
Fatal Error. Stopping program.

I'm attaching an example using the pentane example from the Examples directory, modified for GCMC. Note I'm also sometimes getting an error with NPT, but I'm getting an error most often with GCMC with small tests

The fragments need to be regenerated with

Cassandra_V1.2/Scripts/Frag_Library_Setup//library_setup.py Cassandra_V1.2/Src/cassandra_gfortran.exe equil_GCMC.inp pentane.pdb

Then run with

Cassandra_V1.2/Src/cassandra_gfortran.exe equil_GCMC.inp

I compiled this with gfortran, but I'm also seeing the same errors with intel compilers.

Note if I decrease the chemical potential to say -40 kJ/mol, it does run, but shouldn't I be able to do angle moves with this chemical potential. The problem runs fine, if I don't include angle moves.

To confuse you, I've also kept the equil.inp file there which is the NPT example. Please ignore that file.

Any advice?

Thanks in advance.

Josh

File Attachment:

File Name: Prob_Angle...t.tar.gz
File Size:25 KB
Attachments:

Please Log in to join the conversation.

More
7 years 2 months ago #294 by emarin
Hello Josh!

We are looking into this issue. We haven't tested the angle move very rigorously, as we usually perturb angles with the regrowth move.

We'll get back to you soon!

Eliseo.

Please Log in to join the conversation.

  • jdmoore
  • jdmoore's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 2 months ago #295 by jdmoore
Hi Eliseo,

Thank you.

I think I need it for a situation where regrowths aren't occurring that often, say for something like C12. Hopeful it will help or at least confirm the sampling is good enough.

Thanks.

Josh

Please Log in to join the conversation.

Time to create page: 0.125 seconds