/*----------------------------defs.h-------------------------------
  This file defines data structures used throughout the tbtools
  package. This software was written by Stephen Jordan.
  -----------------------------------------------------------------*/

#ifndef _DEFS_H
#define _DEFS_H

typedef struct {
  int type;           //0 = ball, 1 = plane, 2 = hole, 3 = push, 4 = squeeze 
  double radius;      //if it is a ball or a plane w/ a hole
  double radius_step; //if it is iterated
  double height;      //z-coordinate
  double height_step; //iterated
  double dir[3];      //direction vector
  double dir_step[3]; //iterated
  double strength;    //for squeeze
  int atom;           //if it applies to a single atom
  int mask;           //1st bit carbon, 2nd bit hydrogen
}forcer;

typedef struct {
  int relative[3];       //0 = absolute, 1 = relative
  int start;             //first stagename
  int stop;              //last stagename
  int offset;            //stagename + offset = stagenum
  char infile[128];      //filename of input abc
  char outfile[128];     //filename of output abc
  char datafile[128];    //filename for data logging
  char logfile[128];     //filename for message logging
  int verbose;           //1 = true, 0 = false
  int digits;            //digits after decimal for coordinates
  int automatic;         //1 = find neighbs auto, trust abc file
  int color;             //(bond color) 0 = none, 1 = energy, 2 = relative
  int randomization;     //0 = none, otherwise seed = value
  double threshold;      //force at which calculation stops
  forcer f_list[16];     //list of forcers (16 max)
  int f_num;             //number of forcers
  int tip;               //which forcer is considered the tip
}defs;

#include <stdio.h> //for FILE
#include "diags.h" //for diags struct

int loaddefs(FILE *fp, defs *d, char *jobname);

void def_display(char *output, const defs *d, const char *prefix);

void msglog(char *msg, const defs *d);

void logdefs(const defs *d);

void makeheader(char *header, const defs *d, const diags *dia, int stage);

#endif


