babel-1.6
|
Makefile,
README.1ST,
addh.c,
addh2.c,
aromatic.c,
assbnd.c,
asstypes.c,
babel.h,
bblmacs.h,
bblmast.h,
bbltyp.h,
block.c,
bndord.c,
bo.c,
buildct.c,
combine.c,
convert.c,
delatms.c,
delh2o.c,
element.lis,
filesrch.c,
fileutil.c,
gastchg.c,
gauss.hdr,
htoend.c,
int2cart.c,
intcart.c,
menus.c,
miniums.c,
molwt.c,
new.lis,
nodummy.c,
orient.c,
precip.c,
printbad.c,
progress.c,
psgvb.hdr,
quanta.lis,
rdalch.c,
rdampout.c,
rdbalst.c,
rdbgf.c,
rdboogie.c,
rdc3d.c,
rdcacao.c,
rdcadpac.c,
rdcharmm.c,
rdcsd.c,
rddock.c,
rddpdb.c,
rdelmnts.c,
rdfdat.c,
rdfeat.c,
rdfract.c,
rdg96.c,
rdgamout.c,
rdgauout.c,
rdgzmat.c,
rdhin.c,
rdinsite.c,
rdint.c,
rdirc.c,
rdisis.c,
rdm3d.c,
rdmacmod.c,
rdmacmol.c,
rdmdl.c,
rdmicro.c,
rdmm2.c,
rdmm2in.c,
rdmm3.c,
rdmolen.c,
rdmopac.c,
rdmopcrt.c,
rdpcmod.c,
rdpdb.c,
rdprep.c,
rdpsgout.c,
rdpsgvin.c,
rdquanta.c,
rdschak.c,
rdshelx.c,
rdsmiles.c,
rdspart.c,
rdspmm.c,
rdspsemi.c,
rdsybmol.c,
rdsybyl.c,
rdtypes.c,
rdunichm.c,
rdwiz.c,
rdxed.c,
rdxyz.c,
renum.c,
report.c,
rings.c,
ringutil.c,
sets.c,
smilesto.c,
spline.c,
strngutl.c,
tokenst.c,
tosmiles.c,
tree.c,
typbybo.c,
types.lis,
umslist.c,
utils.c,
vectors.c,
wralch.c,
wrbalst.c,
wrbgf.c,
wrbmin.c,
wrbox.c,
wrc3d.c,
wrcacao.c,
wrcache.c,
wrcacint.c,
wrchdrw.c,
wrcontmp.c,
wrcsr.c,
wrcssr.c,
wrdock.c,
wrdpdb.c,
wrfeat.c,
wrfh.c,
wrg96.c,
wrgamess.c,
wrgau.c,
wrgaucrt.c,
wrhin.c,
wricon.c,
wrint.c,
wrisis.c,
wrm3d.c,
wrmaccs.c,
wrmacmod.c,
wrmcmol.c,
wrmdl.c,
wrmicro.c,
wrmimic.c,
wrmiv.c,
wrmm2.c,
wrmm3.c,
wrmopac.c,
wrpcmod.c,
wrpdb.c,
wrpsgv.c,
wrpsgvz.c,
wrsmiles.c,
wrspart.c,
wrsybmol.c,
wrsybyl.c,
wrtinker.c,
wrtorlst.c,
wrunichm.c,
wrwiz.c,
wrxed.c,
wrxyz.c
|
|
|
/*****
This file is part of the Babel Program
Copyright (C) 1992-96 W. Patrick Walters and Matthew T. Stahl
All Rights Reserved
All Rights Reserved
All Rights Reserved
All Rights Reserved
For more information please contact :
babel@mercury.aichem.arizona.edu
--------------------------------------------------------------------------------
FILE : rdint.c
AUTHOR(S) : Pat Walters
DATE : 10-92
PURPOSE : Routines to read a mopac internal coordinate file
******/
#include "bbltyp.h"
int
read_mopint(FILE *file1, ums_type *mol)
{
char mopint_line[BUFF_SIZE];
int i = 0;
int result;
/**** find out how many atoms are in the mopint file ****/
for (i = 0; i < 3; i++)
fgets(mopint_line,sizeof(mopint_line), file1);
i = 0;
while (fgets(mopint_line,sizeof(mopint_line), file1) != NULL)
{
if (i < 3)
i++;
else
if (count_tokens(mopint_line,"\t\n ") >= 10)
i++;
}
Atoms = i;
ShowProgress(Atoms,"Reading Atoms");
initialize_ums(&mol);
initialize_internal(&mol);
rewind(file1);
for (i = 0; i < 3; i++)
fgets(mopint_line,sizeof(mopint_line), file1);
i = MIN_ATOM;
for (i = MIN_ATOM; i <= Atoms; i++)
{
fgets(mopint_line,sizeof(mopint_line), file1);
UpdateProgress();
sscanf(mopint_line,"%s %lf %*d %lf %*d %lf %*d %d %d %d %*f",
Type(i),&R(i),&W(i),&T(i),&NA(i),&NB(i),&NC(i));
clean_atom_type(Type(i));
}
R(1) = 0.0;
W(1) = 0.0;
T(1) = 0.0;
NA(1) = 0;
NB(1) = 0;
NC(1) = 0;
W(2) = 0.0;
T(2) = 0.0;
NB(2) = 0;
NC(2) = 0;
T(3) = 0.0;
NC(3) = 0;
if (Atoms > 0)
{
result = int_to_cart(mol);
result = assign_radii(mol);
result = assign_bonds(mol);
result = assign_types(mol);
result = build_connection_table(mol);
assign_bond_order(mol);
}
read_to_eof(file1);
return(TRUE);
}
|