Skip to content
Snippets Groups Projects
box.h 2.84 KiB
Newer Older
Kurt A. O'Hearn's avatar
Kurt A. O'Hearn committed
/*----------------------------------------------------------------------
  SerialReax - Reax Force Field Simulator
Kurt A. O'Hearn's avatar
Kurt A. O'Hearn committed

Kurt A. O'Hearn's avatar
Kurt A. O'Hearn committed
  Copyright (2010) Purdue University
  Hasan Metin Aktulga, haktulga@cs.purdue.edu
  Joseph Fogarty, jcfogart@mail.usf.edu
  Sagar Pandit, pandit@usf.edu
  Ananth Y Grama, ayg@cs.purdue.edu
Kurt A. O'Hearn's avatar
Kurt A. O'Hearn committed

Kurt A. O'Hearn's avatar
Kurt A. O'Hearn committed
  This program is free software; you can redistribute it and/or
  modify it under the terms of the GNU General Public License as
Kurt A. O'Hearn's avatar
Kurt A. O'Hearn committed
  published by the Free Software Foundation; either version 2 of
Kurt A. O'Hearn's avatar
Kurt A. O'Hearn committed
  the License, or (at your option) any later version.
Kurt A. O'Hearn's avatar
Kurt A. O'Hearn committed

Kurt A. O'Hearn's avatar
Kurt A. O'Hearn committed
  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
Kurt A. O'Hearn's avatar
Kurt A. O'Hearn committed
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Kurt A. O'Hearn's avatar
Kurt A. O'Hearn committed
  See the GNU General Public License for more details:
  <http://www.gnu.org/licenses/>.
  ----------------------------------------------------------------------*/

#ifndef __BOX_H__
#define __BOX_H__

#include "mytypes.h"

/* Initializes box from CRYST1 line of PDB */
Kurt A. O'Hearn's avatar
Kurt A. O'Hearn committed
void Init_Box_From_CRYST(real, real, real, real, real, real,
                         simulation_box*/*, int*/);
Kurt A. O'Hearn's avatar
Kurt A. O'Hearn committed

/* Initializes box from box rtensor */
void Update_Box(rtensor, simulation_box* /*, int*/);
void Update_Box_Isotropic(simulation_box*, real /*, int*/);
void Update_Box_SemiIsotropic( simulation_box*, rvec /*, int*/ );

Kurt A. O'Hearn's avatar
Kurt A. O'Hearn committed
/* Computes all the transformations,
Kurt A. O'Hearn's avatar
Kurt A. O'Hearn committed
   metric and other quantities from box rtensor */
void Make_Consistent(simulation_box*/*, int*/ );

Kurt A. O'Hearn's avatar
Kurt A. O'Hearn committed
/* Applies transformation to and from
Kurt A. O'Hearn's avatar
Kurt A. O'Hearn committed
   Cartesian to Triclinic coordinates based on flag */
/* Use -1 flag for Cartesian -> Triclinic and +1 for otherway */
void Transform( rvec, simulation_box*, char, rvec );
void Transform_to_UnitBox( rvec, simulation_box*, char, rvec );

int Are_Far_Neighbors( rvec, rvec, simulation_box*, real, far_neighbor_data* );
Kurt A. O'Hearn's avatar
Kurt A. O'Hearn committed
void Get_NonPeriodic_Far_Neighbors( rvec, rvec, simulation_box*,
                                    control_params*, far_neighbor_data*, int* );
void Get_Periodic_Far_Neighbors_Big_Box( rvec, rvec, simulation_box*,
        control_params*, far_neighbor_data*,
        int* );
void Get_Periodic_Far_Neighbors_Small_Box( rvec, rvec, simulation_box*,
        control_params*, far_neighbor_data*,
        int* );
Kurt A. O'Hearn's avatar
Kurt A. O'Hearn committed
void Distance_on_T3_Gen( rvec, rvec, simulation_box*, rvec );
void Inc_on_T3_Gen( rvec, rvec, simulation_box* );

/*int Get_Nbr_Box( simulation_box*, int, int, int );
rvec Get_Nbr_Box_Press( simulation_box*, int, int, int );
void Inc_Nbr_Box_Press( simulation_box*, int, int, int, rvec );*/

/* These functions assume that the coordinates are in triclinic system */
/* this function returns cartesian norm but triclinic distance vector */
real Sq_Distance_on_T3( rvec, rvec, simulation_box*, rvec );
void Inc_on_T3( rvec, rvec, simulation_box* );

real Metric_Product( rvec, rvec, simulation_box* );

void Print_Box_Information( simulation_box*, FILE* );

#endif