#include "dist.h" int TheMethod ; void SaveAtomVertices(int n,atom_record * a, vertex *v1, vertex *v2) {} void LoopOverNeighbors (atom_record *atom,neibour_descr *neibours,int neibour_count) {} main(int argc,char **argv) { SAY_HI_FIRST ; CITATION ; char * types_file = STRG_AFTER_OPT_W_ENV("types-file","data/NucProt.atom-defs.dat") ; char * res_file = STRG_AFTER_OPT_W_ENV("residue-file","data/NucProt.resi-defs.dat") ; char * vol_file = STRG_AFTER_OPT_W_ENV("stdvols","data/NucProt.stdvol258.dat") ; fprintf(stderr,"Expecting atoms definitions to be in %s (types_file)\n",types_file); fprintf(stderr,"Expecting residue definitions to be in %s (res_file)\n",res_file); initial_residues(types_file,res_file,0); STDERR("Initialization is DONE"); /* WriteAtomTypes(); */ { file_records *f = open_and_read_pdb(STRG_AFTER_OPT_W_ENV("i","in.pdb"),0); int n = f->atomnum; atom_record ** P = f->atoms; double packeff ; int ii; double surf_thresh = DoubleAfterOption(argc,argv,"SurfThresh",3.0); STDERR("Option [-probe X.X] is set by default to 1.4 A by can be set to X.X") ; calculate_surface(f,DoubleAfterOption(argc,argv,"probe",1.4)); STDERR("Surface Calculation is DONE"); STDERR("Option [-method X] is set by default to 4 but can be set to X") ; STDERR("The methods are 1 for Normal Voronoi (bisection), 2 for Richards' Method B"); STDERR("3 for Radical Plane, and 4 for Simplified Method B"); NN_Calculate_Volumes(f, (int) DoubleAfterOption(argc,argv,"method",4), DoubleAfterOption(argc,argv,"VolMaxDist",64), DoubleAfterOption(argc,argv,"DistCheck",8.5)); STDERR("Volume Calculation is DONE"); COPY_ATOM_VECTS_1TO2(P,surface,P,x,n); COPY_ATOM_VECTS_1TO2(P,volume,P,y,n); fprintf(stderr,"Expecting standard volumes to be in %s (vol_file)\n",vol_file); STDERR("About to read this file NOW (might crash if it is not there!)"); read_standard_volumes (vol_file); RefVToB(f); COPY_ATOM_VECTS_1TO2(P,b,P,x,n); CovVDWRadiiToOccB(f); STDERR("Internally rearranging data vectors: X=ref-vol Y=volume Z=z Occ=Covalent-Radius B=VDW-Radius Surf=surface volume=volume\n"); { char * fieldnames = "number_\tresnum\tchain\tresname\tatname\ttypenum\ttypenam\tcovrad\tvdwrad\tsurface\tvolume\trefvol\tpackeff\tgoodbad\n"; if (OPT("no-field-names")) { fprintf(stderr,fieldnames); } else { fprintf(stdout,fieldnames); } } for (ii=0; iiatomnum; ii++) { atom_record * a = f->atoms[ii]; if (a->chain == ' ') { a->chain='.' ; } printf("%7d\t%7d\t%1c\t",a->number,a->resnum,a->chain); printf("%5s\t%5s\t%4d\t%5s\t", a->resname,a->name, a->definition->type_index, atom_type_name(a->definition->type_index)); printf("%7.3f\t",a->occ); /* Covalent Radius */ printf("%7.3f\t",a->b); /* VDW Radius */ printf("%7.3f\t",a->surface); /* Surface */ printf("%7.3f\t",a->volume); /* Volume */ /* printf("%7.3f\t",a->y); */ /* Volume */ printf("%7.3f\t",a->x); /* Ref. Volume */ if (a->x > 0 && a->volume > 0) { packeff = a->volume/a->x ; } else { packeff = -1; } printf("%7.3f\t",packeff); /* Relative Packing Eff. */ if (a->volume <= 0) { printf("bad"); } else if (a->surface > surf_thresh) { printf("possible"); } else if (a->surface > .00001) { printf("[OK]"); } else { printf ("[GOOD]"); } printf ("\n"); } } }