1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
|
/* depvar.f -- translated by f2c (version 19991025).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
#include "f2c.h"
/* Common Block Declarations */
struct {
char keywrd[241];
} keywrd_;
#define keywrd_1 keywrd_
struct {
integer numcal;
} numcal_;
#define numcal_1 numcal_
/* Table of constant values */
static integer c__1 = 1;
/* Subroutine */ int depvar_(a, i__, w, l)
doublereal *a;
integer *i__;
doublereal *w;
integer *l;
{
/* Initialized data */
static integer icalcn = 0;
/* System generated locals */
integer i__1;
/* Builtin functions */
integer i_indx(), s_wsfe(), do_fio(), e_wsfe();
/* Local variables */
static doublereal fact;
extern doublereal reada_();
/* Fortran I/O blocks */
static cilist io___3 = { 0, 6, 0, "(' UNIT CELL LENGTH =',F14.7, \
' TIMES BOND LENGTH')", 0 };
/* *********************************************************************** */
/* IN SUBROUTINE HADDON WHEN M, THE SYMMETRY OPERATION, IS 18 DEPVAR IS */
/* CALLED. DEPVAR SHOULD THEN CONTAIN A USER-WRITTEN SYMMETRY OPERATION. */
/* SEE HADDON TO GET THE IDEA ON HOW TO WRITE DEPVAR. */
/* ON INPUT: */
/* A = ARRAY OF INTERNAL COORDINATES */
/* I = ADDRESS OF REFERENCE ATOM */
/* ON OUTPUT: */
/* L = 1 (IF A BOND-LENGTH IS THE DEPENDENT FUNCTION) */
/* = 2 (IF AN ANGLE IS THE DEPENDENT FUNCTION) */
/* = 3 (IF A DIHEDRAL ANGLE IS THE DEPENDENT FUNCTION) */
/* W = VALUE OF THE FUNCTION */
/* NOTE: IT IS THE WRITER'S RESPONSIBILITY TO MAKE CERTAIN THAT THE */
/* SUBROUTINE DOES NOT CONTAIN ANY ERRORS! */
/* *********************************************************************** */
/* Parameter adjustments */
a -= 4;
/* Function Body */
if (icalcn != numcal_1.numcal) {
icalcn = numcal_1.numcal;
i__1 = i_indx(keywrd_1.keywrd, "DEPVAR", (ftnlen)241, (ftnlen)6);
fact = reada_(keywrd_1.keywrd, &i__1, (ftnlen)241);
s_wsfe(&io___3);
do_fio(&c__1, (char *)&fact, (ftnlen)sizeof(doublereal));
e_wsfe();
}
*w = a[*i__ * 3 + 1] * fact;
*l = 1;
return 0;
} /* depvar_ */
|