Skip to content
Snippets Groups Projects
Commit ca8bbe17 authored by Kurt A. O'Hearn's avatar Kurt A. O'Hearn
Browse files

Fix bilayer and dna benchmarks. Add NaN support for checking sim box boundaries in PuReMD.

parent b18467fd
No related branches found
No related tags found
No related merge requests found
...@@ -141,6 +141,13 @@ void Setup_Big_Box( real a, real b, real c, real alpha, real beta, real gamma, ...@@ -141,6 +141,13 @@ void Setup_Big_Box( real a, real b, real c, real alpha, real beta, real gamma,
{ {
double c_alpha, c_beta, c_gamma, s_gamma, zi; double c_alpha, c_beta, c_gamma, s_gamma, zi;
if ( IS_NAN_REAL(a) || IS_NAN_REAL(b) || IS_NAN_REAL(c)
|| IS_NAN_REAL(alpha) || IS_NAN_REAL(beta) || IS_NAN_REAL(gamma) )
{
fprintf( stderr, "Invalid simulation box boundaries for big box (NaN). Terminating...\n" );
exit( INVALID_INPUT );
}
c_alpha = cos(DEG2RAD(alpha)); c_alpha = cos(DEG2RAD(alpha));
c_beta = cos(DEG2RAD(beta)); c_beta = cos(DEG2RAD(beta));
c_gamma = cos(DEG2RAD(gamma)); c_gamma = cos(DEG2RAD(gamma));
......
...@@ -176,7 +176,7 @@ int Read_Box_Info( reax_system *system, FILE *geo, int geo_format ) ...@@ -176,7 +176,7 @@ int Read_Box_Info( reax_system *system, FILE *geo, int geo_format )
&s_a[0], &s_b[0], &s_c[0], &s_a[0], &s_b[0], &s_c[0],
&s_alpha[0], &s_beta[0], &s_gamma[0], &s_alpha[0], &s_beta[0], &s_gamma[0],
&s_group[0], &s_zValue[0] ); &s_group[0], &s_zValue[0] );
/* compute full volume tensor from the angles */ /* compute full volume tensor from the angles */
Setup_Big_Box( atof(s_a), atof(s_b), atof(s_c), Setup_Big_Box( atof(s_a), atof(s_b), atof(s_c),
atof(s_alpha), atof(s_beta), atof(s_gamma), atof(s_alpha), atof(s_beta), atof(s_gamma),
......
...@@ -54,6 +54,15 @@ ...@@ -54,6 +54,15 @@
#define REAX_MAX_ATOM_TYPES 25 #define REAX_MAX_ATOM_TYPES 25
#define REAX_MAX_MOLECULE_SIZE 20 #define REAX_MAX_MOLECULE_SIZE 20
/* NaN IEEE 754 representation for C99 in math.h
* Note: function choice must match REAL typedef below */
#ifdef NAN
#define IS_NAN_REAL(a) (isnan(a))
#else
#warn "No support for NaN"
#define NAN_REAL(a) (0)
#endif
/********************** TYPE DEFINITIONS ********************/ /********************** TYPE DEFINITIONS ********************/
typedef int ivec[3]; typedef int ivec[3];
typedef double real; typedef double real;
......
REMARK Created by ReaxFF REMARK Created by ReaxFF
CRYST1 44.80000 44.80000 103.60000 90.00000 90.00000 90.00000 CRYST1 44.80000 44.80000 103.6000090.000090.000090.00000 0
ATOM 1 'HO5 DA S 1 18.338 31.595 15.144 1.00 2.20 H ATOM 1 'HO5 DA S 1 18.338 31.595 15.144 1.00 2.20 H
ATOM 2 O5' DA S 1 18.062 30.912 15.797 1.00 2.20 O ATOM 2 O5' DA S 1 18.062 30.912 15.797 1.00 2.20 O
ATOM 3 O3' DA S 1 16.044 28.806 17.723 1.00 2.20 O ATOM 3 O3' DA S 1 16.044 28.806 17.723 1.00 2.20 O
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment