gamgi0.17.1g/0000755000175000017500000000000012306410727012310 5ustar carloscarlosgamgi0.17.1g/AUTHORS0000644000175000017500000000034312256334613013363 0ustar carloscarlosCarlos Pereira first author, source code, web site, documentation. Jakub Szypulka Tango! icons. Andre Truter old rpms and debs. gamgi0.17.1g/CONTRIBUTORS0000644000175000017500000000327612256334761014207 0ustar carloscarlosWe would like to thank the following people, for their contributions to GAMGI. Without them, GAMGI would be just a dream: - Brian Paul, for creating Mesa, and all the people in the mesa3d-users@lists.sourceforge.net mailling list, for their expert assistance. - The hundreds of developers that created GTK, Havoc Pennington and all the people in the gtk-app-devel-list@gnome.org mailling list, for their expert assistance and spirit of community. - Janne Lof, for writing GTKGLArea. - James Clark, for creating Expat, and all the people in the expat-discuss@lists.sourceforge.net mailling list, who continued the project, for their assistance. - SGI, for freely providing the code for the trackball routines, implemented by Gavin Bell (with help from Thant Tessman, David M. Ciemiewicz, Mark Grossman, Henry Moreton, and Paul Haeberli). - Jose Luis Martins, for the Voronoi bond algorithm. - Sun Microsystems and the X Consortium, for the Roman and Roman Mono Space stroked fonts. - Allen V. Hershey and the U.S. Naval Weapons Laboratory, Norman Wolcott and the U.S. National Bureau of Standards, Bob Beach and Thomas Wolff, for the Hershey stroked fonts. - James Marshall and several other people, who published excellent documentation and code on the web, explaining the HTTP protocol. - Jarle Aase and several other people, who published excellent documentation and code on the web, explaining the FTP protocol. - Serguei Patchkovskii, for the point symmetry code. - Allen Barnett, for the OGLFT library, which code was used for the extruded fonts - Linas Vepstas, for the GLE library, which code was used for the extruded fonts - The FreeType Team, for the library to handle TrueType fonts gamgi0.17.1g/dat/0000755000175000017500000000000012277504710013063 5ustar carloscarlosgamgi0.17.1g/dat/molecule/0000755000175000017500000000000012254623030014660 5ustar carloscarlosgamgi0.17.1g/dat/molecule/glasses/0000755000175000017500000000000012017164363016327 5ustar carloscarlosgamgi0.17.1g/dat/molecule/glasses/Nb2SiGe.xml0000644000175000017500000002032612017162651020243 0ustar carloscarlos gamgi0.17.1g/dat/molecule/glasses/NbSiGe.xml0000644000175000017500000001450311326076606020167 0ustar carloscarlos gamgi0.17.1g/dat/molecule/zeolites/0000755000175000017500000000000007713035674016535 5ustar carloscarlosgamgi0.17.1g/dat/molecule/zeolites/Zeolite2.xml0000644000175000017500000002131607426526330020752 0ustar carloscarlos gamgi0.17.1g/dat/molecule/zeolites/Zeolite1.xml0000644000175000017500000002662607426562163020766 0ustar carloscarlos gamgi0.17.1g/dat/molecule/polymers/0000755000175000017500000000000010654175477016555 5ustar carloscarlosgamgi0.17.1g/dat/molecule/polymers/pp.xml0000644000175000017500000001064211763512355017711 0ustar carloscarlos gamgi0.17.1g/dat/molecule/polymers/pvc.xml0000644000175000017500000000627110653417541020063 0ustar carloscarlos gamgi0.17.1g/dat/molecule/sugars/0000755000175000017500000000000010211404160016154 5ustar carloscarlosgamgi0.17.1g/dat/molecule/sugars/amylose.xml0000644000175000017500000001140607714305701020370 0ustar carloscarlos gamgi0.17.1g/dat/molecule/sugars/cellobiose.xml0000644000175000017500000001142307714307001021031 0ustar carloscarlos gamgi0.17.1g/dat/molecule/sugars/d_xylose.xml0000644000175000017500000000425507713042102020541 0ustar carloscarlos gamgi0.17.1g/dat/molecule/sugars/glycogen.xml0000644000175000017500000002227307714311304020526 0ustar carloscarlos gamgi0.17.1g/dat/molecule/sugars/d_galactose.xml0000644000175000017500000000513307713037662021173 0ustar carloscarlos gamgi0.17.1g/dat/molecule/sugars/d_glucose.xml0000644000175000017500000000513407713040033020655 0ustar carloscarlos gamgi0.17.1g/dat/molecule/sugars/d_mannose.xml0000644000175000017500000000511507713041510020654 0ustar carloscarlos gamgi0.17.1g/dat/molecule/sugars/lactose.xml0000644000175000017500000001141407714307310020346 0ustar carloscarlos gamgi0.17.1g/dat/molecule/sugars/amylopectin.xml0000644000175000017500000001570607714310622021250 0ustar carloscarlos gamgi0.17.1g/dat/molecule/sugars/cellulose.xml0000644000175000017500000001567407714310070020714 0ustar carloscarlos gamgi0.17.1g/dat/molecule/sugars/maltose.xml0000644000175000017500000001141407714303464020366 0ustar carloscarlos gamgi0.17.1g/dat/molecule/sugars/README0000644000175000017500000000123207714452257017062 0ustar carloscarlos********** * Sugars * ********** The files in this directory describe common sugars. They were prepared for Gamgi, by Carlos Pereira: http://www.gamgi.org/ **************** * Bibliography * **************** Structural data was obtained from: 1) the Mathmol library of molecular structures, Scientific Visualization Center, New York University: http://www.nyu.edu/pages/mathmol/library/index.html 2) Glactone's CD-ROM of PDB Files, Department of Chemistry, Georgia State University: http://chemistry.gsu.edu/cwcs/MM-CD/workshop02/readme.htm Structural information was obtained from: 3) Luis S. Campos, Entender a Bioquímica, 3ª Edição, Escolar Editora (2002) gamgi0.17.1g/dat/molecule/sugars/fructose.xml0000644000175000017500000000511607714306141020551 0ustar carloscarlos gamgi0.17.1g/dat/molecule/sugars/sucrose.xml0000644000175000017500000001141607713041237020403 0ustar carloscarlos gamgi0.17.1g/dat/molecule/sugars/l_glucose.xml0000644000175000017500000000513007713041367020674 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/0000755000175000017500000000000012254622152016555 5ustar carloscarlosgamgi0.17.1g/dat/molecule/symmetry/D14d.xml0000644000175000017500000000350310244453174017777 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/Ci.xml0000644000175000017500000000043307710344556017644 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D3d.xml0000644000175000017500000000053207710344556017723 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/Oh_Cubane.xml0000644000175000017500000000077607712312204021131 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D17d.xml0000644000175000017500000000431110250424116017767 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D24d.xml0000644000175000017500000000612710244447760020011 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/C8.xml0000644000175000017500000000161307710344556017564 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/S14.xml0000644000175000017500000000350310244447522017652 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/Oh.xml0000644000175000017500000000051307710344556017656 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D27h.xml0000644000175000017500000000340310244447624020011 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D22d.xml0000644000175000017500000000552310250424117017772 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/C4h.xml0000644000175000017500000000067107710344556017733 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/C2v.xml0000644000175000017500000000024107710344556017740 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/S4.xml0000644000175000017500000000056407710344556017604 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D4h.xml0000644000175000017500000000042507710344556017731 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/S6.xml0000644000175000017500000000121307710344556017576 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D12h.xml0000644000175000017500000000146310244447624020007 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D7.xml0000644000175000017500000000144307710344556017565 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D30h.xml0000644000175000017500000000370510244447624020010 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/C30h.xml0000644000175000017500000000774610244447564020023 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/T0.2_I_C260.xml0000644000175000017500000003523107712321746020700 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D29d.xml0000644000175000017500000000734110250424120017773 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/S8.xml0000644000175000017500000000154507710344556017610 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D19d.xml0000644000175000017500000000471510250424117020002 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/.xml0000644000175000017500000000041707710332505017361 0ustar carloscarlos 6 0 0 06 0 0 21 1 0 12 0.995037 0.099504 11 -0.500000 -0.866025 12 -0.411346 -0.911479 11 -0.500000 0.866025 12 -0.583691 0.811976 1 gamgi0.17.1g/dat/molecule/symmetry/C5.xml0000644000175000017500000000106707710344556017564 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/S18.xml0000644000175000017500000000451310244447522017660 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D4d.xml0000644000175000017500000000103507710344556017723 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/C7v.xml0000644000175000017500000000067207710344556017755 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/Cs_Cyclopropane.xml0000644000175000017500000000104107712303110022347 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/C4.xml0000644000175000017500000000062207710344556017557 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D18d.xml0000644000175000017500000000451310244453174020005 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/T0.1_D5h_C50.xml0000644000175000017500000000555207712320574021045 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D6h.xml0000644000175000017500000000052407710344556017733 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/C24.xml0000644000175000017500000000623010244447431017632 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D26d.xml0000644000175000017500000000653310250424120017772 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D7d.xml0000644000175000017500000000144207710344556017730 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/C3v_SNC3H9.xml0000644000175000017500000000150507712310625020724 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D16h.xml0000644000175000017500000000206710244447624020014 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/C7.xml0000644000175000017500000000144507710344556017566 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D16d.xml0000644000175000017500000000410710244453174020002 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/T0.2_Ih_C60.xml0000644000175000017500000001006610075324034020752 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/C27h.xml0000644000175000017500000000714110244447564020016 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/S20.xml0000644000175000017500000000511710244447522017652 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/C3v.xml0000644000175000017500000000034607710344556017747 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/Ih_C20.xml0000644000175000017500000000221707712315461020252 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/C12.xml0000644000175000017500000000320010244447431017621 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/C3h.xml0000644000175000017500000000065607710344556017735 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/C6h.xml0000644000175000017500000000120007710344556017722 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D13d.xml0000644000175000017500000000330110244453174017772 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/C24v.xml0000644000175000017500000000317710244447457020037 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D2h.xml0000644000175000017500000000031307710344556017723 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D18h.xml0000644000175000017500000000227110244447624020013 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D8h.xml0000644000175000017500000000102107710344556017726 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/S22.xml0000644000175000017500000000552310244447522017655 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D30d.xml0000644000175000017500000000754310250424121017770 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D21d.xml0000644000175000017500000000532110250424117017765 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/C6.xml0000644000175000017500000000124507710344556017563 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D28d.xml0000644000175000017500000000713710250424120017775 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/C24h.xml0000644000175000017500000000633210244447564020014 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/C3.xml0000644000175000017500000000060707710344556017561 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/I.xml0000644000175000017500000000713307710344556017505 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/T0.5_D3d_Cyclohexane.xml0000644000175000017500000000373410075337617022760 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/C1.xml0000644000175000017500000000031107710344556017547 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/C12v.xml0000644000175000017500000000156310244447457020031 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D13h.xml0000644000175000017500000000156410244447624020012 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/C15h.xml0000644000175000017500000000411010244447564020004 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D5.xml0000644000175000017500000000111207710344556017554 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D25d.xml0000644000175000017500000000633210250424120017766 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/C12h.xml0000644000175000017500000000330210244447564020003 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/C5h.xml0000644000175000017500000000113607710344556017731 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/C3h_OC.xml0000644000175000017500000000212707712301210020267 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D5d.xml0000644000175000017500000000111207710344556017720 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D2d.xml0000644000175000017500000000031510244443726017714 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D0h.xml0000644000175000017500000000024107710344556017721 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/C30_Ih.xml0000644000175000017500000000334407712312406020251 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D6d.xml0000644000175000017500000000126507710344556017732 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/T0.5_S4_PtAuClSPC.xml0000644000175000017500000000177607712311427022067 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/S12.xml0000644000175000017500000000307710244447522017656 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D24.xml0000644000175000017500000000612710244447443017643 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D3h_C74.xml0000644000175000017500000001031607712330166020337 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D6.xml0000644000175000017500000000126607710344556017567 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/C6v.xml0000644000175000017500000000057207710344556017753 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D12d.xml0000644000175000017500000000307710244447757020015 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/S30.xml0000644000175000017500000000754310244447522017660 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/Ih.xml0000644000175000017500000000140107710344556017645 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/C0v_C6.xml0000644000175000017500000000060007712317274020264 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/C25h.xml0000644000175000017500000000653510244447564020022 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D24h.xml0000644000175000017500000000307710244447624020015 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/T0.9_Oh_NiOC.xml0000644000175000017500000001431107712466723021244 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D12.xml0000644000175000017500000000307710244447443017641 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/T0.4_C3h_Ir6P3.xml0000644000175000017500000000107307712316155021353 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/Ih_C12.xml0000644000175000017500000000133307712315477020260 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/README0000644000175000017500000000166007715472135017452 0ustar carloscarlos************ * Symmetry * ************ The files in this directory exemplify all the chemical point groups of symmetry with n <= 8, where n is the main rotation axis. They were prepared for Gamgi, by Carlos Pereira: http://www.gamgi.org/ **************** * Bibliography * **************** Structural data was obtained from: 1) Serguei Patchkovskii, to test the program Symmetry: http://www.cobalt.chem.ucalgary.ca/ps/symmetry/ 2) Tullio Pilati and Alessandra Forni, to test the program Symmol: http://ccp14.minerals.csiro.au/ccp/web-mirrors/symmol/~pila/ 3) P.Seiler, J.D.Dunitz (1982) Acta Crystallogr., B38, 1741, and then included with Symmol 4) Rudolf Hundt - Bonn, and then included with Symmol Structural information was obtained from: 5) Burns G., Glazer A. M., Space Groups for Solid State Scientists, Academic Press (1990) 6) Folhas de Química-Física Molecular, Alcácer L., Calado J., AEIST - secção de folhas, IST, (1978) gamgi0.17.1g/dat/molecule/symmetry/D3h.xml0000644000175000017500000000030007710344556017720 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D2h_C5.xml0000644000175000017500000000051407712317607020254 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D27d.xml0000644000175000017500000000673510250424120017777 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/C3v_SNO3.xml0000644000175000017500000000050307712310625020534 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D11d.xml0000644000175000017500000000267510250424113017771 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/T0.2_C2v_Fluorophenyl.xml0000644000175000017500000000130110075324770023201 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/Th.xml0000644000175000017500000000251207710344556017664 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/O.xml0000644000175000017500000000251107710344556017506 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/C0v.xml0000644000175000017500000000017307710344556017742 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/T.xml0000644000175000017500000000116307710344556017515 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D15d.xml0000644000175000017500000000370510250424116017773 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D23d.xml0000644000175000017500000000572510250424117017777 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/C7h.xml0000644000175000017500000000140007710344556017725 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/C2h.xml0000644000175000017500000000031607710344556017725 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D9d.xml0000644000175000017500000000227110250424125017713 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/T0.2_C3v_NS_CH3_3.xml0000644000175000017500000000150707712306605021724 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/T0.1_D5d_Ferrocene.xml0000644000175000017500000000225507712307437022422 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/T0.1_Td_Adamantane.xml0000644000175000017500000000300707712316635022472 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/S24.xml0000644000175000017500000000612710244447522017660 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D8.xml0000644000175000017500000000161607710344556017570 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D10d.xml0000644000175000017500000000247310250424113017764 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/C8h.xml0000644000175000017500000000166107710344556017737 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D8d.xml0000644000175000017500000000161507710344556017733 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D5h.xml0000644000175000017500000000054507710344556017735 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/C5v.xml0000644000175000017500000000047707710344556017756 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D7h.xml0000644000175000017500000000062407710344556017735 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D3.xml0000644000175000017500000000056307710344556017563 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/S10.xml0000644000175000017500000000247310244447522017653 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D2.xml0000644000175000017500000000033407710344556017556 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/T0.2_D6h_Benzene.xml0000644000175000017500000000130707712274624022104 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/Td.xml0000644000175000017500000000041707710344556017662 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/C2.xml0000644000175000017500000000036307710344556017557 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/Td_C476.xml0000644000175000017500000006552207712327577020403 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/Cs.xml0000644000175000017500000000024007710344556017652 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D15h.xml0000644000175000017500000000176710244447624020021 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D4.xml0000644000175000017500000000073607710344556017566 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/C8v.xml0000644000175000017500000000075307710344556017756 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/Td_C28.xml0000644000175000017500000000317107712317434020273 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/T0.01_Ih_C180.xml0000644000175000017500000005425210075337060021124 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/Kh.xml0000644000175000017500000000012410075535730017642 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/C4v.xml0000644000175000017500000000035707710344556017752 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/D20d.xml0000644000175000017500000000511710250424117017767 0ustar carloscarlos gamgi0.17.1g/dat/molecule/symmetry/S16.xml0000644000175000017500000000410710244447522017655 0ustar carloscarlos gamgi0.17.1g/dat/molecule/drugs/0000755000175000017500000000000011030507175016006 5ustar carloscarlosgamgi0.17.1g/dat/molecule/drugs/thc.xml0000644000175000017500000001332207712766426017331 0ustar carloscarlos gamgi0.17.1g/dat/molecule/drugs/streptomycin.xml0000644000175000017500000002075307712764223021312 0ustar carloscarlos gamgi0.17.1g/dat/molecule/drugs/valium.xml0000644000175000017500000000740507712767574020062 0ustar carloscarlos gamgi0.17.1g/dat/molecule/drugs/morphine.xml0000644000175000017500000001071707713000022020347 0ustar carloscarlos gamgi0.17.1g/dat/molecule/drugs/zantac.xml0000644000175000017500000001167207712770401020025 0ustar carloscarlos gamgi0.17.1g/dat/molecule/drugs/codeine.xml0000644000175000017500000001141207713000034020130 0ustar carloscarlos gamgi0.17.1g/dat/molecule/drugs/cisplantin.xml0000644000175000017500000000235307712760666020721 0ustar carloscarlos gamgi0.17.1g/dat/molecule/drugs/barbiturate.xml0000644000175000017500000000737107712767141021061 0ustar carloscarlos gamgi0.17.1g/dat/molecule/drugs/nicotine.xml0000644000175000017500000000563007712762626020364 0ustar carloscarlos gamgi0.17.1g/dat/molecule/drugs/README0000644000175000017500000000117607715472013016702 0ustar carloscarlos********* * Drugs * ********* The files in this directory describe common drugs. They were prepared for Gamgi, by Carlos Pereira: http://www.gamgi.org/ **************** * Bibliography * **************** Structural data was obtained from: 1) the Mathmol library of molecular structures, Scientific Visualization Center, New York University: http://www.nyu.edu/pages/mathmol/library/index.html 2) Richard Cornelius, Fei Liu and Jeff Frey, the Molecules website, Lebanon Valley College: http://www.molecules.org/ Structural information was obtained from: 3) Luis S. Campos, Entender a Bioquímica, 3ª Edição, Escolar Editora (2002) gamgi0.17.1g/dat/molecule/drugs/heroine.xml0000644000175000017500000001275007713000045020163 0ustar carloscarlos gamgi0.17.1g/dat/molecule/drugs/caffeine.xml0000644000175000017500000000525007712761376020313 0ustar carloscarlos gamgi0.17.1g/dat/molecule/drugs/taxol.xml0000644000175000017500000003034007712765660017700 0ustar carloscarlos gamgi0.17.1g/dat/molecule/drugs/azt.xml0000644000175000017500000000714107712757445017354 0ustar carloscarlos gamgi0.17.1g/dat/molecule/drugs/ibuprofen.xml0000644000175000017500000000712307712762142020535 0ustar carloscarlos gamgi0.17.1g/dat/molecule/drugs/aspirin.xml0000644000175000017500000000460607712754777020233 0ustar carloscarlos gamgi0.17.1g/dat/molecule/drugs/adrenaline.xml0000644000175000017500000000556507712753720020660 0ustar carloscarlos gamgi0.17.1g/dat/molecule/lipids/0000755000175000017500000000000010403314770016146 5ustar carloscarlosgamgi0.17.1g/dat/molecule/lipids/dppc.xml0000644000175000017500000002726707713022221017631 0ustar carloscarlos gamgi0.17.1g/dat/molecule/lipids/dlpe.xml0000644000175000017500000002557607713023734017642 0ustar carloscarlos gamgi0.17.1g/dat/molecule/lipids/linoleic.xml0000644000175000017500000001275207713733453020512 0ustar carloscarlos gamgi0.17.1g/dat/molecule/lipids/oleic.xml0000644000175000017500000001322607713733352020002 0ustar carloscarlos gamgi0.17.1g/dat/molecule/lipids/arachidonic.xml0000644000175000017500000001331407713733356021155 0ustar carloscarlos gamgi0.17.1g/dat/molecule/lipids/dmpg.xml0000644000175000017500000005714507713012153017633 0ustar carloscarlos gamgi0.17.1g/dat/molecule/lipids/palmitic.xml0000644000175000017500000001234307713013460020477 0ustar carloscarlos gamgi0.17.1g/dat/molecule/lipids/README0000644000175000017500000000101007714452116017026 0ustar carloscarlos********** * Lipids * ********** The files in this directory describe common lipids. They were prepared for Gamgi, by Carlos Pereira: http://www.gamgi.org/ **************** * Bibliography * **************** Structural data was obtained from: 1) the Mathmol library of molecular structures, Scientific Visualization Center, New York University: http://www.nyu.edu/pages/mathmol/library/index.html Structural information was obtained from: 2) Luis S. Campos, Entender a Bioquímica, 3ª Edição, Escolar Editora (2002) gamgi0.17.1g/dat/molecule/lipids/stearic.xml0000644000175000017500000001354007713020135020324 0ustar carloscarlos gamgi0.17.1g/dat/molecule/coordination/0000755000175000017500000000000010211404266017347 5ustar carloscarlosgamgi0.17.1g/dat/molecule/coordination/PCH33C6H23.xml0000644000175000017500000001475307745332133021344 0ustar carloscarlos gamgi0.17.1g/dat/molecule/coordination/Ptbutyl3.xml0000644000175000017500000001027407745331364021643 0ustar carloscarlos gamgi0.17.1g/dat/molecule/coordination/ZrCp3.xml0000644000175000017500000000640307745331321021046 0ustar carloscarlos gamgi0.17.1g/dat/molecule/coordination/PCH32CH2C6H5.xml0000644000175000017500000000664207745331632021561 0ustar carloscarlos gamgi0.17.1g/dat/molecule/coordination/TiAnCl3_m.xml0000644000175000017500000000457207745332325021630 0ustar carloscarlos gamgi0.17.1g/dat/molecule/coordination/VPyr3Cl3_m.xml0000644000175000017500000000777707730145120021757 0ustar carloscarlos gamgi0.17.1g/dat/molecule/coordination/FeCH35Cp2.xml0000644000175000017500000001247507745331242021377 0ustar carloscarlos gamgi0.17.1g/dat/molecule/coordination/PCH3O2C6H33.xml0000644000175000017500000001423207745333270021456 0ustar carloscarlos gamgi0.17.1g/dat/molecule/coordination/PCH32CH3.xml0000644000175000017500000000637707745331517021203 0ustar carloscarlos gamgi0.17.1g/dat/molecule/coordination/README0000644000175000017500000000116707722756500020252 0ustar carloscarlos**************** * Coordination * **************** The files in this directory describe common coordination compounds. They were prepared for Gamgi, by Carlos Pereira: http://www.gamgi.org/ **************** * Bibliography * **************** Structural data was obtained from: 1) Scot Wherland, Crystal Structure Data for Common Ions, Molecules, and Complexes Including Metalloproteins and their Metal Sites, Department of Chemistry, Washington State University: http://www.wsu.edu/~wherland/wwwlist01.htm Structural information was obtained from: 2) The Cambridge Crystallographic Data Centre: http://www.ccdc.cam.ac.uk/ gamgi0.17.1g/dat/molecule/coordination/PPh2CH2_cis.xml0000644000175000017500000001261407745333001022007 0ustar carloscarlos gamgi0.17.1g/dat/molecule/coordination/WCO6.xml0000644000175000017500000000270707730144172020626 0ustar carloscarlos gamgi0.17.1g/dat/molecule/coordination/PPh2CH2_trans.xml0000644000175000017500000001261707745332614022374 0ustar carloscarlos gamgi0.17.1g/dat/molecule/coordination/vanadocene.xml0000644000175000017500000000440107745331334022210 0ustar carloscarlos gamgi0.17.1g/dat/molecule/coordination/TiAnCl3_f.xml0000644000175000017500000000457707745332347021632 0ustar carloscarlos gamgi0.17.1g/dat/molecule/coordination/PCH3C6H43.xml0000644000175000017500000001120107745333130021242 0ustar carloscarlos gamgi0.17.1g/dat/molecule/proteines/0000755000175000017500000000000007713035716016704 5ustar carloscarlosgamgi0.17.1g/dat/molecule/proteines/Protein.xml0000644000175000017500000101246507426526311021054 0ustar carloscarlos gamgi0.17.1g/dat/molecule/nanotubes/0000755000175000017500000000000012243424560016663 5ustar carloscarlosgamgi0.17.1g/dat/molecule/nanotubes/armchair_7_7.xml0000644000175000017500000004125007712566613021664 0ustar carloscarlos gamgi0.17.1g/dat/molecule/nanotubes/zigzag_14_0.xml0000644000175000017500000004125107712570044021432 0ustar carloscarlos gamgi0.17.1g/dat/molecule/nanotubes/zigzag_16_0.xml0000644000175000017500000004612107712567603021444 0ustar carloscarlos gamgi0.17.1g/dat/molecule/nanotubes/zigzag_11_0.xml0000644000175000017500000003205507712571131021427 0ustar carloscarlos gamgi0.17.1g/dat/molecule/nanotubes/armchair_8_8.xml0000644000175000017500000004612007712566473021673 0ustar carloscarlos gamgi0.17.1g/dat/molecule/nanotubes/zigzag_9_0.xml0000644000175000017500000002526107712566346021373 0ustar carloscarlos gamgi0.17.1g/dat/molecule/nanotubes/chiral_8_5.xml0000644000175000017500000005114011745523176021334 0ustar carloscarlos gamgi0.17.1g/dat/molecule/nanotubes/chiral_9_5.xml0000644000175000017500000022526211745522757021351 0ustar carloscarlos gamgi0.17.1g/dat/molecule/nanotubes/armchair_6_6.xml0000644000175000017500000003440007712566745021667 0ustar carloscarlos gamgi0.17.1g/dat/molecule/nanotubes/nanotubes.xml0000644000175000017500000056324111732164604021420 0ustar carloscarlos gamgi0.17.1g/dat/molecule/nanotubes/chiral_10_5_multiple.xml0000644000175000017500000034642611756760170023335 0ustar carloscarlos gamgi0.17.1g/dat/molecule/nanotubes/zigzag_10_0.xml0000644000175000017500000002754107712566237021445 0ustar carloscarlos gamgi0.17.1g/dat/molecule/nanotubes/chiral_6_5.xml0000644000175000017500000013145411745524165021340 0ustar carloscarlos gamgi0.17.1g/dat/molecule/nanotubes/chiral_10_5.xml0000644000175000017500000013723311745523404021407 0ustar carloscarlos gamgi0.17.1g/dat/molecule/nanotubes/zigzag_17_0.xml0000644000175000017500000005044507712567452021453 0ustar carloscarlos gamgi0.17.1g/dat/molecule/nanotubes/zigzag_18_0.xml0000644000175000017500000005277107712567340021454 0ustar carloscarlos gamgi0.17.1g/dat/molecule/nanotubes/zigzag_15_0.xml0000644000175000017500000004357507712567724021461 0ustar carloscarlos gamgi0.17.1g/dat/molecule/nanotubes/chiral_10_5_long.xml0000644000175000017500000021735611756760234022441 0ustar carloscarlos gamgi0.17.1g/dat/molecule/nanotubes/chiral_7_5.xml0000644000175000017500000015343111745523771021342 0ustar carloscarlos gamgi0.17.1g/dat/molecule/nanotubes/armchair_10_10.xml0000644000175000017500000005764207712566026022022 0ustar carloscarlos gamgi0.17.1g/dat/molecule/nanotubes/README0000644000175000017500000000171111745562021017544 0ustar carloscarlos************* * Nanotubes * ************* The files in this directory describe achiral Armchair (n,n) and Zigzag (n,0) nanotubes. They were prepared for Gamgi, by Carlos Pereira: http://www.gamgi.org/ **************** * Bibliography * **************** 1) Structural data: Young-Kyun Kwon, the Nanotube Site, Michigan State University: http://www.pa.msu.edu/~ykkwon/Nanotubes/coordinates.html TubeGen 3.4, J. T. Frey and D. J. Doren, University of Delaware, 2011 http://turin.nss.udel.edu/research/tubegenonline.html 2) Related links: http://www.pa.msu.edu/cmp/csc/nanotube.html http://en.wikipedia.org/wiki/CoNTub http://en.wikipedia.org/wiki/List_of_software_for_nanostructures_modeling http://jcrystal.com/steffenweber/gallery/NanoTubes/NanoTubes.html 3) Strip algebra: Melchor, S.; Khokhriakov, N.V.; Savinskii, S.S. (1999). "Geometry of Multi-Tube Carbon Clusters and Electronic Transmission in Nanotube Contacts". Molecular Engineering 8 (4): 315 - 344. gamgi0.17.1g/dat/molecule/nanotubes/armchair_5_5.xml0000644000175000017500000002754107712567145021670 0ustar carloscarlos gamgi0.17.1g/dat/molecule/nanotubes/zigzag_13_0.xml0000644000175000017500000003672507712570553021450 0ustar carloscarlos gamgi0.17.1g/dat/molecule/nanotubes/armchair_2_2.xml0000644000175000017500000001000611745545643021646 0ustar carloscarlos gamgi0.17.1g/dat/molecule/nanotubes/1clustermn.xml0000644000175000017500000054766512160605731021530 0ustar carloscarlos gamgi0.17.1g/dat/molecule/nanotubes/armchair_9_9.xml0000644000175000017500000005277007712566166021704 0ustar carloscarlos gamgi0.17.1g/dat/molecule/nanotubes/zigzag_12_0.xml0000644000175000017500000003440107712571042021426 0ustar carloscarlos gamgi0.17.1g/dat/molecule/flavors/0000755000175000017500000000000011021524071016330 5ustar carloscarlosgamgi0.17.1g/dat/molecule/flavors/garlic.xml0000644000175000017500000000372307745336524020346 0ustar carloscarlos gamgi0.17.1g/dat/molecule/flavors/cardamom_ginger.xml0000644000175000017500000000617207745335227022223 0ustar carloscarlos gamgi0.17.1g/dat/molecule/flavors/roses2.xml0000644000175000017500000000612107745336044020312 0ustar carloscarlos gamgi0.17.1g/dat/molecule/flavors/almonds2.xml0000644000175000017500000000071207745336250020613 0ustar carloscarlos gamgi0.17.1g/dat/molecule/flavors/sassafras.xml0000644000175000017500000000477707745334751021105 0ustar carloscarlos gamgi0.17.1g/dat/molecule/flavors/cinnamon.xml0000644000175000017500000000413207745336600020675 0ustar carloscarlos gamgi0.17.1g/dat/molecule/flavors/mustard.xml0000644000175000017500000000237407745334434020563 0ustar carloscarlos gamgi0.17.1g/dat/molecule/flavors/basil_cardamon.xml0000644000175000017500000000617107745335516022043 0ustar carloscarlos gamgi0.17.1g/dat/molecule/flavors/ginger_lemon.xml0000644000175000017500000000561107745335622021546 0ustar carloscarlos gamgi0.17.1g/dat/molecule/flavors/peppermint1.xml0000644000175000017500000000644407745334664021357 0ustar carloscarlos gamgi0.17.1g/dat/molecule/flavors/cardamon.xml0000644000175000017500000000613307745336333020665 0ustar carloscarlos gamgi0.17.1g/dat/molecule/flavors/basil1.xml0000644000175000017500000000611407745334640020252 0ustar carloscarlos gamgi0.17.1g/dat/molecule/flavors/roses3.xml0000644000175000017500000000425407745336744020327 0ustar carloscarlos gamgi0.17.1g/dat/molecule/flavors/basil2.xml0000644000175000017500000000441307745335413020252 0ustar carloscarlos gamgi0.17.1g/dat/molecule/flavors/roses1.xml0000644000175000017500000000607607745335675020333 0ustar carloscarlos gamgi0.17.1g/dat/molecule/flavors/peaches.xml0000644000175000017500000000750007745334651020511 0ustar carloscarlos gamgi0.17.1g/dat/molecule/flavors/cumin.xml0000644000175000017500000000507507745336644020225 0ustar carloscarlos gamgi0.17.1g/dat/molecule/flavors/README0000644000175000017500000000061307714452007017225 0ustar carloscarlos*********** * Flavors * *********** The files in this directory describe common flavors. They were prepared for Gamgi, by Carlos Pereira: http://www.gamgi.org/ **************** * Bibliography * **************** Structural data was obtained from: 1) Glactone's CD-ROM of PDB Files, Department of Chemistry, Georgia State University: http://chemistry.gsu.edu/cwcs/MM-CD/workshop02/readme.htm gamgi0.17.1g/dat/molecule/flavors/ginger.xml0000644000175000017500000000615507745336125020357 0ustar carloscarlos gamgi0.17.1g/dat/molecule/flavors/basil_cloves_roses.xml0000644000175000017500000000524607745335760022770 0ustar carloscarlos gamgi0.17.1g/dat/molecule/flavors/cardamom.xml0000644000175000017500000000564507745335305020671 0ustar carloscarlos gamgi0.17.1g/dat/molecule/flavors/almonds1.xml0000644000175000017500000000324207745335030020606 0ustar carloscarlos gamgi0.17.1g/dat/molecule/flavors/peppermint2.xml0000644000175000017500000000614207745335127021346 0ustar carloscarlos gamgi0.17.1g/dat/molecule/flavors/thyme.xml0000644000175000017500000000540207745335344020226 0ustar carloscarlos gamgi0.17.1g/dat/molecule/small/0000755000175000017500000000000012262633525016001 5ustar carloscarlosgamgi0.17.1g/dat/molecule/small/CCl4.xml0000644000175000017500000000120407714026447017252 0ustar carloscarlos gamgi0.17.1g/dat/molecule/small/OH.xml0000644000175000017500000000055407730142552017034 0ustar carloscarlos gamgi0.17.1g/dat/molecule/small/S8.xml0000644000175000017500000000172007714025730017014 0ustar carloscarlos gamgi0.17.1g/dat/molecule/small/H2O2.xml0000644000175000017500000000103107715517056017177 0ustar carloscarlos gamgi0.17.1g/dat/molecule/small/EtOH.xml0000644000175000017500000000226607714216260017327 0ustar carloscarlos gamgi0.17.1g/dat/molecule/small/H3PO4.xml0000644000175000017500000000167407715517261017335 0ustar carloscarlos gamgi0.17.1g/dat/molecule/small/H2O_H2O.xml0000644000175000017500000000145307714216424017567 0ustar carloscarlos gamgi0.17.1g/dat/molecule/small/H3O.xml0000644000175000017500000000114707730142614017115 0ustar carloscarlos gamgi0.17.1g/dat/molecule/small/O3.xml0000644000175000017500000000066307715516717017023 0ustar carloscarlos gamgi0.17.1g/dat/molecule/small/NH3.xml0000644000175000017500000000103307714025664017115 0ustar carloscarlos gamgi0.17.1g/dat/molecule/small/MeOH.xml0000644000175000017500000000152607714216124017315 0ustar carloscarlos gamgi0.17.1g/dat/molecule/small/README0000644000175000017500000000146311634417276016672 0ustar carloscarlos********* * Small * ********* The files in this directory describe small molecules. They were prepared for Gamgi, by Carlos Pereira: http://www.gamgi.org/ **************** * Bibliography * **************** Structural data was obtained from: 1) Richard Cornelius, Fei Liu and Jeff Frey, the Molecules website, Lebanon Valley College: http://www.molecules.org/ 2) Scot Wherland, Crystal Structure Data for Common Ions, Molecules, and Complexes Including Metalloproteins and their Metal Sites, Department of Chemistry, Washington State University: http://www.wsu.edu/~wherland/wwwlist01.htm 3) Carlos Pereira, PhD thesis, The Royal Institution of Great Britain, University College London (1997) Structural information was obtained from: 4) The Cambridge Crystallographic Data Centre: http://www.ccdc.cam.ac.uk/ gamgi0.17.1g/dat/molecule/small/HCl.xml0000644000175000017500000000051407715517012017170 0ustar carloscarlos gamgi0.17.1g/dat/molecule/small/H2O.xml0000644000175000017500000000074507714216147017124 0ustar carloscarlos gamgi0.17.1g/dat/molecule/small/H2SO4.xml0000644000175000017500000000154710450760562017330 0ustar carloscarlos gamgi0.17.1g/dat/molecule/aminoacids/0000755000175000017500000000000011634417227017001 5ustar carloscarlosgamgi0.17.1g/dat/molecule/aminoacids/histidine.xml0000644000175000017500000000433007712743541021506 0ustar carloscarlos gamgi0.17.1g/dat/molecule/aminoacids/alanine.xml0000644000175000017500000000270607712743054021141 0ustar carloscarlos gamgi0.17.1g/dat/molecule/aminoacids/glutamine.xml0000644000175000017500000000425307712746433021522 0ustar carloscarlos gamgi0.17.1g/dat/molecule/aminoacids/phenalalanine.xml0000644000175000017500000000511507712744026022326 0ustar carloscarlos gamgi0.17.1g/dat/molecule/aminoacids/cysteine.xml0000644000175000017500000000305507712743273021356 0ustar carloscarlos gamgi0.17.1g/dat/molecule/aminoacids/proline.xml0000644000175000017500000000360707712744071021203 0ustar carloscarlos gamgi0.17.1g/dat/molecule/aminoacids/glycine.xml0000644000175000017500000000221307712743500021151 0ustar carloscarlos gamgi0.17.1g/dat/molecule/aminoacids/leucine.xml0000644000175000017500000000454607712743643021166 0ustar carloscarlos gamgi0.17.1g/dat/molecule/aminoacids/lysine.xml0000644000175000017500000000523507712743703021036 0ustar carloscarlos gamgi0.17.1g/dat/molecule/aminoacids/arginine.xml0000644000175000017500000000542707712743111021323 0ustar carloscarlos gamgi0.17.1g/dat/molecule/aminoacids/isoleucine.xml0000644000175000017500000000456307712743602021673 0ustar carloscarlos gamgi0.17.1g/dat/molecule/aminoacids/asparagine.xml0000644000175000017500000000355207712743156021647 0ustar carloscarlos gamgi0.17.1g/dat/molecule/aminoacids/valine.xml0000644000175000017500000000406507712744325021012 0ustar carloscarlos gamgi0.17.1g/dat/molecule/aminoacids/README0000644000175000017500000000106507714451670017667 0ustar carloscarlos************** * Aminoacids * ************** The files in this directory describe the 20 aminoacids usually found in proteines. They were prepared for Gamgi, by Carlos Pereira: http://www.gamgi.org/ **************** * Bibliography * **************** Structural data was obtained from: 1) the Mathmol library of molecular structures, Scientific Visualization Center, New York University: http://www.nyu.edu/pages/mathmol/library/index.html Structural information was obtained from: 2) Luis S. Campos, Entender a Bioquímica, 3ª Edição, Escolar Editora (2002) gamgi0.17.1g/dat/molecule/aminoacids/serine.xml0000644000175000017500000000305407712744133021013 0ustar carloscarlos gamgi0.17.1g/dat/molecule/aminoacids/threonine.xml0000644000175000017500000000355007712744173021526 0ustar carloscarlos gamgi0.17.1g/dat/molecule/aminoacids/aspartic_acid.xml0000644000175000017500000000341207712745667022327 0ustar carloscarlos gamgi0.17.1g/dat/molecule/aminoacids/tryptophan.xml0000644000175000017500000000603607712744231021740 0ustar carloscarlos gamgi0.17.1g/dat/molecule/aminoacids/glutamic_acid.xml0000644000175000017500000000407707712743357022330 0ustar carloscarlos gamgi0.17.1g/dat/molecule/aminoacids/methionine.xml0000644000175000017500000000424007712743763021673 0ustar carloscarlos gamgi0.17.1g/dat/molecule/aminoacids/tyrosine.xml0000644000175000017500000000526507712744267021420 0ustar carloscarlos gamgi0.17.1g/dat/molecule/silicates/0000755000175000017500000000000011315410375016643 5ustar carloscarlosgamgi0.17.1g/dat/molecule/silicates/q31q13.xml0000644000175000017500000000555307714206241020331 0ustar carloscarlos gamgi0.17.1g/dat/molecule/silicates/q32q23c.xml0000644000175000017500000000566507714206514020505 0ustar carloscarlos gamgi0.17.1g/dat/molecule/silicates/q32.xml0000644000175000017500000000373607714205003020001 0ustar carloscarlos gamgi0.17.1g/dat/molecule/silicates/q21.xml0000644000175000017500000000320207714200275017771 0ustar carloscarlos gamgi0.17.1g/dat/molecule/silicates/q22q21.xml0000644000175000017500000000556307714206406020334 0ustar carloscarlos gamgi0.17.1g/dat/molecule/silicates/q83.xml0000644000175000017500000000772507714201072020013 0ustar carloscarlos gamgi0.17.1g/dat/molecule/silicates/q41q14.xml0000644000175000017500000000673207714206003020327 0ustar carloscarlos gamgi0.17.1g/dat/molecule/silicates/q32q23e.xml0000644000175000017500000000566707714206611020507 0ustar carloscarlos gamgi0.17.1g/dat/molecule/silicates/q52.xml0000644000175000017500000000631307714205477020014 0ustar carloscarlos gamgi0.17.1g/dat/molecule/silicates/q62.xml0000644000175000017500000000750007714205363020006 0ustar carloscarlos gamgi0.17.1g/dat/molecule/silicates/q42.xml0000644000175000017500000000512407714205316020002 0ustar carloscarlos gamgi0.17.1g/dat/molecule/silicates/q21q12.xml0000644000175000017500000000437007714204657020334 0ustar carloscarlos gamgi0.17.1g/dat/molecule/silicates/q22q14q13q11.xml0000644000175000017500000000566307714214071021204 0ustar carloscarlos gamgi0.17.1g/dat/molecule/silicates/teos.xml0000644000175000017500000000673107714177707020367 0ustar carloscarlos gamgi0.17.1g/dat/molecule/silicates/q23q21q12c.xml0000644000175000017500000000633407714175516021030 0ustar carloscarlos gamgi0.17.1g/dat/molecule/silicates/q22q13q11.xml0000644000175000017500000000514007714213730020645 0ustar carloscarlos gamgi0.17.1g/dat/molecule/silicates/q10.xml0000644000175000017500000000202411315447720017770 0ustar carloscarlos gamgi0.17.1g/dat/molecule/silicates/q33q12q11.xml0000644000175000017500000000567007714207561020663 0ustar carloscarlos gamgi0.17.1g/dat/molecule/silicates/README0000644000175000017500000000055407714452641017541 0ustar carloscarlos************* * Silicates * ************* The files in this directory describe silicate clusters. They were prepared for Gamgi, by Carlos Pereira: http://www.gamgi.org/ **************** * Bibliography * **************** Structural data was obtained from: 1) Carlos Pereira, PhD thesis, The Royal Institution of Great Britain, University College London (1997) gamgi0.17.1g/dat/molecule/silicates/q32q21.xml0000644000175000017500000000673307714207411020332 0ustar carloscarlos gamgi0.17.1g/dat/molecule/silicates/q31q13q12.xml0000644000175000017500000000675107714210113020647 0ustar carloscarlos gamgi0.17.1g/dat/molecule/silicates/q23q21q12t.xml0000644000175000017500000000632007714207051021032 0ustar carloscarlos gamgi0.17.1g/dat/molecule/silicates/tmos.xml0000644000175000017500000000436007714200003020343 0ustar carloscarlos gamgi0.17.1g/dat/molecule/silicates/q32q13q11.xml0000644000175000017500000000631207714207705020655 0ustar carloscarlos gamgi0.17.1g/dat/molecule/silicates/q42q14.xml0000644000175000017500000000567407714206115020340 0ustar carloscarlos gamgi0.17.1g/dat/molecule/styles1.xml0000644000175000017500000001677407765157153017050 0ustar carloscarlos gamgi0.17.1g/dat/molecule/fullerenes/0000755000175000017500000000000012267054003017026 5ustar carloscarlosgamgi0.17.1g/dat/molecule/fullerenes/C540.xml0000644000175000017500000020612407715731527020207 0ustar carloscarlos gamgi0.17.1g/dat/molecule/fullerenes/C60_cfc_polyhedra.xml0000644000175000017500000010715412267053747023010 0ustar carloscarlos -0.9999 0.7485 -3.3283 0.3888 1.1760 -3.3318 -1.9435 1.4581 -2.5944 -1.0224 -0.7043 -3.3286 -1.5410 2.6272 -1.8311 -0.2124 3.0361 -1.8345 0.7737 2.2944 -2.6014 1.2244 -0.0126 -3.3343 -2.9523 0.7472 -1.8278 2.0116 2.2749 -1.8408 -2.3010 2.6388 -0.5929 0.3522 -1.1746 -3.3323 0.4160 3.4748 -0.6001 -1.9877 -1.3846 -2.5951 -3.1733 1.4770 -0.5910 -2.9740 -0.6427 -1.8282 1.7905 3.0043 -0.6038 2.4086 -0.0312 -2.6064 2.8110 1.1377 -1.8432 -1.6997 3.0587 0.5882 -0.3111 3.4859 0.5847 0.7020 -2.3049 -2.6024 -3.4066 0.7857 0.5922 -1.6221 -2.5658 -1.8323 -3.2179 -1.3654 -0.5916 2.3782 2.5650 0.5771 2.7743 -1.2126 -1.8438 -1.9435 2.3362 1.8249 3.4252 0.6787 -0.6090 0.3033 3.0270 1.8190 -0.3069 -3.0159 -1.8359 1.9397 -2.3244 -1.8418 -3.4295 -0.6669 0.5918 -2.7783 1.2248 1.8267 1.6183 2.5766 1.8154 -2.3825 -2.5540 -0.5942 3.2136 1.3765 0.5746 -0.7057 2.3165 2.5857 3.4024 -0.7740 -0.6093 -2.4131 0.0435 2.5896 -2.8156 -1.1255 1.8262 1.9837 1.3952 2.5783 0.3071 -3.4746 -0.6016 -0.3563 1.1863 3.3158 1.6956 -3.0473 -0.6053 2.9697 0.6534 1.8112 -1.7950 -2.9926 0.5868 -1.2290 0.0247 3.3177 3.1687 -1.4657 0.5738 1.0182 0.7154 3.3120 -2.0164 -2.2628 1.8237 -0.4206 -3.4632 0.5830 2.9476 -0.7364 1.8109 2.2965 -2.6274 0.5759 -0.3938 -1.1642 3.3150 0.9950 -0.7373 3.3114 -0.7789 -2.2825 2.5845 1.9385 -1.4471 2.5774 0.2073 -3.0244 1.8176 1.5360 -2.6158 1.8140 32 5 0 1 7 11 3 6 1 6 9 18 17 7 5 49 43 47 54 55 6 1 0 2 4 5 6 5 30 21 31 44 42 6 9 16 25 36 28 18 5 4 2 8 14 10 5 9 6 5 12 16 6 5 4 10 19 20 12 5 15 13 23 35 24 6 11 7 17 26 31 21 6 8 15 24 32 22 14 6 0 3 13 15 8 2 5 20 19 27 37 29 5 17 18 28 38 26 6 16 12 20 29 34 25 6 10 14 22 33 27 19 6 42 44 53 59 58 51 5 36 25 34 41 45 5 53 48 52 57 59 6 57 55 54 56 58 59 6 44 31 26 38 48 53 6 13 3 11 21 30 23 6 45 41 49 55 57 52 6 32 24 35 46 50 40 6 35 23 30 42 51 46 5 22 32 40 39 33 6 39 40 50 56 54 47 6 37 27 33 39 47 43 6 34 29 37 43 49 41 6 28 36 45 52 48 38 5 50 46 51 58 56 -0.9999 0.7485 -3.3283 0.3888 1.1760 -3.3318 -1.9435 1.4581 -2.5944 -1.0224 -0.7043 -3.3286 -1.5410 2.6272 -1.8311 -0.2124 3.0361 -1.8345 0.7737 2.2944 -2.6014 1.2244 -0.0126 -3.3343 -2.9523 0.7472 -1.8278 2.0116 2.2749 -1.8408 -2.3010 2.6388 -0.5929 0.3522 -1.1746 -3.3323 0.4160 3.4748 -0.6001 -1.9877 -1.3846 -2.5951 -3.1733 1.4770 -0.5910 -2.9740 -0.6427 -1.8282 1.7905 3.0043 -0.6038 2.4086 -0.0312 -2.6064 2.8110 1.1377 -1.8432 -1.6997 3.0587 0.5882 -0.3111 3.4859 0.5847 0.7020 -2.3049 -2.6024 -3.4066 0.7857 0.5922 -1.6221 -2.5658 -1.8323 -3.2179 -1.3654 -0.5916 2.3782 2.5650 0.5771 2.7743 -1.2126 -1.8438 -1.9435 2.3362 1.8249 3.4252 0.6787 -0.6090 0.3033 3.0270 1.8190 -0.3069 -3.0159 -1.8359 1.9397 -2.3244 -1.8418 -3.4295 -0.6669 0.5918 -2.7783 1.2248 1.8267 1.6183 2.5766 1.8154 -2.3825 -2.5540 -0.5942 3.2136 1.3765 0.5746 -0.7057 2.3165 2.5857 3.4024 -0.7740 -0.6093 -2.4131 0.0435 2.5896 -2.8156 -1.1255 1.8262 1.9837 1.3952 2.5783 0.3071 -3.4746 -0.6016 -0.3563 1.1863 3.3158 1.6956 -3.0473 -0.6053 2.9697 0.6534 1.8112 -1.7950 -2.9926 0.5868 -1.2290 0.0247 3.3177 3.1687 -1.4657 0.5738 1.0182 0.7154 3.3120 -2.0164 -2.2628 1.8237 -0.4206 -3.4632 0.5830 2.9476 -0.7364 1.8109 2.2965 -2.6274 0.5759 -0.3938 -1.1642 3.3150 0.9950 -0.7373 3.3114 -0.7789 -2.2825 2.5845 1.9385 -1.4471 2.5774 0.2073 -3.0244 1.8176 1.5360 -2.6158 1.8140 32 5 0 1 7 11 3 6 1 6 9 18 17 7 5 49 43 47 54 55 6 1 0 2 4 5 6 5 30 21 31 44 42 6 9 16 25 36 28 18 5 4 2 8 14 10 5 9 6 5 12 16 6 5 4 10 19 20 12 5 15 13 23 35 24 6 11 7 17 26 31 21 6 8 15 24 32 22 14 6 0 3 13 15 8 2 5 20 19 27 37 29 5 17 18 28 38 26 6 16 12 20 29 34 25 6 10 14 22 33 27 19 6 42 44 53 59 58 51 5 36 25 34 41 45 5 53 48 52 57 59 6 57 55 54 56 58 59 6 44 31 26 38 48 53 6 13 3 11 21 30 23 6 45 41 49 55 57 52 6 32 24 35 46 50 40 6 35 23 30 42 51 46 5 22 32 40 39 33 6 39 40 50 56 54 47 6 37 27 33 39 47 43 6 34 29 37 43 49 41 6 28 36 45 52 48 38 5 50 46 51 58 56 -0.9999 0.7485 -3.3283 0.3888 1.1760 -3.3318 -1.9435 1.4581 -2.5944 -1.0224 -0.7043 -3.3286 -1.5410 2.6272 -1.8311 -0.2124 3.0361 -1.8345 0.7737 2.2944 -2.6014 1.2244 -0.0126 -3.3343 -2.9523 0.7472 -1.8278 2.0116 2.2749 -1.8408 -2.3010 2.6388 -0.5929 0.3522 -1.1746 -3.3323 0.4160 3.4748 -0.6001 -1.9877 -1.3846 -2.5951 -3.1733 1.4770 -0.5910 -2.9740 -0.6427 -1.8282 1.7905 3.0043 -0.6038 2.4086 -0.0312 -2.6064 2.8110 1.1377 -1.8432 -1.6997 3.0587 0.5882 -0.3111 3.4859 0.5847 0.7020 -2.3049 -2.6024 -3.4066 0.7857 0.5922 -1.6221 -2.5658 -1.8323 -3.2179 -1.3654 -0.5916 2.3782 2.5650 0.5771 2.7743 -1.2126 -1.8438 -1.9435 2.3362 1.8249 3.4252 0.6787 -0.6090 0.3033 3.0270 1.8190 -0.3069 -3.0159 -1.8359 1.9397 -2.3244 -1.8418 -3.4295 -0.6669 0.5918 -2.7783 1.2248 1.8267 1.6183 2.5766 1.8154 -2.3825 -2.5540 -0.5942 3.2136 1.3765 0.5746 -0.7057 2.3165 2.5857 3.4024 -0.7740 -0.6093 -2.4131 0.0435 2.5896 -2.8156 -1.1255 1.8262 1.9837 1.3952 2.5783 0.3071 -3.4746 -0.6016 -0.3563 1.1863 3.3158 1.6956 -3.0473 -0.6053 2.9697 0.6534 1.8112 -1.7950 -2.9926 0.5868 -1.2290 0.0247 3.3177 3.1687 -1.4657 0.5738 1.0182 0.7154 3.3120 -2.0164 -2.2628 1.8237 -0.4206 -3.4632 0.5830 2.9476 -0.7364 1.8109 2.2965 -2.6274 0.5759 -0.3938 -1.1642 3.3150 0.9950 -0.7373 3.3114 -0.7789 -2.2825 2.5845 1.9385 -1.4471 2.5774 0.2073 -3.0244 1.8176 1.5360 -2.6158 1.8140 32 5 0 1 7 11 3 6 1 6 9 18 17 7 5 49 43 47 54 55 6 1 0 2 4 5 6 5 30 21 31 44 42 6 9 16 25 36 28 18 5 4 2 8 14 10 5 9 6 5 12 16 6 5 4 10 19 20 12 5 15 13 23 35 24 6 11 7 17 26 31 21 6 8 15 24 32 22 14 6 0 3 13 15 8 2 5 20 19 27 37 29 5 17 18 28 38 26 6 16 12 20 29 34 25 6 10 14 22 33 27 19 6 42 44 53 59 58 51 5 36 25 34 41 45 5 53 48 52 57 59 6 57 55 54 56 58 59 6 44 31 26 38 48 53 6 13 3 11 21 30 23 6 45 41 49 55 57 52 6 32 24 35 46 50 40 6 35 23 30 42 51 46 5 22 32 40 39 33 6 39 40 50 56 54 47 6 37 27 33 39 47 43 6 34 29 37 43 49 41 6 28 36 45 52 48 38 5 50 46 51 58 56 -0.9999 0.7485 -3.3283 0.3888 1.1760 -3.3318 -1.9435 1.4581 -2.5944 -1.0224 -0.7043 -3.3286 -1.5410 2.6272 -1.8311 -0.2124 3.0361 -1.8345 0.7737 2.2944 -2.6014 1.2244 -0.0126 -3.3343 -2.9523 0.7472 -1.8278 2.0116 2.2749 -1.8408 -2.3010 2.6388 -0.5929 0.3522 -1.1746 -3.3323 0.4160 3.4748 -0.6001 -1.9877 -1.3846 -2.5951 -3.1733 1.4770 -0.5910 -2.9740 -0.6427 -1.8282 1.7905 3.0043 -0.6038 2.4086 -0.0312 -2.6064 2.8110 1.1377 -1.8432 -1.6997 3.0587 0.5882 -0.3111 3.4859 0.5847 0.7020 -2.3049 -2.6024 -3.4066 0.7857 0.5922 -1.6221 -2.5658 -1.8323 -3.2179 -1.3654 -0.5916 2.3782 2.5650 0.5771 2.7743 -1.2126 -1.8438 -1.9435 2.3362 1.8249 3.4252 0.6787 -0.6090 0.3033 3.0270 1.8190 -0.3069 -3.0159 -1.8359 1.9397 -2.3244 -1.8418 -3.4295 -0.6669 0.5918 -2.7783 1.2248 1.8267 1.6183 2.5766 1.8154 -2.3825 -2.5540 -0.5942 3.2136 1.3765 0.5746 -0.7057 2.3165 2.5857 3.4024 -0.7740 -0.6093 -2.4131 0.0435 2.5896 -2.8156 -1.1255 1.8262 1.9837 1.3952 2.5783 0.3071 -3.4746 -0.6016 -0.3563 1.1863 3.3158 1.6956 -3.0473 -0.6053 2.9697 0.6534 1.8112 -1.7950 -2.9926 0.5868 -1.2290 0.0247 3.3177 3.1687 -1.4657 0.5738 1.0182 0.7154 3.3120 -2.0164 -2.2628 1.8237 -0.4206 -3.4632 0.5830 2.9476 -0.7364 1.8109 2.2965 -2.6274 0.5759 -0.3938 -1.1642 3.3150 0.9950 -0.7373 3.3114 -0.7789 -2.2825 2.5845 1.9385 -1.4471 2.5774 0.2073 -3.0244 1.8176 1.5360 -2.6158 1.8140 32 5 0 1 7 11 3 6 1 6 9 18 17 7 5 49 43 47 54 55 6 1 0 2 4 5 6 5 30 21 31 44 42 6 9 16 25 36 28 18 5 4 2 8 14 10 5 9 6 5 12 16 6 5 4 10 19 20 12 5 15 13 23 35 24 6 11 7 17 26 31 21 6 8 15 24 32 22 14 6 0 3 13 15 8 2 5 20 19 27 37 29 5 17 18 28 38 26 6 16 12 20 29 34 25 6 10 14 22 33 27 19 6 42 44 53 59 58 51 5 36 25 34 41 45 5 53 48 52 57 59 6 57 55 54 56 58 59 6 44 31 26 38 48 53 6 13 3 11 21 30 23 6 45 41 49 55 57 52 6 32 24 35 46 50 40 6 35 23 30 42 51 46 5 22 32 40 39 33 6 39 40 50 56 54 47 6 37 27 33 39 47 43 6 34 29 37 43 49 41 6 28 36 45 52 48 38 5 50 46 51 58 56 -0.9999 0.7485 -3.3283 0.3888 1.1760 -3.3318 -1.9435 1.4581 -2.5944 -1.0224 -0.7043 -3.3286 -1.5410 2.6272 -1.8311 -0.2124 3.0361 -1.8345 0.7737 2.2944 -2.6014 1.2244 -0.0126 -3.3343 -2.9523 0.7472 -1.8278 2.0116 2.2749 -1.8408 -2.3010 2.6388 -0.5929 0.3522 -1.1746 -3.3323 0.4160 3.4748 -0.6001 -1.9877 -1.3846 -2.5951 -3.1733 1.4770 -0.5910 -2.9740 -0.6427 -1.8282 1.7905 3.0043 -0.6038 2.4086 -0.0312 -2.6064 2.8110 1.1377 -1.8432 -1.6997 3.0587 0.5882 -0.3111 3.4859 0.5847 0.7020 -2.3049 -2.6024 -3.4066 0.7857 0.5922 -1.6221 -2.5658 -1.8323 -3.2179 -1.3654 -0.5916 2.3782 2.5650 0.5771 2.7743 -1.2126 -1.8438 -1.9435 2.3362 1.8249 3.4252 0.6787 -0.6090 0.3033 3.0270 1.8190 -0.3069 -3.0159 -1.8359 1.9397 -2.3244 -1.8418 -3.4295 -0.6669 0.5918 -2.7783 1.2248 1.8267 1.6183 2.5766 1.8154 -2.3825 -2.5540 -0.5942 3.2136 1.3765 0.5746 -0.7057 2.3165 2.5857 3.4024 -0.7740 -0.6093 -2.4131 0.0435 2.5896 -2.8156 -1.1255 1.8262 1.9837 1.3952 2.5783 0.3071 -3.4746 -0.6016 -0.3563 1.1863 3.3158 1.6956 -3.0473 -0.6053 2.9697 0.6534 1.8112 -1.7950 -2.9926 0.5868 -1.2290 0.0247 3.3177 3.1687 -1.4657 0.5738 1.0182 0.7154 3.3120 -2.0164 -2.2628 1.8237 -0.4206 -3.4632 0.5830 2.9476 -0.7364 1.8109 2.2965 -2.6274 0.5759 -0.3938 -1.1642 3.3150 0.9950 -0.7373 3.3114 -0.7789 -2.2825 2.5845 1.9385 -1.4471 2.5774 0.2073 -3.0244 1.8176 1.5360 -2.6158 1.8140 32 5 0 1 7 11 3 6 1 6 9 18 17 7 5 49 43 47 54 55 6 1 0 2 4 5 6 5 30 21 31 44 42 6 9 16 25 36 28 18 5 4 2 8 14 10 5 9 6 5 12 16 6 5 4 10 19 20 12 5 15 13 23 35 24 6 11 7 17 26 31 21 6 8 15 24 32 22 14 6 0 3 13 15 8 2 5 20 19 27 37 29 5 17 18 28 38 26 6 16 12 20 29 34 25 6 10 14 22 33 27 19 6 42 44 53 59 58 51 5 36 25 34 41 45 5 53 48 52 57 59 6 57 55 54 56 58 59 6 44 31 26 38 48 53 6 13 3 11 21 30 23 6 45 41 49 55 57 52 6 32 24 35 46 50 40 6 35 23 30 42 51 46 5 22 32 40 39 33 6 39 40 50 56 54 47 6 37 27 33 39 47 43 6 34 29 37 43 49 41 6 28 36 45 52 48 38 5 50 46 51 58 56 -0.9999 0.7485 -3.3283 0.3888 1.1760 -3.3318 -1.9435 1.4581 -2.5944 -1.0224 -0.7043 -3.3286 -1.5410 2.6272 -1.8311 -0.2124 3.0361 -1.8345 0.7737 2.2944 -2.6014 1.2244 -0.0126 -3.3343 -2.9523 0.7472 -1.8278 2.0116 2.2749 -1.8408 -2.3010 2.6388 -0.5929 0.3522 -1.1746 -3.3323 0.4160 3.4748 -0.6001 -1.9877 -1.3846 -2.5951 -3.1733 1.4770 -0.5910 -2.9740 -0.6427 -1.8282 1.7905 3.0043 -0.6038 2.4086 -0.0312 -2.6064 2.8110 1.1377 -1.8432 -1.6997 3.0587 0.5882 -0.3111 3.4859 0.5847 0.7020 -2.3049 -2.6024 -3.4066 0.7857 0.5922 -1.6221 -2.5658 -1.8323 -3.2179 -1.3654 -0.5916 2.3782 2.5650 0.5771 2.7743 -1.2126 -1.8438 -1.9435 2.3362 1.8249 3.4252 0.6787 -0.6090 0.3033 3.0270 1.8190 -0.3069 -3.0159 -1.8359 1.9397 -2.3244 -1.8418 -3.4295 -0.6669 0.5918 -2.7783 1.2248 1.8267 1.6183 2.5766 1.8154 -2.3825 -2.5540 -0.5942 3.2136 1.3765 0.5746 -0.7057 2.3165 2.5857 3.4024 -0.7740 -0.6093 -2.4131 0.0435 2.5896 -2.8156 -1.1255 1.8262 1.9837 1.3952 2.5783 0.3071 -3.4746 -0.6016 -0.3563 1.1863 3.3158 1.6956 -3.0473 -0.6053 2.9697 0.6534 1.8112 -1.7950 -2.9926 0.5868 -1.2290 0.0247 3.3177 3.1687 -1.4657 0.5738 1.0182 0.7154 3.3120 -2.0164 -2.2628 1.8237 -0.4206 -3.4632 0.5830 2.9476 -0.7364 1.8109 2.2965 -2.6274 0.5759 -0.3938 -1.1642 3.3150 0.9950 -0.7373 3.3114 -0.7789 -2.2825 2.5845 1.9385 -1.4471 2.5774 0.2073 -3.0244 1.8176 1.5360 -2.6158 1.8140 32 5 0 1 7 11 3 6 1 6 9 18 17 7 5 49 43 47 54 55 6 1 0 2 4 5 6 5 30 21 31 44 42 6 9 16 25 36 28 18 5 4 2 8 14 10 5 9 6 5 12 16 6 5 4 10 19 20 12 5 15 13 23 35 24 6 11 7 17 26 31 21 6 8 15 24 32 22 14 6 0 3 13 15 8 2 5 20 19 27 37 29 5 17 18 28 38 26 6 16 12 20 29 34 25 6 10 14 22 33 27 19 6 42 44 53 59 58 51 5 36 25 34 41 45 5 53 48 52 57 59 6 57 55 54 56 58 59 6 44 31 26 38 48 53 6 13 3 11 21 30 23 6 45 41 49 55 57 52 6 32 24 35 46 50 40 6 35 23 30 42 51 46 5 22 32 40 39 33 6 39 40 50 56 54 47 6 37 27 33 39 47 43 6 34 29 37 43 49 41 6 28 36 45 52 48 38 5 50 46 51 58 56 -0.9999 0.7485 -3.3283 0.3888 1.1760 -3.3318 -1.9435 1.4581 -2.5944 -1.0224 -0.7043 -3.3286 -1.5410 2.6272 -1.8311 -0.2124 3.0361 -1.8345 0.7737 2.2944 -2.6014 1.2244 -0.0126 -3.3343 -2.9523 0.7472 -1.8278 2.0116 2.2749 -1.8408 -2.3010 2.6388 -0.5929 0.3522 -1.1746 -3.3323 0.4160 3.4748 -0.6001 -1.9877 -1.3846 -2.5951 -3.1733 1.4770 -0.5910 -2.9740 -0.6427 -1.8282 1.7905 3.0043 -0.6038 2.4086 -0.0312 -2.6064 2.8110 1.1377 -1.8432 -1.6997 3.0587 0.5882 -0.3111 3.4859 0.5847 0.7020 -2.3049 -2.6024 -3.4066 0.7857 0.5922 -1.6221 -2.5658 -1.8323 -3.2179 -1.3654 -0.5916 2.3782 2.5650 0.5771 2.7743 -1.2126 -1.8438 -1.9435 2.3362 1.8249 3.4252 0.6787 -0.6090 0.3033 3.0270 1.8190 -0.3069 -3.0159 -1.8359 1.9397 -2.3244 -1.8418 -3.4295 -0.6669 0.5918 -2.7783 1.2248 1.8267 1.6183 2.5766 1.8154 -2.3825 -2.5540 -0.5942 3.2136 1.3765 0.5746 -0.7057 2.3165 2.5857 3.4024 -0.7740 -0.6093 -2.4131 0.0435 2.5896 -2.8156 -1.1255 1.8262 1.9837 1.3952 2.5783 0.3071 -3.4746 -0.6016 -0.3563 1.1863 3.3158 1.6956 -3.0473 -0.6053 2.9697 0.6534 1.8112 -1.7950 -2.9926 0.5868 -1.2290 0.0247 3.3177 3.1687 -1.4657 0.5738 1.0182 0.7154 3.3120 -2.0164 -2.2628 1.8237 -0.4206 -3.4632 0.5830 2.9476 -0.7364 1.8109 2.2965 -2.6274 0.5759 -0.3938 -1.1642 3.3150 0.9950 -0.7373 3.3114 -0.7789 -2.2825 2.5845 1.9385 -1.4471 2.5774 0.2073 -3.0244 1.8176 1.5360 -2.6158 1.8140 32 5 0 1 7 11 3 6 1 6 9 18 17 7 5 49 43 47 54 55 6 1 0 2 4 5 6 5 30 21 31 44 42 6 9 16 25 36 28 18 5 4 2 8 14 10 5 9 6 5 12 16 6 5 4 10 19 20 12 5 15 13 23 35 24 6 11 7 17 26 31 21 6 8 15 24 32 22 14 6 0 3 13 15 8 2 5 20 19 27 37 29 5 17 18 28 38 26 6 16 12 20 29 34 25 6 10 14 22 33 27 19 6 42 44 53 59 58 51 5 36 25 34 41 45 5 53 48 52 57 59 6 57 55 54 56 58 59 6 44 31 26 38 48 53 6 13 3 11 21 30 23 6 45 41 49 55 57 52 6 32 24 35 46 50 40 6 35 23 30 42 51 46 5 22 32 40 39 33 6 39 40 50 56 54 47 6 37 27 33 39 47 43 6 34 29 37 43 49 41 6 28 36 45 52 48 38 5 50 46 51 58 56 -0.9999 0.7485 -3.3283 0.3888 1.1760 -3.3318 -1.9435 1.4581 -2.5944 -1.0224 -0.7043 -3.3286 -1.5410 2.6272 -1.8311 -0.2124 3.0361 -1.8345 0.7737 2.2944 -2.6014 1.2244 -0.0126 -3.3343 -2.9523 0.7472 -1.8278 2.0116 2.2749 -1.8408 -2.3010 2.6388 -0.5929 0.3522 -1.1746 -3.3323 0.4160 3.4748 -0.6001 -1.9877 -1.3846 -2.5951 -3.1733 1.4770 -0.5910 -2.9740 -0.6427 -1.8282 1.7905 3.0043 -0.6038 2.4086 -0.0312 -2.6064 2.8110 1.1377 -1.8432 -1.6997 3.0587 0.5882 -0.3111 3.4859 0.5847 0.7020 -2.3049 -2.6024 -3.4066 0.7857 0.5922 -1.6221 -2.5658 -1.8323 -3.2179 -1.3654 -0.5916 2.3782 2.5650 0.5771 2.7743 -1.2126 -1.8438 -1.9435 2.3362 1.8249 3.4252 0.6787 -0.6090 0.3033 3.0270 1.8190 -0.3069 -3.0159 -1.8359 1.9397 -2.3244 -1.8418 -3.4295 -0.6669 0.5918 -2.7783 1.2248 1.8267 1.6183 2.5766 1.8154 -2.3825 -2.5540 -0.5942 3.2136 1.3765 0.5746 -0.7057 2.3165 2.5857 3.4024 -0.7740 -0.6093 -2.4131 0.0435 2.5896 -2.8156 -1.1255 1.8262 1.9837 1.3952 2.5783 0.3071 -3.4746 -0.6016 -0.3563 1.1863 3.3158 1.6956 -3.0473 -0.6053 2.9697 0.6534 1.8112 -1.7950 -2.9926 0.5868 -1.2290 0.0247 3.3177 3.1687 -1.4657 0.5738 1.0182 0.7154 3.3120 -2.0164 -2.2628 1.8237 -0.4206 -3.4632 0.5830 2.9476 -0.7364 1.8109 2.2965 -2.6274 0.5759 -0.3938 -1.1642 3.3150 0.9950 -0.7373 3.3114 -0.7789 -2.2825 2.5845 1.9385 -1.4471 2.5774 0.2073 -3.0244 1.8176 1.5360 -2.6158 1.8140 32 5 0 1 7 11 3 6 1 6 9 18 17 7 5 49 43 47 54 55 6 1 0 2 4 5 6 5 30 21 31 44 42 6 9 16 25 36 28 18 5 4 2 8 14 10 5 9 6 5 12 16 6 5 4 10 19 20 12 5 15 13 23 35 24 6 11 7 17 26 31 21 6 8 15 24 32 22 14 6 0 3 13 15 8 2 5 20 19 27 37 29 5 17 18 28 38 26 6 16 12 20 29 34 25 6 10 14 22 33 27 19 6 42 44 53 59 58 51 5 36 25 34 41 45 5 53 48 52 57 59 6 57 55 54 56 58 59 6 44 31 26 38 48 53 6 13 3 11 21 30 23 6 45 41 49 55 57 52 6 32 24 35 46 50 40 6 35 23 30 42 51 46 5 22 32 40 39 33 6 39 40 50 56 54 47 6 37 27 33 39 47 43 6 34 29 37 43 49 41 6 28 36 45 52 48 38 5 50 46 51 58 56 -0.9999 0.7485 -3.3283 0.3888 1.1760 -3.3318 -1.9435 1.4581 -2.5944 -1.0224 -0.7043 -3.3286 -1.5410 2.6272 -1.8311 -0.2124 3.0361 -1.8345 0.7737 2.2944 -2.6014 1.2244 -0.0126 -3.3343 -2.9523 0.7472 -1.8278 2.0116 2.2749 -1.8408 -2.3010 2.6388 -0.5929 0.3522 -1.1746 -3.3323 0.4160 3.4748 -0.6001 -1.9877 -1.3846 -2.5951 -3.1733 1.4770 -0.5910 -2.9740 -0.6427 -1.8282 1.7905 3.0043 -0.6038 2.4086 -0.0312 -2.6064 2.8110 1.1377 -1.8432 -1.6997 3.0587 0.5882 -0.3111 3.4859 0.5847 0.7020 -2.3049 -2.6024 -3.4066 0.7857 0.5922 -1.6221 -2.5658 -1.8323 -3.2179 -1.3654 -0.5916 2.3782 2.5650 0.5771 2.7743 -1.2126 -1.8438 -1.9435 2.3362 1.8249 3.4252 0.6787 -0.6090 0.3033 3.0270 1.8190 -0.3069 -3.0159 -1.8359 1.9397 -2.3244 -1.8418 -3.4295 -0.6669 0.5918 -2.7783 1.2248 1.8267 1.6183 2.5766 1.8154 -2.3825 -2.5540 -0.5942 3.2136 1.3765 0.5746 -0.7057 2.3165 2.5857 3.4024 -0.7740 -0.6093 -2.4131 0.0435 2.5896 -2.8156 -1.1255 1.8262 1.9837 1.3952 2.5783 0.3071 -3.4746 -0.6016 -0.3563 1.1863 3.3158 1.6956 -3.0473 -0.6053 2.9697 0.6534 1.8112 -1.7950 -2.9926 0.5868 -1.2290 0.0247 3.3177 3.1687 -1.4657 0.5738 1.0182 0.7154 3.3120 -2.0164 -2.2628 1.8237 -0.4206 -3.4632 0.5830 2.9476 -0.7364 1.8109 2.2965 -2.6274 0.5759 -0.3938 -1.1642 3.3150 0.9950 -0.7373 3.3114 -0.7789 -2.2825 2.5845 1.9385 -1.4471 2.5774 0.2073 -3.0244 1.8176 1.5360 -2.6158 1.8140 32 5 0 1 7 11 3 6 1 6 9 18 17 7 5 49 43 47 54 55 6 1 0 2 4 5 6 5 30 21 31 44 42 6 9 16 25 36 28 18 5 4 2 8 14 10 5 9 6 5 12 16 6 5 4 10 19 20 12 5 15 13 23 35 24 6 11 7 17 26 31 21 6 8 15 24 32 22 14 6 0 3 13 15 8 2 5 20 19 27 37 29 5 17 18 28 38 26 6 16 12 20 29 34 25 6 10 14 22 33 27 19 6 42 44 53 59 58 51 5 36 25 34 41 45 5 53 48 52 57 59 6 57 55 54 56 58 59 6 44 31 26 38 48 53 6 13 3 11 21 30 23 6 45 41 49 55 57 52 6 32 24 35 46 50 40 6 35 23 30 42 51 46 5 22 32 40 39 33 6 39 40 50 56 54 47 6 37 27 33 39 47 43 6 34 29 37 43 49 41 6 28 36 45 52 48 38 5 50 46 51 58 56 -0.9999 0.7485 -3.3283 0.3888 1.1760 -3.3318 -1.9435 1.4581 -2.5944 -1.0224 -0.7043 -3.3286 -1.5410 2.6272 -1.8311 -0.2124 3.0361 -1.8345 0.7737 2.2944 -2.6014 1.2244 -0.0126 -3.3343 -2.9523 0.7472 -1.8278 2.0116 2.2749 -1.8408 -2.3010 2.6388 -0.5929 0.3522 -1.1746 -3.3323 0.4160 3.4748 -0.6001 -1.9877 -1.3846 -2.5951 -3.1733 1.4770 -0.5910 -2.9740 -0.6427 -1.8282 1.7905 3.0043 -0.6038 2.4086 -0.0312 -2.6064 2.8110 1.1377 -1.8432 -1.6997 3.0587 0.5882 -0.3111 3.4859 0.5847 0.7020 -2.3049 -2.6024 -3.4066 0.7857 0.5922 -1.6221 -2.5658 -1.8323 -3.2179 -1.3654 -0.5916 2.3782 2.5650 0.5771 2.7743 -1.2126 -1.8438 -1.9435 2.3362 1.8249 3.4252 0.6787 -0.6090 0.3033 3.0270 1.8190 -0.3069 -3.0159 -1.8359 1.9397 -2.3244 -1.8418 -3.4295 -0.6669 0.5918 -2.7783 1.2248 1.8267 1.6183 2.5766 1.8154 -2.3825 -2.5540 -0.5942 3.2136 1.3765 0.5746 -0.7057 2.3165 2.5857 3.4024 -0.7740 -0.6093 -2.4131 0.0435 2.5896 -2.8156 -1.1255 1.8262 1.9837 1.3952 2.5783 0.3071 -3.4746 -0.6016 -0.3563 1.1863 3.3158 1.6956 -3.0473 -0.6053 2.9697 0.6534 1.8112 -1.7950 -2.9926 0.5868 -1.2290 0.0247 3.3177 3.1687 -1.4657 0.5738 1.0182 0.7154 3.3120 -2.0164 -2.2628 1.8237 -0.4206 -3.4632 0.5830 2.9476 -0.7364 1.8109 2.2965 -2.6274 0.5759 -0.3938 -1.1642 3.3150 0.9950 -0.7373 3.3114 -0.7789 -2.2825 2.5845 1.9385 -1.4471 2.5774 0.2073 -3.0244 1.8176 1.5360 -2.6158 1.8140 32 5 0 1 7 11 3 6 1 6 9 18 17 7 5 49 43 47 54 55 6 1 0 2 4 5 6 5 30 21 31 44 42 6 9 16 25 36 28 18 5 4 2 8 14 10 5 9 6 5 12 16 6 5 4 10 19 20 12 5 15 13 23 35 24 6 11 7 17 26 31 21 6 8 15 24 32 22 14 6 0 3 13 15 8 2 5 20 19 27 37 29 5 17 18 28 38 26 6 16 12 20 29 34 25 6 10 14 22 33 27 19 6 42 44 53 59 58 51 5 36 25 34 41 45 5 53 48 52 57 59 6 57 55 54 56 58 59 6 44 31 26 38 48 53 6 13 3 11 21 30 23 6 45 41 49 55 57 52 6 32 24 35 46 50 40 6 35 23 30 42 51 46 5 22 32 40 39 33 6 39 40 50 56 54 47 6 37 27 33 39 47 43 6 34 29 37 43 49 41 6 28 36 45 52 48 38 5 50 46 51 58 56 -0.9999 0.7485 -3.3283 0.3888 1.1760 -3.3318 -1.9435 1.4581 -2.5944 -1.0224 -0.7043 -3.3286 -1.5410 2.6272 -1.8311 -0.2124 3.0361 -1.8345 0.7737 2.2944 -2.6014 1.2244 -0.0126 -3.3343 -2.9523 0.7472 -1.8278 2.0116 2.2749 -1.8408 -2.3010 2.6388 -0.5929 0.3522 -1.1746 -3.3323 0.4160 3.4748 -0.6001 -1.9877 -1.3846 -2.5951 -3.1733 1.4770 -0.5910 -2.9740 -0.6427 -1.8282 1.7905 3.0043 -0.6038 2.4086 -0.0312 -2.6064 2.8110 1.1377 -1.8432 -1.6997 3.0587 0.5882 -0.3111 3.4859 0.5847 0.7020 -2.3049 -2.6024 -3.4066 0.7857 0.5922 -1.6221 -2.5658 -1.8323 -3.2179 -1.3654 -0.5916 2.3782 2.5650 0.5771 2.7743 -1.2126 -1.8438 -1.9435 2.3362 1.8249 3.4252 0.6787 -0.6090 0.3033 3.0270 1.8190 -0.3069 -3.0159 -1.8359 1.9397 -2.3244 -1.8418 -3.4295 -0.6669 0.5918 -2.7783 1.2248 1.8267 1.6183 2.5766 1.8154 -2.3825 -2.5540 -0.5942 3.2136 1.3765 0.5746 -0.7057 2.3165 2.5857 3.4024 -0.7740 -0.6093 -2.4131 0.0435 2.5896 -2.8156 -1.1255 1.8262 1.9837 1.3952 2.5783 0.3071 -3.4746 -0.6016 -0.3563 1.1863 3.3158 1.6956 -3.0473 -0.6053 2.9697 0.6534 1.8112 -1.7950 -2.9926 0.5868 -1.2290 0.0247 3.3177 3.1687 -1.4657 0.5738 1.0182 0.7154 3.3120 -2.0164 -2.2628 1.8237 -0.4206 -3.4632 0.5830 2.9476 -0.7364 1.8109 2.2965 -2.6274 0.5759 -0.3938 -1.1642 3.3150 0.9950 -0.7373 3.3114 -0.7789 -2.2825 2.5845 1.9385 -1.4471 2.5774 0.2073 -3.0244 1.8176 1.5360 -2.6158 1.8140 32 5 0 1 7 11 3 6 1 6 9 18 17 7 5 49 43 47 54 55 6 1 0 2 4 5 6 5 30 21 31 44 42 6 9 16 25 36 28 18 5 4 2 8 14 10 5 9 6 5 12 16 6 5 4 10 19 20 12 5 15 13 23 35 24 6 11 7 17 26 31 21 6 8 15 24 32 22 14 6 0 3 13 15 8 2 5 20 19 27 37 29 5 17 18 28 38 26 6 16 12 20 29 34 25 6 10 14 22 33 27 19 6 42 44 53 59 58 51 5 36 25 34 41 45 5 53 48 52 57 59 6 57 55 54 56 58 59 6 44 31 26 38 48 53 6 13 3 11 21 30 23 6 45 41 49 55 57 52 6 32 24 35 46 50 40 6 35 23 30 42 51 46 5 22 32 40 39 33 6 39 40 50 56 54 47 6 37 27 33 39 47 43 6 34 29 37 43 49 41 6 28 36 45 52 48 38 5 50 46 51 58 56 -0.9999 0.7485 -3.3283 0.3888 1.1760 -3.3318 -1.9435 1.4581 -2.5944 -1.0224 -0.7043 -3.3286 -1.5410 2.6272 -1.8311 -0.2124 3.0361 -1.8345 0.7737 2.2944 -2.6014 1.2244 -0.0126 -3.3343 -2.9523 0.7472 -1.8278 2.0116 2.2749 -1.8408 -2.3010 2.6388 -0.5929 0.3522 -1.1746 -3.3323 0.4160 3.4748 -0.6001 -1.9877 -1.3846 -2.5951 -3.1733 1.4770 -0.5910 -2.9740 -0.6427 -1.8282 1.7905 3.0043 -0.6038 2.4086 -0.0312 -2.6064 2.8110 1.1377 -1.8432 -1.6997 3.0587 0.5882 -0.3111 3.4859 0.5847 0.7020 -2.3049 -2.6024 -3.4066 0.7857 0.5922 -1.6221 -2.5658 -1.8323 -3.2179 -1.3654 -0.5916 2.3782 2.5650 0.5771 2.7743 -1.2126 -1.8438 -1.9435 2.3362 1.8249 3.4252 0.6787 -0.6090 0.3033 3.0270 1.8190 -0.3069 -3.0159 -1.8359 1.9397 -2.3244 -1.8418 -3.4295 -0.6669 0.5918 -2.7783 1.2248 1.8267 1.6183 2.5766 1.8154 -2.3825 -2.5540 -0.5942 3.2136 1.3765 0.5746 -0.7057 2.3165 2.5857 3.4024 -0.7740 -0.6093 -2.4131 0.0435 2.5896 -2.8156 -1.1255 1.8262 1.9837 1.3952 2.5783 0.3071 -3.4746 -0.6016 -0.3563 1.1863 3.3158 1.6956 -3.0473 -0.6053 2.9697 0.6534 1.8112 -1.7950 -2.9926 0.5868 -1.2290 0.0247 3.3177 3.1687 -1.4657 0.5738 1.0182 0.7154 3.3120 -2.0164 -2.2628 1.8237 -0.4206 -3.4632 0.5830 2.9476 -0.7364 1.8109 2.2965 -2.6274 0.5759 -0.3938 -1.1642 3.3150 0.9950 -0.7373 3.3114 -0.7789 -2.2825 2.5845 1.9385 -1.4471 2.5774 0.2073 -3.0244 1.8176 1.5360 -2.6158 1.8140 32 5 0 1 7 11 3 6 1 6 9 18 17 7 5 49 43 47 54 55 6 1 0 2 4 5 6 5 30 21 31 44 42 6 9 16 25 36 28 18 5 4 2 8 14 10 5 9 6 5 12 16 6 5 4 10 19 20 12 5 15 13 23 35 24 6 11 7 17 26 31 21 6 8 15 24 32 22 14 6 0 3 13 15 8 2 5 20 19 27 37 29 5 17 18 28 38 26 6 16 12 20 29 34 25 6 10 14 22 33 27 19 6 42 44 53 59 58 51 5 36 25 34 41 45 5 53 48 52 57 59 6 57 55 54 56 58 59 6 44 31 26 38 48 53 6 13 3 11 21 30 23 6 45 41 49 55 57 52 6 32 24 35 46 50 40 6 35 23 30 42 51 46 5 22 32 40 39 33 6 39 40 50 56 54 47 6 37 27 33 39 47 43 6 34 29 37 43 49 41 6 28 36 45 52 48 38 5 50 46 51 58 56 -0.9999 0.7485 -3.3283 0.3888 1.1760 -3.3318 -1.9435 1.4581 -2.5944 -1.0224 -0.7043 -3.3286 -1.5410 2.6272 -1.8311 -0.2124 3.0361 -1.8345 0.7737 2.2944 -2.6014 1.2244 -0.0126 -3.3343 -2.9523 0.7472 -1.8278 2.0116 2.2749 -1.8408 -2.3010 2.6388 -0.5929 0.3522 -1.1746 -3.3323 0.4160 3.4748 -0.6001 -1.9877 -1.3846 -2.5951 -3.1733 1.4770 -0.5910 -2.9740 -0.6427 -1.8282 1.7905 3.0043 -0.6038 2.4086 -0.0312 -2.6064 2.8110 1.1377 -1.8432 -1.6997 3.0587 0.5882 -0.3111 3.4859 0.5847 0.7020 -2.3049 -2.6024 -3.4066 0.7857 0.5922 -1.6221 -2.5658 -1.8323 -3.2179 -1.3654 -0.5916 2.3782 2.5650 0.5771 2.7743 -1.2126 -1.8438 -1.9435 2.3362 1.8249 3.4252 0.6787 -0.6090 0.3033 3.0270 1.8190 -0.3069 -3.0159 -1.8359 1.9397 -2.3244 -1.8418 -3.4295 -0.6669 0.5918 -2.7783 1.2248 1.8267 1.6183 2.5766 1.8154 -2.3825 -2.5540 -0.5942 3.2136 1.3765 0.5746 -0.7057 2.3165 2.5857 3.4024 -0.7740 -0.6093 -2.4131 0.0435 2.5896 -2.8156 -1.1255 1.8262 1.9837 1.3952 2.5783 0.3071 -3.4746 -0.6016 -0.3563 1.1863 3.3158 1.6956 -3.0473 -0.6053 2.9697 0.6534 1.8112 -1.7950 -2.9926 0.5868 -1.2290 0.0247 3.3177 3.1687 -1.4657 0.5738 1.0182 0.7154 3.3120 -2.0164 -2.2628 1.8237 -0.4206 -3.4632 0.5830 2.9476 -0.7364 1.8109 2.2965 -2.6274 0.5759 -0.3938 -1.1642 3.3150 0.9950 -0.7373 3.3114 -0.7789 -2.2825 2.5845 1.9385 -1.4471 2.5774 0.2073 -3.0244 1.8176 1.5360 -2.6158 1.8140 32 5 0 1 7 11 3 6 1 6 9 18 17 7 5 49 43 47 54 55 6 1 0 2 4 5 6 5 30 21 31 44 42 6 9 16 25 36 28 18 5 4 2 8 14 10 5 9 6 5 12 16 6 5 4 10 19 20 12 5 15 13 23 35 24 6 11 7 17 26 31 21 6 8 15 24 32 22 14 6 0 3 13 15 8 2 5 20 19 27 37 29 5 17 18 28 38 26 6 16 12 20 29 34 25 6 10 14 22 33 27 19 6 42 44 53 59 58 51 5 36 25 34 41 45 5 53 48 52 57 59 6 57 55 54 56 58 59 6 44 31 26 38 48 53 6 13 3 11 21 30 23 6 45 41 49 55 57 52 6 32 24 35 46 50 40 6 35 23 30 42 51 46 5 22 32 40 39 33 6 39 40 50 56 54 47 6 37 27 33 39 47 43 6 34 29 37 43 49 41 6 28 36 45 52 48 38 5 50 46 51 58 56 -0.9999 0.7485 -3.3283 0.3888 1.1760 -3.3318 -1.9435 1.4581 -2.5944 -1.0224 -0.7043 -3.3286 -1.5410 2.6272 -1.8311 -0.2124 3.0361 -1.8345 0.7737 2.2944 -2.6014 1.2244 -0.0126 -3.3343 -2.9523 0.7472 -1.8278 2.0116 2.2749 -1.8408 -2.3010 2.6388 -0.5929 0.3522 -1.1746 -3.3323 0.4160 3.4748 -0.6001 -1.9877 -1.3846 -2.5951 -3.1733 1.4770 -0.5910 -2.9740 -0.6427 -1.8282 1.7905 3.0043 -0.6038 2.4086 -0.0312 -2.6064 2.8110 1.1377 -1.8432 -1.6997 3.0587 0.5882 -0.3111 3.4859 0.5847 0.7020 -2.3049 -2.6024 -3.4066 0.7857 0.5922 -1.6221 -2.5658 -1.8323 -3.2179 -1.3654 -0.5916 2.3782 2.5650 0.5771 2.7743 -1.2126 -1.8438 -1.9435 2.3362 1.8249 3.4252 0.6787 -0.6090 0.3033 3.0270 1.8190 -0.3069 -3.0159 -1.8359 1.9397 -2.3244 -1.8418 -3.4295 -0.6669 0.5918 -2.7783 1.2248 1.8267 1.6183 2.5766 1.8154 -2.3825 -2.5540 -0.5942 3.2136 1.3765 0.5746 -0.7057 2.3165 2.5857 3.4024 -0.7740 -0.6093 -2.4131 0.0435 2.5896 -2.8156 -1.1255 1.8262 1.9837 1.3952 2.5783 0.3071 -3.4746 -0.6016 -0.3563 1.1863 3.3158 1.6956 -3.0473 -0.6053 2.9697 0.6534 1.8112 -1.7950 -2.9926 0.5868 -1.2290 0.0247 3.3177 3.1687 -1.4657 0.5738 1.0182 0.7154 3.3120 -2.0164 -2.2628 1.8237 -0.4206 -3.4632 0.5830 2.9476 -0.7364 1.8109 2.2965 -2.6274 0.5759 -0.3938 -1.1642 3.3150 0.9950 -0.7373 3.3114 -0.7789 -2.2825 2.5845 1.9385 -1.4471 2.5774 0.2073 -3.0244 1.8176 1.5360 -2.6158 1.8140 32 5 0 1 7 11 3 6 1 6 9 18 17 7 5 49 43 47 54 55 6 1 0 2 4 5 6 5 30 21 31 44 42 6 9 16 25 36 28 18 5 4 2 8 14 10 5 9 6 5 12 16 6 5 4 10 19 20 12 5 15 13 23 35 24 6 11 7 17 26 31 21 6 8 15 24 32 22 14 6 0 3 13 15 8 2 5 20 19 27 37 29 5 17 18 28 38 26 6 16 12 20 29 34 25 6 10 14 22 33 27 19 6 42 44 53 59 58 51 5 36 25 34 41 45 5 53 48 52 57 59 6 57 55 54 56 58 59 6 44 31 26 38 48 53 6 13 3 11 21 30 23 6 45 41 49 55 57 52 6 32 24 35 46 50 40 6 35 23 30 42 51 46 5 22 32 40 39 33 6 39 40 50 56 54 47 6 37 27 33 39 47 43 6 34 29 37 43 49 41 6 28 36 45 52 48 38 5 50 46 51 58 56 gamgi0.17.1g/dat/molecule/fullerenes/C52_T.xml0000644000175000017500000001463307715751053020406 0ustar carloscarlos gamgi0.17.1g/dat/molecule/fullerenes/C20_Ih.xml0000644000175000017500000000505307715740344020533 0ustar carloscarlos gamgi0.17.1g/dat/molecule/fullerenes/C60_cfc_atoms.xml0000644000175000017500000104240511602121112022110 0ustar carloscarlos gamgi0.17.1g/dat/molecule/fullerenes/C98_D3.xml0000644000175000017500000002772607715750330020467 0ustar carloscarlos gamgi0.17.1g/dat/molecule/fullerenes/C42_D3.xml0000644000175000017500000001231107715745757020455 0ustar carloscarlos gamgi0.17.1g/dat/molecule/fullerenes/C92_T.xml0000644000175000017500000002636507715757774020437 0ustar carloscarlos gamgi0.17.1g/dat/molecule/fullerenes/C90_D5h.xml0000644000175000017500000002575507715740475020642 0ustar carloscarlos gamgi0.17.1g/dat/molecule/fullerenes/C74_D3h.xml0000644000175000017500000002207207715743041020617 0ustar carloscarlos gamgi0.17.1g/dat/molecule/fullerenes/C94_C3v.xml0000644000175000017500000002675507715760336020660 0ustar carloscarlos gamgi0.17.1g/dat/molecule/fullerenes/C86_D3.xml0000644000175000017500000002500207715757451020460 0ustar carloscarlos gamgi0.17.1g/dat/molecule/fullerenes/C320.xml0000644000175000017500000011714407715731722020203 0ustar carloscarlos gamgi0.17.1g/dat/molecule/fullerenes/C30_D5h.xml0000644000175000017500000000737607715740364020630 0ustar carloscarlos gamgi0.17.1g/dat/molecule/fullerenes/C96_D6h.xml0000644000175000017500000002734307715761260020637 0ustar carloscarlos gamgi0.17.1g/dat/molecule/fullerenes/C50_D5h.xml0000644000175000017500000001424307715740410020611 0ustar carloscarlos gamgi0.17.1g/dat/molecule/fullerenes/C80_D5d.xml0000644000175000017500000002343607715740452020622 0ustar carloscarlos gamgi0.17.1g/dat/molecule/fullerenes/C20_C100.xml0000644000175000017500000021455007715740323020577 0ustar carloscarlos gamgi0.17.1g/dat/molecule/fullerenes/C78_D3h.xml0000644000175000017500000002304707715757034020635 0ustar carloscarlos gamgi0.17.1g/dat/molecule/fullerenes/C180.xml0000644000175000017500000005425207715732067020212 0ustar carloscarlos gamgi0.17.1g/dat/molecule/fullerenes/C48_D6d.xml0000644000175000017500000001365607715747332020636 0ustar carloscarlos gamgi0.17.1g/dat/molecule/fullerenes/C500.xml0000644000175000017500000017404107715731632020202 0ustar carloscarlos gamgi0.17.1g/dat/molecule/fullerenes/C32_D3d.xml0000644000175000017500000000776607715740714020626 0ustar carloscarlos gamgi0.17.1g/dat/molecule/fullerenes/C28_Td.xml0000644000175000017500000000700607715740146020552 0ustar carloscarlos gamgi0.17.1g/dat/molecule/fullerenes/C44_T.xml0000644000175000017500000001267707715746776020435 0ustar carloscarlos gamgi0.17.1g/dat/molecule/fullerenes/README0000644000175000017500000000115211634420436017711 0ustar carloscarlos************** * Fullerenes * ************** The files in this directory describe fullerenes, from C20 to C720. They were prepared for Gamgi, by Carlos Pereira: http://www.gamgi.org/ **************** * Bibliography * **************** Structural data was obtained from: 1) Mitsuho Yoshida, Fullerene Structure Library: http://www.cochem2.tutkie.tut.ac.jp/Fuller/fsl/fsl.html Structural information was obtained from: 2) Marc de Graef and Michael E. McHenry, Structure of Materials, an Introduction to Crystallography, Diffraction, and Symmetry, Cambridge University Press, 2007 http://som.web.cmu.edu/frames.html gamgi0.17.1g/dat/molecule/fullerenes/C70_D5h.xml0000644000175000017500000002111307715740441020611 0ustar carloscarlos gamgi0.17.1g/dat/molecule/fullerenes/C38_D3h.xml0000644000175000017500000001133207715742052020615 0ustar carloscarlos gamgi0.17.1g/dat/molecule/fullerenes/C100_D5d.xml0000644000175000017500000003031107715740270020657 0ustar carloscarlos gamgi0.17.1g/dat/molecule/fullerenes/C260.xml0000644000175000017500000010021007715732011020160 0ustar carloscarlos gamgi0.17.1g/dat/molecule/fullerenes/C46_C3.xml0000644000175000017500000001326407715747777020474 0ustar carloscarlos gamgi0.17.1g/dat/molecule/fullerenes/C34_C3v.xml0000644000175000017500000001036107715741124020626 0ustar carloscarlos gamgi0.17.1g/dat/molecule/fullerenes/C60_Ih.xml0000644000175000017500000001656707715740421020547 0ustar carloscarlos gamgi0.17.1g/dat/molecule/fullerenes/C76_Td.xml0000644000175000017500000002245707715743141020562 0ustar carloscarlos gamgi0.17.1g/dat/molecule/fullerenes/C72_D6d.xml0000644000175000017500000002150207715742336020617 0ustar carloscarlos gamgi0.17.1g/dat/molecule/fullerenes/C720.xml0000644000175000017500000026343407715731373020215 0ustar carloscarlos gamgi0.17.1g/dat/molecule/fullerenes/C84_Td.xml0000644000175000017500000002441407715757175020570 0ustar carloscarlos gamgi0.17.1g/dat/molecule/fullerenes/C40_D5d.xml0000644000175000017500000001172207715740377020617 0ustar carloscarlos gamgi0.17.1g/dat/molecule/fullerenes/C82_C3v.xml0000644000175000017500000002402407715757124020641 0ustar carloscarlos gamgi0.17.1g/dat/molecule/fullerenes/C24_D6d.xml0000644000175000017500000000603207715737732020621 0ustar carloscarlos gamgi0.17.1g/dat/molecule/fullerenes/C26_D3h.xml0000644000175000017500000000642107715740013020610 0ustar carloscarlos gamgi0.17.1g/dat/molecule/fullerenes/C36_D6h.xml0000644000175000017500000001074407715741721020626 0ustar carloscarlos gamgi0.17.1g/dat/molecule/fullerenes/C240.xml0000644000175000017500000007321407715732206020201 0ustar carloscarlos gamgi0.17.1g/dat/molecule/tiron.xml0000644000175000017500000000510010453236575016546 0ustar carloscarlos gamgi0.17.1g/dat/molecule/styles2.xml0000644000175000017500000003661607765156731017047 0ustar carloscarlos gamgi0.17.1g/dat/molecule/tiron_bw.xml0000644000175000017500000000727210460176737017253 0ustar carloscarlos gamgi0.17.1g/dat/molecule/styles2_bw.xml0000644000175000017500000003727710074553041017521 0ustar carloscarlos gamgi0.17.1g/dat/molecule/nucleotides/0000755000175000017500000000000010027620775017207 5ustar carloscarlosgamgi0.17.1g/dat/molecule/nucleotides/DNA.xml0000644000175000017500000012014107426526304020334 0ustar carloscarlos gamgi0.17.1g/dat/molecule/hydrocarbons/0000755000175000017500000000000012254622227017364 5ustar carloscarlosgamgi0.17.1g/dat/molecule/hydrocarbons/dinitrobenzene.xml0000644000175000017500000000350212254622227023125 0ustar carloscarlos gamgi0.17.1g/dat/molecule/hydrocarbons/propane.xml0000644000175000017500000000234407714031274021556 0ustar carloscarlos gamgi0.17.1g/dat/molecule/hydrocarbons/ethane.xml0000644000175000017500000000165507714027537021371 0ustar carloscarlos gamgi0.17.1g/dat/molecule/hydrocarbons/methane.xml0000644000175000017500000000120307714027602021524 0ustar carloscarlos gamgi0.17.1g/dat/molecule/hydrocarbons/butadiene.xml0000644000175000017500000000223307714024165022050 0ustar carloscarlos gamgi0.17.1g/dat/molecule/hydrocarbons/tetrabutylammonium.xml0000644000175000017500000001504110602733276024053 0ustar carloscarlos gamgi0.17.1g/dat/molecule/hydrocarbons/pentane.xml0000644000175000017500000000352407714031062021540 0ustar carloscarlos gamgi0.17.1g/dat/molecule/hydrocarbons/benzene.xml0000644000175000017500000000270207714024123021531 0ustar carloscarlos gamgi0.17.1g/dat/molecule/hydrocarbons/hexane.xml0000644000175000017500000000422007714030712021351 0ustar carloscarlos gamgi0.17.1g/dat/molecule/hydrocarbons/cyclohexane.xml0000644000175000017500000000373607714031125022415 0ustar carloscarlos gamgi0.17.1g/dat/molecule/hydrocarbons/graphite.xml0000644000175000017500000005521507714030247021721 0ustar carloscarlos gamgi0.17.1g/dat/molecule/hydrocarbons/README0000644000175000017500000000110607714757104020252 0ustar carloscarlos****************** * Hidrocarbonets * ****************** The files in this directory describe common hydrocarbons. They were prepared for Gamgi, by Carlos Pereira: http://www.gamgi.org/ **************** * Bibliography * **************** Structural data was obtained from: 1) the Mathmol library of molecular structures, Scientific Visualization Center, New York University: http://www.nyu.edu/pages/mathmol/library/index.html Structural information was obtained from: 2) Pine S.H., Hendrickson J.B., Cram D.J., Hammond G.S., Organic Chemistry, McGraw-Hill, 4th Edition (1980) gamgi0.17.1g/dat/molecule/hydrocarbons/pyrene.xml0000644000175000017500000000601407714031727021415 0ustar carloscarlos gamgi0.17.1g/dat/molecule/hydrocarbons/butane.xml0000644000175000017500000000303607714023774021375 0ustar carloscarlos gamgi0.17.1g/dat/molecule/hydrocarbons/octane.xml0000644000175000017500000000540607714030215021357 0ustar carloscarlos gamgi0.17.1g/dat/molecule/hydrocarbons/heptane.xml0000644000175000017500000000470607714030602021534 0ustar carloscarlos gamgi0.17.1g/dat/molecule/hydrocarbons/ethylene.xml0000644000175000017500000000136107714024052021721 0ustar carloscarlos gamgi0.17.1g/dat/molecule/all.xml0000644000175000017500000001000410450774012016150 0ustar carloscarlos gamgi0.17.1g/dat/molecule/photosynthesis/0000755000175000017500000000000012277501765020002 5ustar carloscarlosgamgi0.17.1g/dat/molecule/photosynthesis/carotene_b.xml0000644000175000017500000002425107713766466022643 0ustar carloscarlos gamgi0.17.1g/dat/molecule/photosynthesis/cytochrome.xml0000644000175000017500000002121307713777177022712 0ustar carloscarlos gamgi0.17.1g/dat/molecule/photosynthesis/prc.xml0000644000175000017500000015462107714010450021303 0ustar carloscarlos gamgi0.17.1g/dat/molecule/photosynthesis/quinone.xml0000644000175000017500000003104707713775741022215 0ustar carloscarlos gamgi0.17.1g/dat/molecule/photosynthesis/README0000644000175000017500000000266607722755325020676 0ustar carloscarlos****************** * Photosynthesis * ****************** The files in this directory describe molecules participating in photosynthesis. They were prepared for Gamgi, by Carlos Pereira: http://www.gamgi.org/ **************** * Bibliography * **************** Structural data was obtained from: 1) the Mathmol library of molecular structures, Scientific Visualization Center, New York University: http://www.nyu.edu/pages/mathmol/library/index.html 2) Glactone's CD-ROM of PDB Files, Department of Chemistry, Georgia State University: http://chemistry.gsu.edu/cwcs/MM-CD/workshop02/readme.htm Structural information was obtained from: 3) Luis S. Campos, Entender a Bioquímica, 3ª Edição, Escolar Editora (2002) 4) Gerard Kleywegt, Hetero-compound Information Centre, Department of Cell and Molecular Biology, Uppsala University: http://xray.bmc.uu.se/hicup/ 5) Helen M. Berman, John Westbrook, Zukang Feng, Gary Gilliland, T. N. Bhat, Helge Weissig, Ilya N. Shindyalov and Philip E. Bourne, the Protein Data Bank, Research Collaboratory for Structural Bioinformatics, Department of Chemistry, Rutgers University, USA, National Institute of Standards and Technology, USA, San Diego Supercomputer Center, University of California, San Diego, USA, Department of Pharmacology, University of California, San Diego, USA and The Burnham Institute, California, San Diego, USA: http://www.rcsb.org/pdb/ http://nar.oupjournals.org/cgi/content/full/28/1/235 gamgi0.17.1g/dat/molecule/photosynthesis/pheophytin.xml0000644000175000017500000003651712254622464022722 0ustar carloscarlos gamgi0.17.1g/dat/molecule/photosynthesis/chlorophyll_a.xml0000644000175000017500000003567607714727651023410 0ustar carloscarlos gamgi0.17.1g/dat/gamgi/0000755000175000017500000000000012254621402014140 5ustar carloscarlosgamgi0.17.1g/dat/gamgi/document.xml0000644000175000017500000000111207655015600016501 0ustar carloscarlos "> &inside0;"> ]> &inside1; &outside1; gamgi0.17.1g/dat/gamgi/document1.xml0000644000175000017500000000043307607411762016575 0ustar carloscarlos &outside2; gamgi0.17.1g/dat/gamgi/document2.xml0000644000175000017500000000032107655015676016601 0ustar carloscarlos gamgi0.17.1g/dat/gamgi/atom.xml0000644000175000017500000000007707623203254015633 0ustar carloscarlos gamgi0.17.1g/dat/light/0000755000175000017500000000000012254623012014162 5ustar carloscarlosgamgi0.17.1g/dat/light/halloween.xml0000644000175000017500000000224510173553027016673 0ustar carloscarlos gamgi0.17.1g/dat/light/grey.xml0000644000175000017500000000040507647612515015671 0ustar carloscarlos gamgi0.17.1g/dat/light/diffuse.xml0000644000175000017500000000023707647612504016351 0ustar carloscarlos gamgi0.17.1g/dat/light/laser.xml0000644000175000017500000000055707750754370016042 0ustar carloscarlos gamgi0.17.1g/dat/light/q10.xml0000644000175000017500000000212007750761443015320 0ustar carloscarlos gamgi0.17.1g/dat/light/greenish.xml0000644000175000017500000000040207751517434016524 0ustar carloscarlos gamgi0.17.1g/dat/plane/0000755000175000017500000000000012277247103014162 5ustar carloscarlosgamgi0.17.1g/dat/plane/plane_direction_cP001.xml0000644000175000017500000000752512254613063020714 0ustar carloscarlos gamgi0.17.1g/dat/plane/screen_direction_plane_ranges.xml0000644000175000017500000003201312254613400022730 0ustar carloscarlos 2.5000 0.8660 3.2666 2.5000 0.8660 0.0000 -0.5000 6.0622 0.0000 -0.5000 6.0622 3.2666 1 4 0 1 2 3 3.0000 1.7321 0.0000 -0.5000 7.7942 0.0000 -0.5000 7.7942 3.2666 3.0000 1.7321 3.2666 1 4 0 1 2 3 0.0000 8.6603 3.2666 4.0000 1.7321 3.2666 4.0000 1.7321 0.0000 0.0000 8.6603 0.0000 1 4 0 1 2 3 1.0000 8.6603 3.2666 4.5000 2.5981 3.2666 4.5000 2.5981 0.0000 1.0000 8.6603 0.0000 1 4 0 1 2 3 5.5000 2.5981 3.2666 5.5000 2.5981 0.0000 1.5000 9.5263 0.0000 1.5000 9.5263 3.2666 1 4 0 1 2 3 6.0000 3.4641 3.2666 6.0000 3.4641 0.0000 2.5000 9.5263 0.0000 2.5000 9.5263 3.2666 1 4 0 1 2 3 3.0000 10.3923 0.0000 3.0000 10.3923 3.2666 7.0000 3.4641 3.2666 7.0000 3.4641 0.0000 1 4 0 1 2 3 gamgi0.17.1g/dat/plane/plane_cP001.xml0000644000175000017500000000735212254613022016645 0ustar carloscarlos gamgi0.17.1g/dat/plane/plane_direction_hP001.xml0000644000175000017500000000754312254613071020720 0ustar carloscarlos gamgi0.17.1g/dat/plane/plane_hP001.xml0000644000175000017500000000737012254613133016655 0ustar carloscarlos gamgi0.17.1g/dat/plane/plane_direction_hR003.xml0000644000175000017500000000452112254613107020715 0ustar carloscarlos gamgi0.17.1g/dat/plane/screen_calchopirite_barbiturate.xml0000644000175000017500000002671611553603765023317 0ustar carloscarlos 0.0000 5.2890 10.4230 5.2890 0.0000 10.4230 5.2890 0.0000 0.0000 0.0000 5.2890 0.0000 1 4 0 1 2 3 -0.7272 -3.3616 -1.3783 -1.2974 -3.4604 -0.6036 -2.9491 -3.5088 1.2936 -5.0025 -2.2798 1.7719 -4.7398 -1.0991 -0.2405 -3.9616 -0.2819 -2.2930 1 6 0 1 2 3 4 5 gamgi0.17.1g/dat/plane/plane_cP110.xml0000644000175000017500000000742012254613036016647 0ustar carloscarlos gamgi0.17.1g/dat/plane/screen_planes_directions.xml0000644000175000017500000004524512254613574021766 0ustar carloscarlos 2.5000 4.3301 1.4700 3.0000 3.4641 1.3066 3.0000 1.7321 0.8167 2.5000 0.8660 0.4900 1.0000 0.0000 0.0000 -0.5000 0.8660 0.0000 -0.5000 2.5981 0.4900 0.0000 3.4641 0.8166 1.5000 4.3301 1.3066 1 9 0 1 2 3 4 5 6 7 8 3.1000 -4.5000 3.4025 3.1000 -4.5325 2.5000 3.1000 -4.5325 1.5000 3.1000 -4.5000 0.5975 3.1000 -4.4675 0.5000 3.1000 1.5325 -1.5000 3.1000 4.5000 -1.5975 3.1000 7.5000 -1.5975 3.1000 10.4675 -1.5000 3.1000 10.5000 -1.4025 3.1000 10.5325 -0.5000 3.1000 10.5325 0.5000 3.1000 10.5000 1.4025 3.1000 10.4675 1.5000 3.1000 4.4675 3.5000 3.1000 1.5000 3.5975 3.1000 -1.5000 3.5975 3.1000 -4.4675 3.5000 1 18 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 -5.4666 8.2903 1.5000 -5.3834 8.2097 2.0000 0.8166 2.2097 4.0000 2.2834 0.7903 4.0000 8.4834 -5.2097 2.0000 8.5666 -5.2903 1.5000 8.4834 -5.2097 1.0000 2.2834 0.7903 -1.0000 0.8166 2.2097 -1.0000 -5.3834 8.2097 1.0000 1 10 0 1 2 3 4 5 6 7 8 9 -6.2000 4.5293 1.4903 -6.2000 4.4707 1.5097 -4.7676 3.0000 1.5379 4.5324 -6.0000 1.5379 4.7676 -6.0000 1.4621 5.3834 -5.2097 1.0000 5.3834 3.7903 -2.0000 3.9166 5.2097 -2.0000 -5.3834 5.2097 1.0000 1 9 0 1 2 3 4 5 6 7 8 3.1000 0.0000 -3.9230 3.1000 0.2463 -3.9153 3.1000 0.4917 -3.8921 3.1000 0.7351 -3.8535 3.1000 0.9756 -3.7998 3.1000 1.2123 -3.7310 3.1000 1.4442 -3.6475 3.1000 1.6703 -3.5496 3.1000 1.8899 -3.4378 3.1000 2.1021 -3.3123 3.1000 2.3059 -3.1738 3.1000 2.5006 -3.0227 3.1000 2.6855 -2.8598 3.1000 2.8598 -2.6855 3.1000 3.0227 -2.5006 3.1000 3.1738 -2.3059 3.1000 3.3123 -2.1021 3.1000 3.4378 -1.8899 3.1000 3.5496 -1.6703 3.1000 3.6475 -1.4442 3.1000 3.7310 -1.2123 3.1000 3.7998 -0.9756 3.1000 3.8535 -0.7351 3.1000 3.8921 -0.4917 3.1000 3.9153 -0.2463 3.1000 3.9230 0.0000 3.1000 3.9153 0.2463 3.1000 3.8921 0.4917 3.1000 3.8535 0.7351 3.1000 3.7998 0.9756 3.1000 3.7310 1.2123 3.1000 3.6475 1.4442 3.1000 3.5496 1.6703 3.1000 3.4378 1.8899 3.1000 3.3123 2.1021 3.1000 3.1738 2.3059 3.1000 3.0227 2.5006 3.1000 2.8598 2.6855 3.1000 2.6855 2.8598 3.1000 2.5006 3.0227 3.1000 2.3059 3.1738 3.1000 2.1021 3.3123 3.1000 1.8899 3.4378 3.1000 1.6703 3.5496 3.1000 1.4442 3.6475 3.1000 1.2123 3.7310 3.1000 0.9756 3.7998 3.1000 0.7351 3.8535 3.1000 0.4917 3.8921 3.1000 0.2463 3.9153 3.1000 -0.0000 3.9230 3.1000 -0.2463 3.9153 3.1000 -0.4917 3.8921 3.1000 -0.7351 3.8535 3.1000 -0.9756 3.7998 3.1000 -1.2123 3.7310 3.1000 -1.4442 3.6475 3.1000 -1.6703 3.5496 3.1000 -1.8899 3.4378 3.1000 -2.1021 3.3123 3.1000 -2.3059 3.1738 3.1000 -2.5006 3.0227 3.1000 -2.6855 2.8598 3.1000 -2.8598 2.6855 3.1000 -3.0227 2.5006 3.1000 -3.1738 2.3059 3.1000 -3.3123 2.1021 3.1000 -3.4378 1.8899 3.1000 -3.5496 1.6703 3.1000 -3.6475 1.4442 3.1000 -3.7310 1.2123 3.1000 -3.7998 0.9756 3.1000 -3.8535 0.7351 3.1000 -3.8921 0.4917 3.1000 -3.9153 0.2463 3.1000 -3.9230 0.0000 3.1000 -3.9153 -0.2463 3.1000 -3.8921 -0.4917 3.1000 -3.8535 -0.7351 3.1000 -3.7998 -0.9756 3.1000 -3.7310 -1.2123 3.1000 -3.6475 -1.4442 3.1000 -3.5496 -1.6703 3.1000 -3.4378 -1.8899 3.1000 -3.3123 -2.1021 3.1000 -3.1738 -2.3059 3.1000 -3.0227 -2.5006 3.1000 -2.8598 -2.6855 3.1000 -2.6855 -2.8598 3.1000 -2.5006 -3.0227 3.1000 -2.3059 -3.1738 3.1000 -2.1021 -3.3123 3.1000 -1.8899 -3.4378 3.1000 -1.6703 -3.5496 3.1000 -1.4442 -3.6475 3.1000 -1.2123 -3.7310 3.1000 -0.9756 -3.7998 3.1000 -0.7351 -3.8535 3.1000 -0.4917 -3.8921 3.1000 -0.2463 -3.9153 1 100 0 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 86 87 88 89 90 91 92 93 94 95 96 97 98 99 3.8288 -0.7053 -3.1373 3.6827 -0.5639 -3.3347 3.5279 -0.4141 -3.5189 3.3651 -0.2566 -3.6892 3.1950 -0.0919 -3.8450 3.0181 0.0792 -3.9856 2.8353 0.2562 -4.1104 2.6472 0.4382 -4.2190 2.4546 0.6246 -4.3110 2.2582 0.8147 -4.3860 2.0588 1.0077 -4.4437 1.8571 1.2028 -4.4838 1.6541 1.3992 -4.5062 1.4505 1.5963 -4.5109 1.2470 1.7932 -4.4977 1.0446 1.9891 -4.4668 0.8440 2.1833 -4.4183 0.6459 2.3749 -4.3523 0.4512 2.5634 -4.2691 0.2606 2.7478 -4.1691 0.0750 2.9275 -4.0527 -0.1051 3.1017 -3.9202 -0.2788 3.2698 -3.7723 -0.4455 3.4312 -3.6095 -0.6046 3.5851 -3.4325 -0.7553 3.7309 -3.2419 -0.8971 3.8682 -3.0385 -1.0295 3.9963 -2.8231 -1.1519 4.1147 -2.5966 -1.2638 4.2230 -2.3598 -1.3648 4.3208 -2.1137 -1.4546 4.4076 -1.8593 -1.5326 4.4832 -1.5975 -1.5987 4.5472 -1.3295 -1.6526 4.5993 -1.0562 -1.6940 4.6394 -0.7787 -1.7229 4.6673 -0.4981 -1.7390 4.6829 -0.2156 -1.7423 4.6861 0.0678 -1.7329 4.6770 0.3509 -1.7107 4.6555 0.6326 -1.6758 4.6217 0.9118 -1.6284 4.5758 1.1875 -1.5686 4.5180 1.4584 -1.4968 4.4485 1.7236 -1.4131 4.3675 1.9820 -1.3179 4.2754 2.2325 -1.2116 4.1725 2.4743 -1.0946 4.0593 2.7063 -0.9674 3.9362 2.9276 -0.8304 3.8036 3.1373 -0.6843 3.6622 3.3347 -0.5295 3.5124 3.5189 -0.3667 3.3549 3.6892 -0.1966 3.1902 3.8450 -0.0197 3.0191 3.9856 0.1631 2.8422 4.1104 0.3512 2.6601 4.2190 0.5438 2.4737 4.3110 0.7402 2.2836 4.3860 0.9396 2.0907 4.4437 1.1412 1.8956 4.4838 1.3443 1.6991 4.5062 1.5479 1.5020 4.5109 1.7513 1.3052 4.4977 1.9538 1.1092 4.4668 2.1544 0.9151 4.4183 2.3525 0.7234 4.3523 2.5472 0.5350 4.2691 2.7378 0.3506 4.1691 2.9234 0.1709 4.0527 3.1035 -0.0034 3.9202 3.2772 -0.1715 3.7723 3.4439 -0.3328 3.6095 3.6029 -0.4867 3.4325 3.7537 -0.6326 3.2419 3.8955 -0.7698 3.0385 4.0279 -0.8979 2.8231 4.1503 -1.0164 2.5966 4.2622 -1.1247 2.3598 4.3632 -1.2225 2.1137 4.4529 -1.3093 1.8593 4.5310 -1.3848 1.5975 4.5971 -1.4488 1.3295 4.6510 -1.5010 1.0562 4.6924 -1.5411 0.7787 4.7213 -1.5690 0.4981 4.7374 -1.5846 0.2156 4.7407 -1.5878 -0.0678 4.7313 -1.5786 -0.3509 4.7090 -1.5571 -0.6326 4.6742 -1.5234 -0.9118 4.6268 -1.4775 -1.1875 4.5670 -1.4197 -1.4584 4.4952 -1.3501 -1.7236 4.4115 -1.2692 -1.9820 4.3163 -1.1771 -2.2325 4.2100 -1.0742 -2.4743 4.0930 -0.9610 -2.7063 3.9658 -0.8379 -2.9276 1 100 0 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 86 87 88 89 90 91 92 93 94 95 96 97 98 99 4.9617 0.0462 -0.6159 4.9381 0.3406 -0.7065 4.8961 0.6347 -0.7909 4.8358 0.9274 -0.8691 4.7574 1.2175 -0.9405 4.6614 1.5039 -1.0050 4.5479 1.7855 -1.0622 4.4176 2.0611 -1.1121 4.2709 2.3296 -1.1542 4.1084 2.5900 -1.1886 3.9307 2.8413 -1.2151 3.7386 3.0825 -1.2335 3.5327 3.3126 -1.2438 3.3140 3.5306 -1.2459 3.0832 3.7359 -1.2399 2.8413 3.9274 -1.2257 2.5892 4.1046 -1.2034 2.3280 4.2666 -1.1732 2.0586 4.4129 -1.1350 1.7821 4.5429 -1.0892 1.4997 4.6560 -1.0358 1.2124 4.7518 -0.9750 0.9214 4.8299 -0.9072 0.6277 4.8901 -0.8325 0.3327 4.9320 -0.7513 0.0373 4.9556 -0.6639 -0.2571 4.9607 -0.5706 -0.5495 4.9473 -0.4718 -0.8386 4.9154 -0.3679 -1.1234 4.8653 -0.2594 -1.4027 4.7970 -0.1465 -1.6755 4.7108 -0.0298 -1.9405 4.6072 0.0902 -2.1969 4.4865 0.2132 -2.4435 4.3491 0.3385 -2.6795 4.1956 0.4658 -2.9038 4.0267 0.5945 -3.1156 3.8430 0.7241 -3.3141 3.6452 0.8540 -3.4985 3.4341 0.9839 -3.6680 3.2105 1.1131 -3.8219 2.9753 1.2411 -3.9598 2.7295 1.3675 -4.0810 2.4739 1.4918 -4.1850 2.2097 1.6134 -4.2714 1.9379 1.7319 -4.3400 1.6595 1.8468 -4.3903 1.3756 1.9577 -4.4223 1.0874 2.0641 -4.4358 0.7959 2.1656 -4.4308 0.5024 2.2618 -4.4072 0.2081 2.3523 -4.3652 -0.0861 2.4368 -4.3048 -0.3788 2.5149 -4.2265 -0.6689 2.5864 -4.1304 -0.9553 2.6508 -4.0170 -1.2369 2.7081 -3.8867 -1.5125 2.7579 -3.7400 -1.7810 2.8001 -3.5775 -2.0414 2.8345 -3.3998 -2.2927 2.8609 -3.2076 -2.5339 2.8793 -3.0018 -2.7639 2.8896 -2.7830 -2.9820 2.8918 -2.5523 -3.1873 2.8857 -2.3104 -3.3788 2.8716 -2.0583 -3.5560 2.8493 -1.7971 -3.7180 2.8190 -1.5277 -3.8643 2.7809 -1.2512 -3.9942 2.7350 -0.9688 -4.1074 2.6816 -0.6815 -4.2032 2.6209 -0.3904 -4.2813 2.5530 -0.0968 -4.3415 2.4784 0.1983 -4.3834 2.3972 0.4936 -4.4070 2.3098 0.7880 -4.4121 2.2165 1.0804 -4.3986 2.1177 1.3695 -4.3668 2.0138 1.6543 -4.3166 1.9052 1.9337 -4.2483 1.7924 2.2064 -4.1622 1.6757 2.4714 -4.0586 1.5556 2.7278 -3.9378 1.4327 2.9745 -3.8005 1.3073 3.2104 -3.6470 1.1801 3.4347 -3.4781 1.0514 3.6466 -3.2944 0.9218 3.8450 -3.0965 0.7918 4.0294 -2.8854 0.6620 4.1989 -2.6618 0.5328 4.3529 -2.4267 0.4047 4.4907 -2.1808 0.2783 4.6119 -1.9253 0.1541 4.7159 -1.6611 0.0324 4.8023 -1.3893 -0.0861 4.8709 -1.1108 -0.2010 4.9213 -0.8270 -0.3118 4.9533 -0.5387 -0.4182 4.9668 -0.2473 -0.5197 1 100 0 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 86 87 88 89 90 91 92 93 94 95 96 97 98 99 1.0000 0.0000 0.0000 1.0000 1.0000 0.0000 1.0000 1.0000 1.0000 1.0000 0.0000 1.0000 1 4 0 1 2 3 0.0000 1.0000 0.0000 0.0000 1.0000 1.0000 1.0000 0.0000 1.0000 1.0000 0.0000 0.0000 1 4 0 1 2 3 0.0000 0.0000 1.0000 1.0000 0.0000 0.0000 0.0000 1.0000 0.0000 1 3 0 1 2 gamgi0.17.1g/dat/util/0000755000175000017500000000000012277505366014050 5ustar carloscarlosgamgi0.17.1g/dat/util/python/0000755000175000017500000000000010243744417015362 5ustar carloscarlosgamgi0.17.1g/dat/util/perl/0000755000175000017500000000000012277505366015012 5ustar carloscarlosgamgi0.17.1g/dat/util/perl/debug_set_get0000744000175000017500000000106207754034565017537 0ustar carloscarlos#!/usr/bin/perl foreach my $file (@ARGV) { print "*** $file ***\n"; open GET, "<$file" or die "Unable to read file\n"; while () { if (/get_data.*\"(\w+)\"/) { my $widget = $1; my $result = 0; open SET, "<$file" or die "Unable to read file\n"; while () { if (/set_data.*\"$widget\"/) { $result = 1; break; } } if ($result == 0) { print "$widget: not found\n"; } close SET; } } close GET; } gamgi0.17.1g/dat/util/perl/cc1_gml0000744000175000017500000000075007715732305016241 0ustar carloscarlos#!/usr/bin/perl foreach (@ARGV) { open FILE_IN, "<$_" or die "Unable to read file $_"; s/.cc1//; open FILE_OUT, ">$_.xml" or die "Unable to write file $_.xml"; printf FILE_OUT "\n\n"; ; while () { s{\s*(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s.*} {\n}sg; printf FILE_OUT; } printf FILE_OUT "\n\n"; close FILE_IN; close FILE_OUT; } gamgi0.17.1g/dat/util/perl/xyz_gml0000744000175000017500000000154607712465714016435 0ustar carloscarlos#!/usr/bin/perl foreach (@ARGV) { open FILE_IN, "<$_" or die "Unable to read file $_"; s/G_//; open FILE_OUT, ">$_.xml" or die "Unable to write file $_.xml"; printf FILE_OUT "\n\n"; ; while () { s{\s*(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s*} {\n}g; s/element="1"/element="H"/; s/element="2"/element="He"/; s/element="3"/element="Li"/; s/element="4"/element="Be"/; s/element="5"/element="B"/; s/element="6"/element="C"/; s/element="7"/element="N"/; s/element="8"/element="O"/; s/element="9"/element="F"/; s/element="10"/element="Ne"/; s/element="11"/element="Na"/; s/element="12"/element="Mg"/; printf FILE_OUT; } printf FILE_OUT "\n\n"; close FILE_IN; close FILE_OUT; } gamgi0.17.1g/dat/util/perl/mol_gml0000744000175000017500000000103207714544014016351 0ustar carloscarlos#!/usr/bin/perl foreach (@ARGV) { open FILE_IN, "<$_" or die "Unable to read file $_"; s/.tmp~//; open FILE_OUT, ">$_.xml" or die "Unable to write file $_.xml"; printf FILE_OUT "\n\n"; while () { s/0 0 0 0 0 0 0 0 0//g; s/0 0 0 0 0 0//g; s{\s*(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s*} {\n}g; printf FILE_OUT; } printf FILE_OUT "\n\n"; close FILE_IN; close FILE_OUT; } gamgi0.17.1g/dat/util/perl/mac_unix0000744000175000017500000000056007746047756016553 0ustar carloscarlos#!/usr/bin/perl foreach my $file (@ARGV) { open FILE_IN, "<$file" or die "Unable to read file $file: $!\n"; open FILE_OUT, ">$file~" or die "Unable to write file $file~: $!\n"; while () { s/\r/\n/g; printf FILE_OUT; } close FILE_IN; close FILE_OUT; rename "$file~", "$file" or warn "rename $file~ to $file failed: $!\n"; } gamgi0.17.1g/dat/util/perl/msf_gml0000744000175000017500000000074207712543762016365 0ustar carloscarlos#!/usr/bin/perl foreach (@ARGV) { open FILE_IN, "<$_" or die "Unable to read file $_"; s/.msf//; s/x/_/; open FILE_OUT, ">tube$_.xml" or die "Unable to write file $_.xml"; printf FILE_OUT "\n\n"; while () { s{\s*(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s*} {\n}g; printf FILE_OUT; } printf FILE_OUT "\n\n"; close FILE_IN; close FILE_OUT; } gamgi0.17.1g/dat/util/perl/car_gml0000744000175000017500000000107307714217216016335 0ustar carloscarlos#!/usr/bin/perl foreach (@ARGV) { open FILE_IN, "<$_" or die "Unable to read file $_"; s/.car//; open FILE_OUT, ">$_.xml" or die "Unable to write file $_.xml"; printf FILE_OUT "\n\n"; ; ; ; ; while () { s{\s*(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s*} {\n}g; printf FILE_OUT; } printf FILE_OUT "\n\n"; close FILE_IN; close FILE_OUT; } gamgi0.17.1g/dat/util/perl/dos_unix0000744000175000017500000000056212277505324016563 0ustar carloscarlos#!/usr/bin/perl foreach my $file (@ARGV) { open FILE_IN, "<$file" or die "Unable to read file $file: $!\n"; open FILE_OUT, ">$file~" or die "Unable to write file $file~: $!\n"; while () { s/\r\n/\n/g; printf FILE_OUT; } close FILE_IN; close FILE_OUT; rename "$file~", "$file" or warn "rename $file~ to $file failed: $!\n"; } gamgi0.17.1g/dat/util/perl/pdb_gml0000744000175000017500000000076107712772100016334 0ustar carloscarlos#!/usr/bin/perl foreach (@ARGV) { open FILE_IN, "<$_" or die "Unable to read file $_"; s/.pdb//; open FILE_OUT, ">$_.xml" or die "Unable to write file $_.xml"; printf FILE_OUT "\n\n"; while () { s{\s*(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s*} {\n}g; printf FILE_OUT; } printf FILE_OUT "\n\n"; close FILE_IN; close FILE_OUT; } gamgi0.17.1g/dat/util/c/0000755000175000017500000000000010244447163014262 5ustar carloscarlosgamgi0.17.1g/dat/util/c/Cnh.c0000644000175000017500000000152110244146315015130 0ustar carloscarlos#include #include #include #define PI 3.14159265358979323846 int main (int argc, char **argv) { double offset, x, y, r, angle; int order, n; order = atoi (argv[1]); r = atof (argv[2]); offset = (2 * PI) / 36; printf ("\n \n"); printf (" \n", 0.0, 0.0, -1.0); printf (" \n", 0.0, 0.0, 1.0); for (n = 0; n < order; n++) { angle = (2 * PI) / order; x = r * cos (n * angle); y = r * sin (n * angle); printf (" \n", x, y, 0.0); x = r * cos (n * angle + offset); y = r * sin (n * angle + offset); printf (" \n", x, y, 0.0); } printf (" \n\n"); return 0; } gamgi0.17.1g/dat/util/c/Dn.c0000644000175000017500000000125010243466212014760 0ustar carloscarlos#include #include #include #define PI 3.14159265358979323846 int main (int argc, char **argv) { double offset, x, y, r, angle; int order, n; order = atoi (argv[1]); r = atof (argv[2]); offset = (2 * PI) / 36; printf ("\n \n"); for (n = 0; n < order; n++) { angle = (2 * PI) / order; x = r * cos (n * angle); y = r * sin (n * angle); printf (" \n", x, y, 1.1); x = r * cos (n * angle + offset); y = r * sin (n * angle + offset); printf (" \n", x, y, 0.9); } printf (" \n\n"); return 0; } gamgi0.17.1g/dat/util/c/Sn.c0000644000175000017500000000130710243676067015015 0ustar carloscarlos#include #include #include #define PI 3.14159265358979323846 int main (int argc, char **argv) { double offset, x, y, z, r, angle; int order, n; order = atoi (argv[1]); r = atof (argv[2]); offset = (2 * PI) / 36; printf ("\n \n"); z = 0.1; for (n = 0; n < order; n++) { angle = (2 * PI) / order; x = r * cos (n * angle); y = r * sin (n * angle); printf (" \n", x, y, 1.0 - z); x = r * cos (n * angle + offset); y = r * sin (n * angle + offset); printf (" \n", x, y, 1.0 + z); z = -z; } printf (" \n\n"); return 0; } gamgi0.17.1g/dat/util/c/Dnh.c0000644000175000017500000000101610244206643015131 0ustar carloscarlos#include #include #include #define PI 3.14159265358979323846 int main (int argc, char **argv) { double offset, x, y, r, angle; int order, n; order = atoi (argv[1]); r = atof (argv[2]); offset = (2 * PI) / 36; printf ("\n \n"); for (n = 0; n < order; n++) { angle = (2 * PI) / order; x = r * cos (n * angle); y = r * sin (n * angle); printf (" \n", x, y, 0.0); } printf (" \n\n"); return 0; } gamgi0.17.1g/dat/util/c/Dnd.c0000644000175000017500000000106310244447163015133 0ustar carloscarlos#include #include #include #define PI 3.14159265358979323846 int main (int argc, char **argv) { double offset, x, y, z, r, angle; int order, n; order = atoi (argv[1]); r = atof (argv[2]); printf ("\n \n"); z = -0.1; offset = (2 * PI) / 36; for (n = 0; n < 2 * order; n++) { angle = (2 * PI) / (2 * order); x = r * cos (n * angle); y = r * sin (n * angle); printf (" \n", x, y, 1.0 + z); z = -z; } printf (" \n\n"); return 0; } gamgi0.17.1g/dat/util/c/Cn.c0000644000175000017500000000137410243420061014756 0ustar carloscarlos#include #include #include #define PI 3.14159265358979323846 int main (int argc, char **argv) { double offset, x, y, r, angle; int order, n; order = atoi (argv[1]); r = atof (argv[2]); offset = (2 * PI) / 36; printf ("\n \n"); printf (" \n", 0.0, 0.0, 0.0); for (n = 0; n < order; n++) { angle = (2 * PI) / order; x = r * cos (n * angle); y = r * sin (n * angle); printf (" \n", x, y, 1.0); x = r * cos (n * angle + offset); y = r * sin (n * angle + offset); printf (" \n", x, y, 1.0); } printf (" \n\n"); return 0; } gamgi0.17.1g/dat/util/c/Cnv.c0000644000175000017500000000114110243473752015153 0ustar carloscarlos#include #include #include #define PI 3.14159265358979323846 int main (int argc, char **argv) { double offset, x, y, r, angle; int order, n; order = atoi (argv[1]); r = atof (argv[2]); offset = (2 * PI) / 36; printf ("\n \n"); printf (" \n", 0.0, 0.0, 0.0); for (n = 0; n < order; n++) { angle = (2 * PI) / order; x = r * cos (n * angle); y = r * sin (n * angle); printf (" \n", x, y, 1.0); } printf (" \n\n"); return 0; } gamgi0.17.1g/dat/help/0000755000175000017500000000000007751464703014023 5ustar carloscarlosgamgi0.17.1g/dat/help/config.xml0000644000175000017500000000024607716512437016013 0ustar carloscarlos gamgi0.17.1g/dat/orbital/0000755000175000017500000000000012276746362014531 5ustar carloscarlosgamgi0.17.1g/dat/orbital/screen_3d_all.xml0000644000175000017500000000352112254624015017733 0ustar carloscarlos gamgi0.17.1g/dat/orbital/6s_b.xml0000644000175000017500000000106112160164537016070 0ustar carloscarlos gamgi0.17.1g/dat/orbital/screen_6gz4_6s.xml0000644000175000017500000000220412243436436020002 0ustar carloscarlos gamgi0.17.1g/dat/orbital/screen_6px.xml0000644000175000017500000000124312243436567017324 0ustar carloscarlos gamgi0.17.1g/dat/orbital/6s_a.xml0000644000175000017500000000106612160102336016061 0ustar carloscarlos gamgi0.17.1g/dat/cluster/0000755000175000017500000000000012267065614014550 5ustar carloscarlosgamgi0.17.1g/dat/cluster/pbc8.xml0000644000175000017500000000114110226026315016107 0ustar carloscarlos gamgi0.17.1g/dat/cluster/pbc5.xml0000644000175000017500000000066610226024603016115 0ustar carloscarlos gamgi0.17.1g/dat/cluster/cfc333.xml0000644000175000017500000002335610035570255016260 0ustar carloscarlos gamgi0.17.1g/dat/cluster/ccc211.xml0000644000175000017500000000172710035613707016246 0ustar carloscarlos gamgi0.17.1g/dat/cluster/line3_b.xml0000644000175000017500000000050210013443063016563 0ustar carloscarlos gamgi0.17.1g/dat/cluster/pbc6.xml0000644000175000017500000000075710226026323016120 0ustar carloscarlos gamgi0.17.1g/dat/cluster/line3_a.xml0000644000175000017500000000050210013443056016564 0ustar carloscarlos gamgi0.17.1g/dat/cluster/cfc111.xml0000644000175000017500000000167010232563222016240 0ustar carloscarlos gamgi0.17.1g/dat/cluster/c60.xml0000644000175000017500000001004610056465240015654 0ustar carloscarlos gamgi0.17.1g/dat/cluster/plane11_b.xml0000644000175000017500000000057610013152104017016 0ustar carloscarlos gamgi0.17.1g/dat/cluster/hs.xml0000644000175000017500000000172510036625350015700 0ustar carloscarlos gamgi0.17.1g/dat/cluster/dna.xml0000644000175000017500000012013710056465224016033 0ustar carloscarlos gamgi0.17.1g/dat/cluster/cs111.xml0000644000175000017500000000114310507512507016112 0ustar carloscarlos gamgi0.17.1g/dat/cluster/H2O.xml0000644000175000017500000000074310231236623015653 0ustar carloscarlos gamgi0.17.1g/dat/cluster/pbc1.xml0000644000175000017500000000031610226026572016110 0ustar carloscarlos gamgi0.17.1g/dat/cluster/pbc4.xml0000644000175000017500000000075510226024645016121 0ustar carloscarlos gamgi0.17.1g/dat/cluster/c476.xml0000644000175000017500000006550410046271003015747 0ustar carloscarlos gamgi0.17.1g/dat/cluster/line8.xml0000644000175000017500000000123010013266534016274 0ustar carloscarlos gamgi0.17.1g/dat/cluster/plane11_a.xml0000644000175000017500000000057510012515244017023 0ustar carloscarlos gamgi0.17.1g/dat/cluster/ccc111.xml0000644000175000017500000000123210232563165016235 0ustar carloscarlos gamgi0.17.1g/dat/group/0000755000175000017500000000000012263333135014213 5ustar carloscarlosgamgi0.17.1g/dat/group/group.xml0000644000175000017500000000601211763667135016106 0ustar carloscarlos -1.7191 0.0105 -0.0000 -0.6289 3.0922 0.0000 4.1929 2.6101 0.0000 4.2138 0.3669 -0.0000 1.5304 -1.5828 -0.0000 1 5 0 1 2 3 4 gamgi0.17.1g/dat/assembly/0000755000175000017500000000000012254623067014704 5ustar carloscarlosgamgi0.17.1g/dat/assembly/recursive.xml0000644000175000017500000000031007714540743017433 0ustar carloscarlos gamgi0.17.1g/dat/cell/0000755000175000017500000000000012277507766014020 5ustar carloscarlosgamgi0.17.1g/dat/cell/glasses/0000755000175000017500000000000012254617072015444 5ustar carloscarlosgamgi0.17.1g/dat/cell/glasses/rcp100.xml0000644000175000017500000003143410505515651017175 0ustar carloscarlos gamgi0.17.1g/dat/cell/polymers/0000755000175000017500000000000012254617057015660 5ustar carloscarlosgamgi0.17.1g/dat/cell/polymers/o-HDPE_screen.xml0000644000175000017500000036421410353316736020725 0ustar carloscarlos gamgi0.17.1g/dat/cell/polymers/o-HDPE.xml0000644000175000017500000014425710204742064017361 0ustar carloscarlos gamgi0.17.1g/dat/cell/styles.xml0000644000175000017500000000355012254614211016043 0ustar carloscarlos gamgi0.17.1g/dat/cell/styles_bw.xml0000644000175000017500000000372512254614252016544 0ustar carloscarlos gamgi0.17.1g/dat/cell/silica/0000755000175000017500000000000012267054546015254 5ustar carloscarlosgamgi0.17.1g/dat/cell/silica/cristobalite.xml0000644000175000017500000003011012267054344020451 0ustar carloscarlos 0.8950 4.4750 2.6850 2.6850 6.2650 2.6850 2.6850 4.4750 0.8950 0.8950 6.2650 0.8950 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 2.6850 4.4750 0.8950 1.7900 5.3700 1.7900 2.6850 6.2650 2.6850 0.8950 6.2650 0.8950 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 4.4750 4.4750 6.2650 6.2650 4.4750 4.4750 4.4750 6.2650 4.4750 6.2650 6.2650 6.2650 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 6.2650 4.4750 4.4750 4.4750 6.2650 4.4750 5.3700 5.3700 5.3700 6.2650 6.2650 6.2650 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 4.4750 0.8950 2.6850 6.2650 2.6850 2.6850 6.2650 0.8950 0.8950 4.4750 2.6850 0.8950 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 6.2650 2.6850 2.6850 5.3700 1.7900 1.7900 4.4750 2.6850 0.8950 6.2650 0.8950 0.8950 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 0.8950 0.8950 6.2650 2.6850 0.8950 4.4750 0.8950 2.6850 4.4750 2.6850 2.6850 6.2650 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 2.6850 0.8950 4.4750 2.6850 2.6850 6.2650 1.7900 1.7900 5.3700 0.8950 0.8950 6.2650 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 gamgi0.17.1g/dat/cell/silica/quartz.xml0000644000175000017500000031410712267054414017324 0ustar carloscarlos 0.9453 3.4279 0.9087 2.5005 2.5326 2.7269 1.2491 2.1635 1.8182 1.5529 0.8992 0.9087 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 5.9418 3.4279 0.9087 7.4970 2.5326 2.7269 6.2456 2.1635 1.8182 6.5494 0.8992 0.9087 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 10.9383 3.4279 0.9087 12.4935 2.5326 2.7269 11.2421 2.1635 1.8182 11.5459 0.8992 0.9087 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 2.5005 2.5326 2.7269 1.5529 0.8992 0.9087 -0.0022 1.7944 2.7269 0.9453 3.4279 0.9087 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 7.4970 2.5326 2.7269 6.5494 0.8992 0.9087 4.9943 1.7944 2.7269 5.9418 3.4279 0.9087 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 9.9908 1.7944 2.7269 10.9383 3.4279 0.9087 12.4935 2.5326 2.7269 11.5459 0.8992 0.9087 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 -2.5005 6.1215 2.7269 0.0022 6.8597 2.7269 -0.9453 5.2263 0.9087 -1.5529 7.7550 0.9087 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 4.9987 6.8597 2.7269 4.0512 5.2263 0.9087 2.4960 6.1215 2.7269 3.4436 7.7550 0.9087 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 9.9952 6.8597 2.7269 9.0477 5.2263 0.9087 7.4925 6.1215 2.7269 8.4401 7.7550 0.9087 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 -4.9987 10.4486 2.7269 -2.4960 11.1868 2.7269 -3.4436 9.5534 0.9087 -4.0512 12.0821 0.9087 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 2.5005 11.1868 2.7269 1.5529 9.5534 0.9087 -0.0022 10.4486 2.7269 0.9453 12.0821 0.9087 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 -3.4436 9.5534 0.9087 -4.9987 10.4486 2.7269 -3.7474 10.8177 1.8182 -4.0512 12.0821 0.9087 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 1.5529 9.5534 0.9087 -0.0022 10.4486 2.7269 1.2491 10.8177 1.8182 0.9453 12.0821 0.9087 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 4.9943 10.4486 2.7269 7.4970 11.1868 2.7269 6.5494 9.5534 0.9087 5.9418 12.0821 0.9087 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 6.5494 9.5534 0.9087 4.9943 10.4486 2.7269 6.2456 10.8177 1.8182 5.9418 12.0821 0.9087 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 0.9453 3.4279 6.3633 -0.9431 3.4318 4.5451 -0.9453 5.2263 6.3633 0.9431 5.2224 4.5451 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 4.0534 3.4318 4.5451 4.9943 1.7944 2.7269 3.4413 0.8953 4.5451 2.5005 2.5326 2.7269 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 8.4378 0.8953 4.5451 7.4970 2.5326 2.7269 9.0499 3.4318 4.5451 9.9908 1.7944 2.7269 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 1.5552 7.7589 4.5451 0.9431 5.2224 4.5451 0.0022 6.8597 2.7269 2.4960 6.1215 2.7269 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 6.5517 7.7589 4.5451 5.9396 5.2224 4.5451 4.9987 6.8597 2.7269 7.4925 6.1215 2.7269 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 -1.5552 9.5495 4.5451 -0.9431 12.0860 4.5451 -0.0022 10.4486 2.7269 -2.4960 11.1868 2.7269 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 3.4413 9.5495 4.5451 4.0534 12.0860 4.5451 4.9943 10.4486 2.7269 2.5005 11.1868 2.7269 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 2.5005 2.5326 8.1815 1.5529 0.8992 6.3633 -0.0022 1.7944 8.1815 0.9453 3.4279 6.3633 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 7.4970 2.5326 8.1815 6.5494 0.8992 6.3633 4.9943 1.7944 8.1815 5.9418 3.4279 6.3633 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 9.9908 1.7944 8.1815 10.9383 3.4279 6.3633 12.4935 2.5326 8.1815 11.5459 0.8992 6.3633 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 0.0022 6.8597 8.1815 -0.9453 5.2263 6.3633 -2.5005 6.1215 8.1815 -1.5529 7.7550 6.3633 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 4.0512 5.2263 6.3633 5.9396 5.2224 4.5451 5.9418 3.4279 6.3633 4.0534 3.4318 4.5451 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 9.0477 5.2263 6.3633 10.9383 3.4279 6.3633 9.0499 3.4318 4.5451 10.9361 5.2224 4.5451 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 -1.5529 7.7550 6.3633 -3.4436 9.5534 6.3633 -1.5552 9.5495 4.5451 -3.4413 7.7589 4.5451 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 1.5529 9.5534 6.3633 3.4413 9.5495 4.5451 3.4436 7.7550 6.3633 1.5552 7.7589 4.5451 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 4.9987 6.8597 8.1815 2.4960 6.1215 8.1815 3.4436 7.7550 6.3633 4.0512 5.2263 6.3633 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 9.9952 6.8597 8.1815 7.4925 6.1215 8.1815 8.4401 7.7550 6.3633 9.0477 5.2263 6.3633 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 -4.9987 10.4486 8.1815 -2.4960 11.1868 8.1815 -3.4436 9.5534 6.3633 -4.0512 12.0821 6.3633 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 -0.0022 10.4486 8.1815 2.5005 11.1868 8.1815 1.5529 9.5534 6.3633 0.9453 12.0821 6.3633 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 4.9943 10.4486 8.1815 5.9418 12.0821 6.3633 7.4970 11.1868 8.1815 6.5494 9.5534 6.3633 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 6.5494 9.5534 6.3633 8.4378 9.5495 4.5451 8.4401 7.7550 6.3633 6.5517 7.7589 4.5451 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 -0.9453 5.2263 11.8179 0.9453 3.4279 11.8179 -0.9431 3.4318 9.9997 0.9431 5.2224 9.9997 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 4.0534 3.4318 9.9997 4.9943 1.7944 8.1815 3.4413 0.8953 9.9997 2.5005 2.5326 8.1815 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 8.4378 0.8953 9.9997 9.0499 3.4318 9.9997 9.9908 1.7944 8.1815 7.4970 2.5326 8.1815 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 1.5552 7.7589 9.9997 0.9431 5.2224 9.9997 0.0022 6.8597 8.1815 2.4960 6.1215 8.1815 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 4.0512 5.2263 11.8179 5.9418 3.4279 11.8179 4.0534 3.4318 9.9997 5.9396 5.2224 9.9997 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 9.0477 5.2263 11.8179 10.9383 3.4279 11.8179 9.0499 3.4318 9.9997 10.9361 5.2224 9.9997 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 -1.5529 7.7550 11.8179 -3.4413 7.7589 9.9997 -3.4436 9.5534 11.8179 -1.5552 9.5495 9.9997 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 3.4436 7.7550 11.8179 1.5552 7.7589 9.9997 1.5529 9.5534 11.8179 3.4413 9.5495 9.9997 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 6.5517 7.7589 9.9997 7.4925 6.1215 8.1815 5.9396 5.2224 9.9997 4.9987 6.8597 8.1815 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 -1.5552 9.5495 9.9997 -0.9431 12.0860 9.9997 -0.0022 10.4486 8.1815 -2.4960 11.1868 8.1815 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 3.4413 9.5495 9.9997 4.0534 12.0860 9.9997 4.9943 10.4486 8.1815 2.5005 11.1868 8.1815 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 -0.0022 1.7944 13.6361 0.9453 3.4279 11.8179 2.5005 2.5326 13.6361 1.5529 0.8992 11.8179 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 7.4970 2.5326 13.6361 4.9943 1.7944 13.6361 5.9418 3.4279 11.8179 6.5494 0.8992 11.8179 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 12.4935 2.5326 13.6361 9.9908 1.7944 13.6361 10.9383 3.4279 11.8179 11.5459 0.8992 11.8179 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 0.0022 6.8597 13.6361 -0.9453 5.2263 11.8179 -2.5005 6.1215 13.6361 -1.5529 7.7550 11.8179 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 2.4960 6.1215 13.6361 3.4436 7.7550 11.8179 4.9987 6.8597 13.6361 4.0512 5.2263 11.8179 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 9.9952 6.8597 13.6361 7.4925 6.1215 13.6361 8.4401 7.7550 11.8179 9.0477 5.2263 11.8179 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 -4.9987 10.4486 13.6361 -2.4960 11.1868 13.6361 -3.4436 9.5534 11.8179 -4.0512 12.0821 11.8179 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 -0.0022 10.4486 13.6361 0.9453 12.0821 11.8179 2.5005 11.1868 13.6361 1.5529 9.5534 11.8179 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 4.9943 10.4486 13.6361 7.4970 11.1868 13.6361 6.5494 9.5534 11.8179 5.9418 12.0821 11.8179 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 6.5494 9.5534 11.8179 8.4378 9.5495 9.9997 8.4401 7.7550 11.8179 6.5517 7.7589 9.9997 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 4.0534 3.4318 15.4543 2.5005 2.5326 13.6361 3.7474 2.1635 14.5456 3.4413 0.8953 15.4543 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 9.0499 3.4318 15.4543 7.4970 2.5326 13.6361 8.7439 2.1635 14.5456 8.4378 0.8953 15.4543 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 3.4413 0.8953 15.4543 2.5005 2.5326 13.6361 4.0534 3.4318 15.4543 4.9943 1.7944 13.6361 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 8.4378 0.8953 15.4543 7.4970 2.5326 13.6361 9.0499 3.4318 15.4543 9.9908 1.7944 13.6361 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 0.9431 5.2224 15.4543 1.5552 7.7589 15.4543 2.4960 6.1215 13.6361 0.0022 6.8597 13.6361 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 6.5517 7.7589 15.4543 5.9396 5.2224 15.4543 4.9987 6.8597 13.6361 7.4925 6.1215 13.6361 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 -0.9431 12.0860 15.4543 -0.0022 10.4486 13.6361 -1.5552 9.5495 15.4543 -2.4960 11.1868 13.6361 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 4.0534 12.0860 15.4543 4.9943 10.4486 13.6361 3.4413 9.5495 15.4543 2.5005 11.1868 13.6361 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 -1.5552 9.5495 15.4543 -0.0022 10.4486 13.6361 -1.2491 10.8177 14.5456 -0.9431 12.0860 15.4543 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 3.4413 9.5495 15.4543 4.9943 10.4486 13.6361 3.7474 10.8177 14.5456 4.0534 12.0860 15.4543 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 gamgi0.17.1g/dat/cell/silica/cristobalite.txt0000644000175000017500000000055712121456732020500 0ustar carloscarlosSiO2 - Cristobalite (beta) Lattice parameters: 7.16 Radius: Si 1.1760 (half-distance) O: 0.6037 (half-distance) Space group: 227 Wyckoff positions: Si 2a O 4c Cristobalite_111.xml: Cells: 1 x 1 x 1 Change: -0.125, -0.125, -0.125 Cristobalite_222.xml: Cells: 2 x 2 x 2 Cutoff: Nodes Polytopes: Neighbours 4 Source: http://www.minweb.co.uk/quartz/bcridata.html gamgi0.17.1g/dat/cell/silica/quartz.txt0000644000175000017500000000063012116467533017337 0ustar carloscarlosSiO2 - Quartz (beta) Lattice parameters: 4.9965 5.4546 Radius: Si 1.1760 (half-distance) O: 0.6037 (half-distance) Space group: 180 Wyckoff positions: Si 6g, x = 0.5 O 12k, x = 0.4147, y = 0.2078, z = 0.1666 Cells: 3 x 3 x 3 Cutoff: Nodes Polytopes: Neighbours 4 References 1) Y le Page and G Donnay (1976) Acta Crystallographica, B, 32, 2456. 2) http://www.uwgb.edu/dutchs/Petrology/Silica%20Poly.HTM gamgi0.17.1g/dat/cell/silica/trydimite.xml0000644000175000017500000013600612267054570020013 0ustar carloscarlos 2.5150 7.2602 2.0550 2.5150 8.7122 -0.0000 3.7725 6.5342 -0.0000 1.2575 6.5342 -0.0000 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 2.5150 7.2602 2.0550 2.5150 8.7122 4.1100 1.2575 6.5342 4.1100 3.7725 6.5342 4.1100 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 5.0300 5.8081 6.1650 5.0300 4.3561 4.1100 3.7725 6.5342 4.1100 6.2875 6.5342 4.1100 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 2.5150 7.2602 10.2750 1.2575 6.5342 8.2200 2.5150 8.7122 8.2200 3.7725 6.5342 8.2200 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 5.0300 5.8081 6.1650 6.2875 6.5342 8.2200 3.7725 6.5342 8.2200 5.0300 4.3561 8.2200 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 5.0300 5.8081 14.3850 6.2875 6.5342 12.3300 5.0300 4.3561 12.3300 3.7725 6.5342 12.3300 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 2.5150 7.2602 10.2750 3.7725 6.5342 12.3300 2.5150 8.7122 12.3300 1.2575 6.5342 12.3300 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 5.0300 5.8081 14.3850 6.2875 6.5342 16.4400 3.7725 6.5342 16.4400 5.0300 4.3561 16.4400 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 -2.5150 7.2602 2.0550 -3.7725 6.5342 -0.0000 -2.5150 8.7122 -0.0000 -1.2575 6.5342 -0.0000 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 5.0300 2.9041 2.0550 5.0300 4.3561 -0.0000 6.2875 2.1781 -0.0000 3.7725 2.1781 -0.0000 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 -2.5150 7.2602 2.0550 -1.2575 6.5342 4.1100 -2.5150 8.7122 4.1100 -3.7725 6.5342 4.1100 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 0.0000 5.8081 6.1650 0.0000 4.3561 4.1100 -1.2575 6.5342 4.1100 1.2575 6.5342 4.1100 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 5.0300 2.9041 2.0550 5.0300 4.3561 4.1100 3.7725 2.1781 4.1100 6.2875 2.1781 4.1100 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 7.5450 1.4520 6.1650 7.5450 0.0000 4.1100 6.2875 2.1781 4.1100 8.8025 2.1781 4.1100 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 -2.5150 7.2602 10.2750 -3.7725 6.5342 8.2200 -2.5150 8.7122 8.2200 -1.2575 6.5342 8.2200 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 0.0000 5.8081 6.1650 1.2575 6.5342 8.2200 -1.2575 6.5342 8.2200 0.0000 4.3561 8.2200 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 5.0300 2.9041 10.2750 5.0300 4.3561 8.2200 6.2875 2.1781 8.2200 3.7725 2.1781 8.2200 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 7.5450 1.4520 6.1650 8.8025 2.1781 8.2200 6.2875 2.1781 8.2200 7.5450 0.0000 8.2200 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 -2.5150 7.2602 10.2750 -1.2575 6.5342 12.3300 -2.5150 8.7122 12.3300 -3.7725 6.5342 12.3300 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 0.0000 5.8081 14.3850 0.0000 4.3561 12.3300 -1.2575 6.5342 12.3300 1.2575 6.5342 12.3300 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 5.0300 2.9041 10.2750 6.2875 2.1781 12.3300 5.0300 4.3561 12.3300 3.7725 2.1781 12.3300 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 7.5450 1.4520 14.3850 7.5450 0.0000 12.3300 6.2875 2.1781 12.3300 8.8025 2.1781 12.3300 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 0.0000 5.8081 14.3850 -1.2575 6.5342 16.4400 0.0000 4.3561 16.4400 1.2575 6.5342 16.4400 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 7.5450 1.4520 14.3850 7.5450 0.0000 16.4400 8.8025 2.1781 16.4400 6.2875 2.1781 16.4400 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 -0.0000 2.9041 2.0550 -0.0000 4.3561 -0.0000 1.2575 2.1781 -0.0000 -1.2575 2.1781 -0.0000 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 -0.0000 2.9041 2.0550 0.0000 4.3561 4.1100 -1.2575 2.1781 4.1100 1.2575 2.1781 4.1100 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 2.5150 1.4520 6.1650 2.5150 0.0000 4.1100 1.2575 2.1781 4.1100 3.7725 2.1781 4.1100 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 0.0000 2.9041 10.2750 -1.2575 2.1781 8.2200 0.0000 4.3561 8.2200 1.2575 2.1781 8.2200 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 2.5150 1.4520 6.1650 2.5150 0.0000 8.2200 3.7725 2.1781 8.2200 1.2575 2.1781 8.2200 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 2.5150 1.4520 14.3850 3.7725 2.1781 12.3300 2.5150 0.0000 12.3300 1.2575 2.1781 12.3300 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 0.0000 2.9041 10.2750 -1.2575 2.1781 12.3300 1.2575 2.1781 12.3300 0.0000 4.3561 12.3300 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 2.5150 1.4520 14.3850 3.7725 2.1781 16.4400 1.2575 2.1781 16.4400 2.5150 0.0000 16.4400 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 gamgi0.17.1g/dat/cell/silica/trydimite.txt0000644000175000017500000000044312121447235020016 0ustar carloscarlosSiO2 - Trydimite (beta) Lattice parameters: 5.03 8.22 Radius: Si 1.1760 (half-distance) O: 0.6037 (half-distance) Space group: 194 Wyckoff positions: Si 4f, z = 0.44 O 2c O 6g Cells: 2 x 2 x 2 Cutoff: Nodes Polytopes: Neighbours 4 Source: inst.eecs.berkeley.edu/~ee230/sp04/hw/hw2.pdf gamgi0.17.1g/dat/cell/structures/0000755000175000017500000000000012267055767016241 5ustar carloscarlosgamgi0.17.1g/dat/cell/structures/s011_ZnS_blenda.txt0000644000175000017500000000113611737126277021562 0ustar carloscarlosStructure 11 Prototype: ZnS StrukturBericht / Pearson: B3 / cF8 lattice parameters: ZnS AlP BeSe SeZn 5.406 5.451 5.070 5.667 TeZn GaP AsGa GaSb 6.103 5.448 5.653 6.095 InP CdTe AlAs 5.869 6.481 5.662 Radius: Zn: 0.600 (Shannon radius for charge +2 coordination 4) S: 1.840 (Shannon radius for charge -2 coordination 6: 4 not available) 1. Building with space group (s011.xml): Group: 216 Wyckoff positions: Zn 1c S 1a View: S: style solid, size 1.0, variancy 1.0, scale 0.3 Zn: style solid, size 1.0, variancy 1.0, scale 0.3 ZnS: style solid, method length, color 0.5,0.5,0.5 scale 0.5 gamgi0.17.1g/dat/cell/structures/s032_Cu2Mg_laves.xml0000644000175000017500000002061311736417176021637 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s025_aMn.xml0000644000175000017500000007526211732734717020256 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s002_W_bcc.xml0000644000175000017500000000515311600721740020525 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s023_aHg.txt0000644000175000017500000000042511737126277020245 0ustar carloscarlosStructure 23 Prototype: alpha-Hg StrukturBericht / Pearson: A10 / hR1 lattice parameter: Hg 3.464 6.677 Radius: Hg 1.5025 (half-distance) 1. Building with space group (s023.xml): Group: 166 Wyckoff positions: Hg 1a View: Hg: style solid, size 1.0, variancy 1.0, scale 0.5 gamgi0.17.1g/dat/cell/structures/s061_CdI2.xml0000644000175000017500000005315712267055614020257 0ustar carloscarlos 2.1120 8.5355 -1.7093 -2.1120 8.5355 -1.7093 2.1120 6.0968 1.7093 0.0000 9.7549 1.7093 -2.1120 6.0968 1.7093 -0.0000 4.8775 -1.7093 8 3 1 0 5 3 2 0 3 3 0 1 3 3 2 3 4 3 3 1 4 3 0 2 5 3 2 4 5 3 4 1 5 4.2240 4.8775 -1.7093 2.1120 6.0968 1.7093 6.3360 6.0968 1.7093 2.1120 8.5355 -1.7093 6.3360 8.5355 -1.7093 4.2240 9.7549 1.7093 8 3 1 2 5 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 3 3 1 5 3 2 4 5 3 4 3 5 2.1120 1.2194 -1.7093 4.2240 2.4387 1.7093 4.2240 4.8775 -1.7093 -0.0000 4.8775 -1.7093 -0.0000 2.4387 1.7093 2.1120 6.0968 1.7093 8 3 2 0 3 3 1 2 5 3 1 0 2 3 0 1 4 3 3 0 4 3 2 3 5 3 3 4 5 3 4 1 5 8.4480 4.8775 -1.7093 8.4480 2.4387 1.7093 6.3360 6.0968 1.7093 4.2240 4.8775 -1.7093 6.3360 1.2194 -1.7093 4.2240 2.4387 1.7093 8 3 2 0 3 3 1 2 5 3 1 0 2 3 0 1 4 3 3 0 4 3 2 3 5 3 3 4 5 3 4 1 5 4.2240 4.8775 5.1497 -0.0000 4.8775 5.1497 4.2240 2.4387 8.5683 2.1120 6.0968 8.5683 2.1120 1.2194 5.1497 0.0000 2.4387 8.5683 8 3 2 0 3 3 0 1 3 3 2 3 5 3 1 0 4 3 0 2 4 3 3 1 5 3 1 4 5 3 4 2 5 8.4480 2.4387 8.5683 8.4480 4.8775 5.1497 4.2240 2.4387 8.5683 6.3360 6.0968 8.5683 4.2240 4.8775 5.1497 6.3360 1.2194 5.1497 8 3 1 0 5 3 2 0 3 3 0 1 3 3 2 3 4 3 3 1 4 3 0 2 5 3 2 4 5 3 4 1 5 -2.1120 6.0968 8.5683 -0.0000 4.8775 5.1497 -2.1120 8.5355 5.1497 -0.0000 9.7549 8.5683 2.1120 8.5355 5.1497 2.1120 6.0968 8.5683 8 3 0 1 5 3 2 0 3 3 1 0 2 3 1 2 4 3 2 3 4 3 3 0 5 3 1 4 5 3 4 3 5 6.3360 8.5355 5.1497 2.1120 8.5355 5.1497 4.2240 4.8775 5.1497 6.3360 6.0968 8.5683 4.2240 9.7549 8.5683 2.1120 6.0968 8.5683 8 3 2 0 3 3 1 2 5 3 1 0 2 3 0 1 4 3 3 0 4 3 2 3 5 3 3 4 5 3 4 1 5 gamgi0.17.1g/dat/cell/structures/s001_Cu_cfc.txt0000644000175000017500000000076411737126277020732 0ustar carloscarlosStructure 1 Prototype: Cu StrukturBericht / Pearson: A1 / cF4 Lattice parameter: Cu Ag Au Al 3.615 4.086 4.078 4.049 Ni Pd Pt Pb 3.524 3.891 3.924 4.950 Radius: Cu 1.2780 (half-distance) 1. Building with space group (s001.xml): Group: 225 Wyckoff positions: Cu 1a 2. Building with structural unit (s1.xml): Bravais lattice: cF Cu: 0.0, 0.0, 0.0 View: Cu: style solid, size 1.0, variancy 1.0, scale 0.4 CuCu: style solid, method length, color 0.5,0.5,0.5 scale 0.5 gamgi0.17.1g/dat/cell/structures/s004_AuCu.txt0000644000175000017500000000100711737126277020377 0ustar carloscarlosStructure 4 Prototype: AuCu StrukturBericht / Pearson: L1_0 / tP4 lattice parameter: AuCu AgTi 3.963 3.671 4.104 4.077 AlTi CoPt 3.984 4.065 3.806 3.684 CrPd FePd 3.879 3.802 3.852 3.723 MnNi PtZn 3.690 3.490 4.026 3.474 Radius: Au 1.4420 (half-distance) Cu 1.2780 (half-distance) 1. Building with group space (s004.xml): Group: 123 Wyckoff positions: Au 2e Cu 1a Cu 1c View: Au: style solid, size 1.0, variancy 1.0, scale 0.3 Cu: style solid, size 1.0, variancy 1.0, scale 0.3 gamgi0.17.1g/dat/cell/structures/s058_Al2O3_corundum.xml0000644000175000017500000005542012267055360022271 0ustar carloscarlos -0.7297 4.0131 11.9118 1.4595 2.7492 11.9118 -0.7297 1.4852 11.9118 0.9214 4.1238 9.7460 -1.6511 2.8598 9.7460 0.7297 1.2639 9.7460 8 3 1 2 5 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 3 3 1 5 3 2 4 5 3 4 3 5 0.7297 4.0131 5.4145 0.7297 1.4852 5.4145 -1.4595 2.7492 5.4145 1.6511 2.8598 3.2487 -0.9214 4.1238 3.2487 -0.7297 1.2639 3.2487 8 3 1 2 5 3 2 4 5 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 3 3 1 5 3 4 3 5 3.1106 2.6385 1.0829 0.9214 1.3746 1.0829 3.1106 0.1107 1.0829 4.0320 1.2639 3.2487 1.6511 2.8598 3.2487 1.4595 0.0000 3.2487 8 3 2 0 3 3 1 2 5 3 1 0 2 3 0 1 4 3 3 0 4 3 2 3 5 3 3 4 5 3 4 1 5 1.6511 0.1107 7.5802 3.8403 1.3746 7.5802 1.6511 2.6385 7.5802 3.3022 -0.0000 9.7460 0.7297 1.2639 9.7460 3.1106 2.8598 9.7460 8 3 1 2 5 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 3 3 1 5 3 2 4 5 3 4 3 5 2.3808 1.3746 6.2535 2.3809 1.3746 8.9070 2.3809 4.1238 8.4193 0.0000 2.7492 6.7412 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 gamgi0.17.1g/dat/cell/structures/s028_Al3Ti.xml0000644000175000017500000000437511733174373020454 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s065_ZnWO4.txt0000644000175000017500000000074611737367615020506 0ustar carloscarlosStructure 65 Prototype: ZnWO4 StrukturBericht / Pearson: - / mP12 Lattice parameters: ZnWO4 4.72 5.7 4.95 90.15 (beta = AC) Radius: Zn: (half-distance) W: (half-distance) O: (half-distance) 1. Building with space group (s065.xml): Group: 13 Wyckoff positions: Zn 2f, y = 0.674 W 2e, y = 0.2662 O 4g, x = 0.22, y = 0.11, z = 0.95 O 4g, x = 0.26, y = 0.38, z = 0.39 View: Zn,W,O: style solid, size 0.8, variancy 0.0, scale 1.0 ZnO,WO: style solid, method length, size 0.2, scale 1.0 gamgi0.17.1g/dat/cell/structures/s026_bMn.xml0000644000175000017500000001515011732732644020243 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s002_W_bcc.txt0000644000175000017500000000073511737126277020564 0ustar carloscarlosStructure 2 Prototype: W StrukturBericht / Pearson: A2 / cI2 Lattice parameter: W Fe Cr 3.1650 2.8664 2.8846 Mo Ta Ba 3.1469 3.3026 5.0190 Radius: W 1.3705 (half-distance) 1. Building with space group (s002.xml): Group: 229 Wyckoff positions: W 1a 2. Building with structural unit (s002.xml): Bravais lattice: cI W: 0.0, 0.0, 0.0 View: W: style solid, size 1.0, variancy 1.0, scale 0.4 WW: style solid, method length, color 0.5,0.5,0.5 scale 0.8 gamgi0.17.1g/dat/cell/structures/s019_In.txt0000644000175000017500000000044111737126277020117 0ustar carloscarlosStructure 19 Prototype: In StrukturBericht / Pearson: A6 / tI2 lattice parameters: In Pa 4.598 4.947 3.925 3.238 Radius: In: 1.6255 (half-distance) 1. Building with space group (s019.xml): 139 Wyckoff positions: In 1a View: In: style solid, size 1.0, variancy 1.0, scale 0.4 gamgi0.17.1g/dat/cell/structures/s062a_TiO2_rutile.xml0000644000175000017500000001327711736417271022041 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s059_CatiO3.xml0000644000175000017500000000456511734433304020620 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s030_Al3Zr4.xml0000644000175000017500000001016512254617512020536 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s009_AlCu2Mn_heusler.txt0000644000175000017500000000146611737126277022510 0ustar carloscarlosStructure 9 Prototype: AlCu2Mn (Heusler) StrukturBericht / Pearson: L2_1 / cF16 lattice parameters: AlCu2Mn Cu2MnSb Cu2FeSn 5.949 6.097 5.930 AlCu2Hf AlNi2Ti GaMnNi2 6.172 5.850 - Co2MnSn AlCo2Nb AlCo2Ta 5.989 5.946 5.927 Radius: Cu 1.2780 (half-distance) Al 1.4315 (half-distance) Mn 1.3655 (half-distance) 1. Building with space group (s009a.xml): 225 Wyckoff positions: Cu 2c Al 1a Mn 1b 2. Building with bcc-type cell (s9b.xml): Change: 0.25 0.25 0.25 View: Cu: style solid, size 1.0, variancy 1.0, scale 0.2 Al: style solid, size 1.0, variancy 1.0, scale 0.2 Mn: style solid, size 1.0, variancy 1.0, scale 0.2 CuMn: style solid, method length, color 0.5,0.5,0.5 scale 0.4 Information: http://en.wikipedia.org/wiki/Heusler_alloy AlCu2Mn: TCurie = 357oC GaMnNi2: ferromagnetic shape memory alloys gamgi0.17.1g/dat/cell/structures/s060c_MgAl2O4_spinel.xml0000644000175000017500000006522312267055473022357 0ustar carloscarlos 2.0200 2.0200 4.0400 4.0400 -0.0000 4.0400 4.0400 2.0200 2.0200 4.0400 4.0400 4.0400 4.0400 2.0200 6.0600 6.0600 2.0200 4.0400 8 3 2 0 3 3 1 2 5 3 1 0 2 3 0 1 4 3 3 0 4 3 2 3 5 3 3 4 5 3 4 1 5 6.0600 2.0200 8.0800 6.0600 4.0400 6.0600 6.0600 -0.0000 6.0600 4.0400 2.0200 6.0600 6.0600 2.0200 4.0400 8.0800 2.0200 6.0600 8 3 1 0 5 3 2 0 3 3 0 1 3 3 2 3 4 3 3 1 4 3 0 2 5 3 2 4 5 3 4 1 5 2.0200 0.0000 2.0200 4.0400 2.0200 2.0200 -0.0000 2.0200 2.0200 2.0200 2.0200 4.0400 2.0200 2.0200 0.0000 2.0200 4.0400 2.0200 8 3 2 0 3 3 0 1 3 3 2 3 5 3 1 0 4 3 0 2 4 3 3 1 5 3 1 4 5 3 4 2 5 4.0400 2.0200 2.0200 4.0400 4.0400 0.0000 4.0400 4.0400 4.0400 6.0600 4.0400 2.0200 4.0400 6.0600 2.0200 2.0200 4.0400 2.0200 8 3 1 0 5 3 2 0 3 3 0 1 3 3 2 3 4 3 3 1 4 3 0 2 5 3 2 4 5 3 4 1 5 2.0200 4.0400 6.0600 2.0200 2.0200 4.0400 -0.0000 4.0400 4.0400 2.0200 6.0600 4.0400 2.0200 4.0400 2.0200 4.0400 4.0400 4.0400 8 3 0 1 5 3 2 0 3 3 1 0 2 3 1 2 4 3 2 3 4 3 3 0 5 3 1 4 5 3 4 3 5 6.0600 6.0600 0.0000 6.0600 6.0600 4.0400 6.0600 8.0800 2.0200 4.0400 6.0600 2.0200 6.0600 4.0400 2.0200 8.0800 6.0600 2.0200 8 3 1 2 3 3 2 0 3 3 0 2 5 3 1 3 4 3 3 0 4 3 2 1 5 3 1 4 5 3 4 0 5 2.0200 6.0600 4.0400 2.0200 4.0400 6.0600 2.0200 8.0800 6.0600 -0.0000 6.0600 6.0600 4.0400 6.0600 6.0600 2.0200 6.0600 8.0800 8 3 2 0 3 3 0 1 3 3 2 3 5 3 1 0 4 3 0 2 4 3 3 1 5 3 1 4 5 3 4 2 5 4.0399 4.0393 8.0804 4.0398 2.0194 6.0604 2.0196 2.0195 8.0802 2.0201 4.0396 6.0602 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 -0.0003 -0.0000 4.0400 2.0199 2.0197 4.0401 -0.0002 2.0199 6.0600 2.0194 -0.0004 6.0602 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 6.0600 4.0390 6.0606 4.0404 6.0593 6.0604 6.0605 6.0590 4.0405 4.0403 4.0393 4.0404 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 6.0607 8.0790 6.0605 6.0602 6.0590 8.0806 8.0803 6.0587 6.0607 8.0805 8.0787 8.0808 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 0.0007 6.0600 2.0201 0.0006 4.0400 0.0001 2.0208 6.0597 0.0002 2.0204 4.0396 2.0202 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 4.0407 6.0594 2.0204 2.0206 6.0596 4.0402 4.0409 8.0794 4.0404 2.0210 8.0797 2.0203 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 8.0802 4.0387 4.0407 6.0604 4.0390 2.0205 8.0801 2.0188 2.0206 6.0600 2.0191 4.0405 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 4.0401 2.0194 2.0203 4.0400 -0.0006 0.0003 6.0602 2.0191 0.0005 6.0598 -0.0009 2.0204 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 gamgi0.17.1g/dat/cell/structures/s013_CuFeS2_chalcopyrite.xml0000644000175000017500000001273611600721740023314 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s027_aU.txt0000644000175000017500000000044611737126277020122 0ustar carloscarlosStructure 27 Prototype: alpha-U StrukturBericht / Pearson: A20 / oC4 lattice parameters: a-U 2.854 2.854 4.955 Radius: U: 1.3850 (half-distance) 1. Building with space group (s027.xml): Group: 63 Wyckoff positions: U 2c, y = 0.1025 View: U: style solid, size 0.8, variancy 0.0, scale 1.0 gamgi0.17.1g/dat/cell/structures/s104_CO2_cubic.xml0000644000175000017500000002210111602117063021232 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s022_C_graphite.xml0000644000175000017500000004275411600721740021567 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s105_C6H6.xml0000644000175000017500000012140311602117113020152 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s009a_AlCu2Mn_heusler.xml0000644000175000017500000002144611600721740022613 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s008b_BiF3.xml0000644000175000017500000002267311600721740020411 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s018_bSn.txt0000644000175000017500000000060511737126277020274 0ustar carloscarlosStructure 18 Prototype: beta-Sn StrukturBericht / Pearson: A5 / tI4 lattice parameters: b-Sn Ge 5.8197 3.1750 4.9585 2.7463 Radius: Sn: 1.8695 (half-distance) 1. Building with space group (s018.xml): 141 Wyckoff positions: Sn 2a Change: 0.0, 0.25, -0.125 View: Sn: style solid, size 1.0, variancy 1.0, scale 0.2 SnSn: style solid, method length, color 0.5,0.5,0.5 scale 0.6 gamgi0.17.1g/dat/cell/structures/s007a_NaCl.xml0000644000175000017500000001030411600721740020465 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s098_SiO2_bquartz.xml0000644000175000017500000002033112254620172022051 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s034_MgNi2_laves.txt0000644000175000017500000000107111737126277021654 0ustar carloscarlosStructure 34 Prototype: MgNi2 StrukturBericht / Pearson: C36 / hP24 Lattice parameter: MgNi2 EuNi2 4.805 15.770 5.39 17.49 HfZn2 Cr2Ti 5.19 16.89 4.932 16.01 HfMn2 Cr2Zr 5.016 16.37 5.100 16.61 Radius: Mg 1.5985 (half-distance) Ni 1.2460 (half-distance) 1. Building with space group (s034.xml): Group: 194 Wyckoff positions: Mg 4e, z = 0.094 Mg 4f, z = 0.844 Ni 4f, z = 0.125 Ni 6g Ni 6h, x = 0.16667 View: Mg,Ni: style solid, size 1.0, variancy 1.0, scale 0.25 NiNi style solid, method length, color 0.5,0.5,0.5, size 0.5, scale 0.5 gamgi0.17.1g/dat/cell/structures/s020_As.xml0000644000175000017500000002357611600721740020064 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s011_ZnS_blenda.xml0000644000175000017500000001177411600721740021535 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s060b_MgAl2O4_spinel.xml0000644000175000017500000005723711734433314022354 0ustar carloscarlos 8.0800 8.0800 0.0000 0.0000 8.0800 0.0000 0.0000 0.0000 0.0000 8.0800 0.0000 0.0000 1 4 0 1 2 3 0.0000 0.0000 1.0100 8.0800 0.0000 1.0100 8.0800 8.0800 1.0100 0.0000 8.0800 1.0100 1 4 0 1 2 3 0.0000 0.0000 2.0200 8.0800 0.0000 2.0200 8.0800 8.0800 2.0200 0.0000 8.0800 2.0200 1 4 0 1 2 3 0.0000 0.0000 3.0300 8.0800 0.0000 3.0300 8.0800 8.0800 3.0300 0.0000 8.0800 3.0300 1 4 0 1 2 3 0.0000 0.0000 4.0400 8.0800 0.0000 4.0400 8.0800 8.0800 4.0400 0.0000 8.0800 4.0400 1 4 0 1 2 3 0.0000 0.0000 5.0500 8.0800 0.0000 5.0500 8.0800 8.0800 5.0500 0.0000 8.0800 5.0500 1 4 0 1 2 3 0.0000 0.0000 6.0600 8.0800 0.0000 6.0600 8.0800 8.0800 6.0600 0.0000 8.0800 6.0600 1 4 0 1 2 3 0.0000 0.0000 7.0700 8.0800 0.0000 7.0700 8.0800 8.0800 7.0700 0.0000 8.0800 7.0700 1 4 0 1 2 3 8.0800 8.0800 8.0800 0.0000 8.0800 8.0800 0.0000 0.0000 8.0800 8.0800 0.0000 8.0800 1 4 0 1 2 3 gamgi0.17.1g/dat/cell/structures/s106_C8O46_ice_clathrate.txt0000644000175000017500000000061711737126277023165 0ustar carloscarlosStructure 106 Prototype: C8O46 StrukturBericht / Pearson: - / cP48 lattice parameters: C8O46 10.734 Radius: C: 0.7130 (half-distance) O: 0.6037 (half-distance) 1. Building with space group (s106.xml): Group: 223 Wyckoff positions: C 2a C 6d O 6c O 16i, x = 0.18459 O 24K, y = 0.30939, z = 0.11770 View: C: style solid O: style solid OO: style solid, method length, color 1.0,1.0,1.0 scale 0.6 gamgi0.17.1g/dat/cell/structures/s106_C8O46_ice_clathrate.xml0000644000175000017500000004665511723173230023144 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s008_BiF3.txt0000644000175000017500000000121711737126277020274 0ustar carloscarlosStructure 8 Prototype: BiF3 StrukturBericht / Pearson: D0_3 /cF16 lattice parameter: BiF3 BiLi3 Cd3Pr 5.865 6.722 7.200 CeMg3 Cu3Sb Fe3Si 7.438 6.010 5.662 Mg3Pr AlFe3 Mn3Si 7.430 5.780 5.722 Radius: Bi 1.1700 (Shannon radius for charge +3 coordination 8) F 1.3100 (Shannon radius for charge -1 coordination 4) 1. Building with space group (s008a.xml): Group: 225 Wyckoff positions: Bi 1a F 1b F 2c 2. Building with bcc-type cell (s008b.xml): Change: 0.25 0.25 0.25 View: Bi: style solid, size 1.0, variancy 1.0, scale 0.2 F: style solid, size 1.0, variancy 1.0, scale 0.2 BiF: style solid, method length, color 0.5,0.5,0.5 scale 0.6 gamgi0.17.1g/dat/cell/structures/s027_aU.xml0000644000175000017500000000220711732737563020101 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s005_AuCu3.xml0000644000175000017500000000453611600721740020437 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s103_Ice_Ic.txt0000644000175000017500000000067511737126277020667 0ustar carloscarlosStructure 103 Prototype: Ice-Ic StrukturBericht / Pearson: - / cF24 lattice parameters: Ice-Ic 6.35 Radius: O: 0.6037 (half-distance) H: 0.3706 (half-distance) 1. Building with space group (s103.xml): Group: 227 Wyckoff positions: O 2a H 4c Change: -0.125, -0.125, -0.125 View: O: style solid, size 1.0, variancy 1.0, scale 0.7 H: style solid, size 1.0, variancy 1.0, scale 0.7 OH: style solid, method length, color 0.5,0.5,0.5 scale 0.5 gamgi0.17.1g/dat/cell/structures/s056_Fe2B.xml0000644000175000017500000001641111737367700020253 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s001_Cu_cfc.xml0000644000175000017500000001525411600721740020674 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s029_Cr3Si.txt0000644000175000017500000000067311737126277020504 0ustar carloscarlosStructure 29 Prototype: Cr3Si StrukturBericht / Pearson: A15 / cP8 Lattice parameters: Cr3Si AuZr3 GeMo3 IrTi3 4.555 5.486 4.932 5.0087 CoV3 Mo3Os BiNb3 Re7V3 4.676 4.9689 5.320 4.8783 Ti4Tl Nb0.38Si0.24V0.38 5.256 4.915 Radius: Cr 1.2490 (half-distance) Si 1.1760 (half-distance) 1. Building with space group (s029.xml): Group: 223 Wyckoff positions: Cr 6c Si 2a View: Si,Cr: style solid, size 0.8, variancy 0.0, scale 1.0 gamgi0.17.1g/dat/cell/structures/s012_CaF2_fluorite.xml0000644000175000017500000001707711600721740022145 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s016_Ni3Sn.txt0000644000175000017500000000114611737126277020503 0ustar carloscarlosStructure 16 Prototype: Ni3Sn StrukturBericht / Pearson: D0_19 / hP8 lattice parameters: Ni3Sn Fe3Ga 5.275 4.234 5.20 4.26 InTi3 Al3Sm 5.89 4.76 6.380 4.597 Radius: Ni: 1.2460 (half-distance) Sn: 1.4050 (half-distance) 1. Building with space group (s016a.xml): 194 Wyckoff positions: Ni 6h, x = 0.83333 (5/6) Sn 2c Change: 0.66666 (1/3) 0.33333 (2/3) 0.25 (1/4) 2. Building with primitive cell (s16b.xml): Cell: primitive View: Ni: style solid, size 1.0, variancy 1.0, scale 0.3 Sn: style solid, size 1.0, variancy 1.0, scale 0.3 NiSn: style solid, method length, color 0.5,0.5,0.5 scale 0.5 gamgi0.17.1g/dat/cell/structures/s007_NaCl.txt0000644000175000017500000000137411737126277020371 0ustar carloscarlosStructure 7 Prototype: NaCl StrukturBericht / Pearson: B1 / cF8 lattice parameter: NaCl MgO FeO 5.640 4.213 4.307 MgS BaSe CaTe 5.200 6.600 6.356 LiF BrNa TiN 4.027 5.977 4.240 Radius: Na 1.0200 (Shannon radius for charge +1 coordination 6) Cl 1.8100 (Shannon radius for charge -1 coordination 6) 1. Building with space group (s007a.xml): Group: 225 Wyckoff positions: Cl 1a Na 1b 2. Building with non conventional cell (s007b.xml): Change 0.25, 0.25, 0.25 3. Building with structural unit (s007a.xml): Bravais lattice: cF Cl: 0.0, 0.0, 0.0 Na: 0.5, 0.0, 0.0 3. Building with Wigner Seitz (s007c.xml): Cell type: Wigner-Seitz View: Cl: style solid, size 1.0, variancy 1.0, scale 0.4 Na: style solid, size 1.0, variancy 1.0, scale 0.4 gamgi0.17.1g/dat/cell/structures/s014_ZnS_wurtzite.xml0000644000175000017500000001744611600721740022212 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s013_CuFeS2_chalcopyrite.txt0000644000175000017500000000157311737126277023347 0ustar carloscarlosStructure 13 Prototype: CuFeS2 (chalcopyrite) StrukturBericht / Pearson: E1_1 / tI16 lattice parameters: CuFeS2 AgAlTe2 5.24 10.3 6.296 11.83 AlCuSe2 CdGeP2 5.605 10.90 5.738 10.765 Radius: Cu 1.2780 (half-distance) Fe 1.2410 (half-distance) S 1.0250 (half-distance) 1. Building with space group (s013.xml): Group: 122 Wyckoff positions: Cu 2a Fe 2b S 4d, x = 0.25 View: Cu: style solid, size 1.0, variancy 1.0, scale 1.0 Fe: style solid, size 1.0, variancy 1.0, scale 1.0 S: style solid, size 1.0, variancy 1.0, scale 1.0 SCu: style solid, method length, color 0.5,0.5,0.5 scale 0.4 SFe: style solid, method length, color 0.5,0.5,0.5 scale 0.4 Information: http://en.wikipedia.org/wiki/Chalcopyrite Chalcopyrite is closely related to zinc blende ZnS. The unit cell is twice as large, reflecting an alternation of Cu+ and Fe3+ ions replacing Zn2+ ions in adjacent cells. gamgi0.17.1g/dat/cell/structures/s017_aLa.xml0000644000175000017500000002171511600721740020215 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s033_MgZn2_laves.xml0000644000175000017500000001306012254617532021650 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s024b_Ga.xml0000644000175000017500000002453011601161236020204 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s017_aLa.txt0000644000175000017500000000063411737126277020250 0ustar carloscarlosStructure 17 Prototype: alpha-La StrukturBericht / Pearson: A3' / hP4 lattice parameters: a-La Nd 3.77 12.1596 3.6562 11.8056 Gd Sm 3.402 11.047 3.565 11.1456 Radius: La: 1.8695 (half-distance) 1. Building with space group (s017.xml): 194 Wyckoff positions: La 2a La 2c View: La: style solid, size 1.0, variancy 1.0, scale 0.3 CuCu: style solid, method length, color 0.5,0.5,0.5 scale 1.0 gamgi0.17.1g/dat/cell/structures/s056_Fe2B.txt0000644000175000017500000000054711737367700020275 0ustar carloscarlosStructure 56 Prototype: Fe2B StrukturBericht / Pearson: - / tI12 Lattice parameter: Fe2B 5.109 4.249 Radius: Fe 1.2410 B 0.7945 1. Building with space group (s056.xml): Group: 140 Wyckoff positions: Fe 4h, x = 0.1661 B 2a View: Fe,B: style solid, size 1.0, variancy 1.0, scale 0.25 FeB: style solid, method length, size 0.5, color 0.5,0.5,0.5, scale 0.5 gamgi0.17.1g/dat/cell/structures/s022_C_graphite.txt0000644000175000017500000000054211737126277021612 0ustar carloscarlosStructure 22 Prototype: C (Graphite) StrukturBericht / Pearson: A9 / hP4 lattice parameter: C 2.464 6.711 Radius: C 0.7130 (half-distance) 1. Building with space group (s022.xml): Group: 194 Wyckoff positions: C 2b C 2c Cells: 2x2x1 View: C: style solid, size 1.0, variancy 1.0, scale 0.3 CC style solid, method length, color 0.5,0.5,0.5 scale 0.7 gamgi0.17.1g/dat/cell/structures/s003c_inversion.xml0000644000175000017500000003707711731671103021704 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s055_Fe3C.txt0000644000175000017500000000072711737126277020300 0ustar carloscarlosStructure 55 Prototype: Fe3C StrukturBericht / Pearson: - / oP16 Lattice parameter: Fe3C 5.0787 6.7297 4.5144 Radius: Fe 1.2410 (half-distance) C 0.7130 (half-distance) 1. Building with space group (s055.xml): Group: 62 Wyckoff positions: Fe 4c, x = 0.044, z = 0.837 Fe 8d, x = 0.181, y = 0.063, z = 0.337 C 4c, x = 0.881, z = 0.431. View: Fe,C: style solid, size 0.8, variancy 0.0, scale 1.0 FeC: style solid, method length, size 0.5, color 0.5,0.5,0.5, scale 1.0 gamgi0.17.1g/dat/cell/structures/s060a_MgAl2O4_spinel.xml0000644000175000017500000003565211734433314022350 0ustar carloscarlos 0.0000 0.0000 4.0400 4.0400 0.0000 0.0000 0.0000 4.0400 0.0000 1 3 0 1 2 0.0000 -0.0000 8.0800 8.0800 0.0000 0.0000 0.0000 8.0800 -0.0000 1 3 0 1 2 0.0000 4.0400 8.0800 4.0400 0.0000 8.0800 8.0800 0.0000 4.0400 8.0800 4.0400 0.0000 4.0400 8.0800 0.0000 0.0000 8.0800 4.0400 1 6 0 1 2 3 4 5 0.0000 8.0800 8.0800 8.0800 -0.0000 8.0800 8.0800 8.0800 -0.0000 1 3 0 1 2 4.0400 8.0800 8.0800 8.0800 4.0400 8.0800 8.0800 8.0800 4.0400 1 3 0 1 2 gamgi0.17.1g/dat/cell/structures/s030_Al3Zr4.txt0000644000175000017500000000103711737126277020563 0ustar carloscarlosStructure 30 Prototype: Al3Zr4 StrukturBericht / Pearson: - / hP7 Lattice parameters: Al3Zr4 Al0.40Nb0.10Zr0.50 5.433 5.390 5.368 5.333 Al3Hf4 Al0.33Cu0.10Zr0.57 5.331 5.414 5.375 5.390 Radius: Al 1.4315 (half-distance) Zr 1.5895 (half-distance) 1. Building with space group (s030.xml): Group: 174 Wyckoff positions: Al 3j, x = 0.33333 (1/3), y = 0.16667 (2/6) Zr 1b, 1f, 2h, z = 0.25 (1/4) View: Al,Zr: style solid, size 0.8, variancy 0.0, scale 1.0 AlZr: style solid, method length, color 0.5,0.5,0.5, size 0.3, scale 0.7 gamgi0.17.1g/dat/cell/structures/s032_Cu2Mg_laves.txt0000644000175000017500000000101011737126277021644 0ustar carloscarlosStructure 32 Prototype: Cu2Mg StrukturBericht / Pearson: C15 / cF24 Lattice parameter: Cu2Mg Be2Ta CaNi2 7.048 6.51 7.239 DyMn2 EuPt2 Fe2Tb 7.56 7.714 7.40 Li2Pt Mg2Sn Mg2Si 7.60 6.762 6.352 Radius: Cu 1.2780 (half-distance) Mg 1.5985 (half-distance) 1. Building with space group (s032.xml): Group: 227 Wyckoff positions: Cu 4d Mg 2a Change: -0.125, -0.125, -0.125 View: Cu,Mg: style solid, size 1.0, variancy 1.0, scale 0.25 CuCu: style solid, method length, color 0.5,0.5,0.5, size 0.5, scale 0.5 gamgi0.17.1g/dat/cell/structures/s016b_Ni3Sn.xml0000644000175000017500000000313712254617472020625 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s028_Al3Ti.txt0000644000175000017500000000066011737126277020470 0ustar carloscarlosStructure 28 Prototype: Al3Ti StrukturBericht / Pearson: D0_22 / tI8 Lattice parameters: Al3Ti Al3Ta 3.836 8.579 3.837 8.550 Al3Hf Ga3Ta 3.928 8.888 3.836 8.579 Pt3V Pd3V 3.839 7.796 3.850 7.750 Radius: Al 1.4315 (half-distance) Ti 1.4480 (half-distance) 1. Building with space group (s028.xml): Group: 139 Wyckoff positions: Ti 1a Al 1b, 2d View: Al,Ti: style solid, size 0.8, variancy 0.0, scale 1.0 gamgi0.17.1g/dat/cell/structures/s016a_Ni3Sn.xml0000644000175000017500000001447711600721740020621 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s003b_Mg_hcp.xml0000644000175000017500000002023311600721740021044 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s062_TiO2_rutile.txt0000644000175000017500000000105211737126277021707 0ustar carloscarlosStructure 62 Prototype: TiO2 (Rutile) StrukturBericht / Pearson: C4 / tP6 Lattice parameter: TiO2 4.537 2.958 Radius: Ti4+: 0.6050 (Shannon radius for charge +4 coordination 6) O2-: 1.36 (Shannon radius for charge -2 coordination 3) 1. Building with space group (s062a.xml): Group: 136 Wyckoff positions: Ti 2a O 4f, x = 0.3053 Cells: 1 x 1 x 2 2. Building with polytopes (s062b.xml): Cell Link: Cutoff Nodes Group Create: Local, O, 6 View: Ti,O: style solid, size 1.0, variancy 1.0, scale 0.3 TiO: style solid, method length, size 0.1, scale 1.0 gamgi0.17.1g/dat/cell/structures/s020_As.txt0000644000175000017500000000063011737126277020104 0ustar carloscarlosStructure 20 Prototype: As StrukturBericht / Pearson: A7 / hR2 lattice parameters: As Bi 3.760 10.547 4.546 11.862 Radius: As: 1.2450 (half-distance) 1. Building with space group (s020.xml): 166 Wyckoff positions: As 2c, z = 0.2271 Change 0.0, 0.0, -0.2271 Cells: 2x2x1 View: As: style solid, size 1.0, variancy 1.0, scale 0.4 AsAs: style solid, method length, color 0.5,0.5,0.5 scale 0.6 gamgi0.17.1g/dat/cell/structures/s007c_NaCl.xml0000644000175000017500000000262212254617421020501 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s059_CatiO3.txt0000644000175000017500000000061211737367566020647 0ustar carloscarlosStructure 59 Prototype: CatiO3 StrukturBericht / Pearson: E2_1 / cP5 Lattice parameter: CaTiO3 MgSiO3 3.795 3.48 Radius: Ca2+ 1.43 (charge +2, coordination 12) Ti4+ 0.6050 (charge +4, coordination 6) O2- 1.4 (charge -2, coordination 6) 1. Building with space group (s059.xml): Group: 221 Wyckoff positions: Ca 1a Ti 1b O 3c View: Ca,Ti,O: style solid, size 0.5, variancy 0.0, scale 1.0 gamgi0.17.1g/dat/cell/structures/s021_gSe.txt0000644000175000017500000000076611737126277020272 0ustar carloscarlosStructure 21 Prototype: gamma-Se StrukturBericht / Pearson: A8 / hP3 lattice parameters: Se Te 4.366 4.959 4.527 5.921 Radius: Se: 1.1605 (half-distance) 1. Building with space group (s021a.xml): 152 Wyckoff positions: Se 1a, x = 0.7364 Cells 2 x 2 x 1 1. Building with different volume (s021b.xml): Cells 1 x 1 x 3 View: Se: style solid, size 1.0, variancy 1.0, scale 0.3 SeSe: style solid, method length, color 0.5,0.5,0.5 scale 0.7 Features: Helix 3_1 of Se atoms along the c axis. gamgi0.17.1g/dat/cell/structures/s061_CdI2.txt0000644000175000017500000000057211737367664020303 0ustar carloscarlosStructure 61 Prototype: CdI2 StrukturBericht / Pearson: C6 / hP5 Lattice parameters: CdI2 4.224 6.859 Radius: I: 1.3330 (half-distance) Cd: 1.4895 (half-distance) 1. Building with space group (s061.xml): Group: 164 Wyckoff positions: Cd 1a I 2d, z = 0.2492 Cells: 3 x 3 x 1 Cutoff: Nodes Polytopes: Neighbours 6 View: I,Cd: style solid, size 1.0, variancy 1.0, scale 0.25 gamgi0.17.1g/dat/cell/structures/s060_MgAl2O4_spinel.txt0000644000175000017500000000141211737126277022223 0ustar carloscarlosStructure 60 Prototype: MgAl2O4 StrukturBericht / Pearson: H1_1 / cF56 Lattice parameter: MgAl2O4 ZnAl2O4 8.08 8.12 Fe3O4 (Zn,Mn,Fe)(Fe,Mn)2O4 8.4 8.42 FeCr2O4 8.36 Radius: Mg 1.5895 (half-distance) Al 1.4315 (half-distance) O 0.6037 (half-distance) 1. Building with space group (s060a.xml): Group: 227 Wyckoff positions: Mg 2a Al 4d O 8e, x = 0.25 Planes: (222), Start to End 2. Building with conventional cell (s060b.xml): Change -0.25, -0.25, -0.25 Planes: (008), Start to End 3. Building with polytopes (s060c.xml): Change -0.25, -0.25, -0.25 Mg tetrahedra, 8 (all) Al octahedra, 7 (inside) View: Mg,Al,O: style solid, size 0.5, variancy 0.0, scale 1.0 Mg tetrahedra: color 0.54, 1.0, 0.0 (Mg color) Al octahedra: color 0.75, 0.65, 0.65 (Al color) gamgi0.17.1g/dat/cell/structures/s006_C_diamond.xml0000644000175000017500000001134511600721740021371 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s026_bMn.txt0000644000175000017500000000055011737126277020264 0ustar carloscarlosStructure 26 Prototype: beta-Mn StrukturBericht / Pearson: A13 / cP20 lattice parameters: Mn 6.315 Radius: Mn: 1.3655 (half-distance) 1. Building with space group (s026.xml): 213 Wyckoff positions: 8c, x = 0.0636 12d, y = 0.2022 Cells 1 x 1 x 1 View: Mn: style solid, size 0.8, variancy 0.0, scale 1.0 MnMn: method length default, style solid, scale 1.0 gamgi0.17.1g/dat/cell/structures/s018_bSn.xml0000644000175000017500000000724711600721740020247 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s019_In.xml0000644000175000017500000000321011600721740020056 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s007b_NaCl.xml0000644000175000017500000000317011600721740020471 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s021b_gSe.xml0000644000175000017500000001751711600721740020400 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s010_CsCl.xml0000644000175000017500000000341711600721740020334 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s015a_NiAs.xml0000644000175000017500000000743012254617452020521 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s012_CaF2_fluorite.txt0000644000175000017500000000110211737126277022161 0ustar carloscarlosStructure 12 Prototype: CaF2 (fluorite) StrukturBericht / Pearson: C1 / cF12 lattice parameters: CaF2 F2Sr BaCl2 5.463 5.800 7.311 O2Pb O2U Li2O 5.349 5.372 4.611 Na2Se K2S ORb2 6.823 7.406 6.740 Radius: Ca: 1.12 (Shannon radius for charge +2 coordination 8) F: 1.31 (Shannon radius for charge -1 coordination 4) 1. Building with space group (s012.xml): Group: 225 Wyckoff positions: Ca 1a F 2c View: Ca: style solid, size 1.0, variancy 1.0, scale 0.3 F: style solid, size 1.0, variancy 1.0, scale 0.3 CaF: style solid, method length, color 0.5,0.5,0.5 scale 0.5 gamgi0.17.1g/dat/cell/structures/s024_Ga.txt0000644000175000017500000000113711737126277020077 0ustar carloscarlosStructure 24 Prototype: alpha-Ga StrukturBericht / Pearson: A10 / oC8 lattice parameters: Ga 4.517 7.645 4.511 Radius: Ga: 1.2210 (half-distance) 1. Building with space group (s024a.xml): 64 Wyckoff positions: 4f, y = 0.1525, z = 0.079 Bond length: 1) 2.3 to 2.5 2) 2.6 to 2.8 2. Building with different bonds and cells (s024b.xml): Bond length: 1) 2.3 to 2.5 2) 2.6 to 2.71 Cells 2 x 1 x 2 View: Ga: style solid, size 1.0, variancy 1.0, scale 0.3 GaGa 2.4 Angstrom: style solid, method length, color 0.5,0.5,0.5 scale 1.0 GaGa 2.7 Angstrom: style solid, method length, color 0.8,0.8,0.8 scale 0.6 gamgi0.17.1g/dat/cell/structures/s015_NiAs.txt0000644000175000017500000000143111737126277020377 0ustar carloscarlosStructure 15 Prototype: NiAs StrukturBericht / Pearson: B8_1 / hP4 lattice parameters: NiAs AuSe 3.6 5.01 4.12 5.39 NbSb CrS 4.270 5.447 3.419 5.550 Radius: Ni: 1.2460 (half-distance) As: 1.2450 (half-distance) 1. Building with space group (s015a.xml): 194 Wyckoff positions: Ni 2a As 2c Cell: primitive 2. Building with conventional cell (s015b.xml): Change: 0.66666 (1/3) 0.33333 (2/3) 0.25 (1/4) View: Ni: style solid, size 1.0, variancy 1.0, scale 0.3 As: style solid, size 1.0, variancy 1.0, scale 0.3 NiAs: style solid, method length, color 0.5,0.5,0.5 scale 0.7 Information: http://www.science.uwaterloo.ca/~cchieh/cact/applychem/inorgsolid.html The NiAs structure can be viewed as the hcp packing of As anions with the Ni ions occupying the octahedral sites. gamgi0.17.1g/dat/cell/structures/s029_Cr3Si.xml0000644000175000017500000001353111733174367020461 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s058_Al2O3_corundum.txt0000644000175000017500000000071611737126277022315 0ustar carloscarlosStructure 58 Prototype: Al2O3 StrukturBericht / Pearson: D5_1 / hR30 Lattice parameter: Al2O3 4.7617 12.9947 Radius: Al3+ 0.5350, coordination 6 O2- 1.3800 coordination 4 1. Building with space group (s058.xml): Group: 167 Wyckoff positions: Al 4c, z = 0.3521 O 6e, x = 0.3065 View: Al: style solid, size 1.0, variancy 0.2, scale 0.5 O: style solid, size 1.0, variancy 0.2, scale 0.5 AlO: style solid, method length, size 0.5, color 0.0,0.8,0.0 scale 0.5 gamgi0.17.1g/dat/cell/structures/s003a_Mg_hcp.xml0000644000175000017500000000536311600721740021052 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/README0000644000175000017500000000124711737367746017131 0ustar carloscarlos************** * Structures * ************** The files in this directory describe important cristalline structures. They were prepared for Gamgi, by Carlos Pereira: http://www.gamgi.org/ **************** * Bibliography * **************** 1) Marc de Graef and Michael E. McHenry, Structure of Materials, an Introduction to Crystallography, Diffraction, and Symmetry, Cambridge University Press, 2007 http://som.web.cmu.edu/frames.html 2) Yet-Ming Chiang, Dunbar Birnie III, W. David Kingery, Physical Ceramics, Principles for Ceramic Science and Engineering, John Wiley & Sons, The MIT series in Materials Science & Engineering, 1997 3) Mineral Web, http://www.minweb.co.uk/ gamgi0.17.1g/dat/cell/structures/s065_ZnWO4.xml0000644000175000017500000000727111736162100020444 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s104_CO2_cubic.txt0000644000175000017500000000070311737126277021275 0ustar carloscarlosStructure 104 Prototype: CO2-cubic StrukturBericht / Pearson: - / cP12 lattice parameters: CO2-cubic 5.056 Radius: O: 0.6037 (half-distance) C: 0.7130 (half-distance) 1. Building with space group (s104.xml): Group: 205 Wyckoff positions: O 8c, x = 0.1324 C 4a Cells: 2 x 2 x 2 View: O: style solid, size 1.0, variancy 1.0, scale 0.3 C: style solid, size 1.0, variancy 1.0, scale 0.3 OC: style solid, method length, color 0.5,0.5,0.5 scale 0.6 gamgi0.17.1g/dat/cell/structures/s047_CaCu5.txt0000644000175000017500000000101511737126277020450 0ustar carloscarlosStructure 47 Prototype: CaCu5 StrukturBericht / Pearson: D2_d / hP6 Lattice parameter: CaCu5 Co5Sm 5.082 4.078 5.0002 3.964 Au5Ba NdPt 5 5.55690 4.542 5.345 4.391 AlCu4Er GdRh3Si2 5.029 4.139 5.505 3.549 Radius: Ca 1.9735 (half-distance) Cu 1.2780 (half-distance) 1. Building with space group (s047.xml): Group: 191 Wyckoff positions: Ca 1a Cu 2c Cu 3g View: Ca,Cu: style solid, size 1.0, variancy 1.0, scale 0.25 CaCu: style solid, method length, size 0.5, color 0.5,0.5,0.5, scale 0.5 gamgi0.17.1g/dat/cell/structures/s008a_BiF3.xml0000644000175000017500000002316611600721740020406 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s103_Ice_Ic.xml0000644000175000017500000002137311601512560020626 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s055_Fe3C.xml0000644000175000017500000001360611734433262020251 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s006_C_diamond.txt0000644000175000017500000000077711737126277021436 0ustar carloscarlosStructure 6 Prototype: C (diamond) StrukturBericht / Pearson: A4 / cF8 lattice parameter: C Si 3.56 5.431 Ge a-Sn 5.657 6.491 Radius: C 0.7130 (half-distance) 1. Building with space group (s006.xml): Group: 227 Wyckoff positions: C 2a Change: -0.125 (1/8) -0.125 (1/8) -0.125 (1/8) 2. Building with structural unit (s006.xml): Bravais lattice: cF C: 0.0, 0.0, 0.0 C: 1/4, 1/4, 1/4 View: C: style solid, size 1.0, variancy 1.0, scale 0.4 CC style solid, method length, color 0.5,0.5,0.5 scale 0.6 gamgi0.17.1g/dat/cell/structures/s098_SiO2_bquartz.txt0000644000175000017500000000127311737367714022113 0ustar carloscarlosStructure 98 Prototype: SiO2 beta-Quartz StrukturBericht / Pearson: - / hP9 Lattice parameters: SiO2 4.9965 5.4546 Radius: I: 1.3330 (half-distance) Cd: 1.4895 (half-distance) 1. Building with space group (s098.xml): Group: 180 Wyckoff positions: Si 6g, x = 0.5 O 12k, x = 0.4147, y = 0.2078, z = 0.1666 Cells: 3 x 3 x 1 Cutoff: Nodes Polytopes: Neighbours 6 View: I,Cd: style solid, size 1.0, variancy 1.0, scale 0.25 ii) b-quartz Structure Hexagonal Space Group: P6222 (No. 180) a=4.9965 ~E c=5.4546 ~E a=b=90.0, g=120.0 Z=3 Atomic Positional Parameters Si 6g 0.5000 0.0000 0.0000 O 12k 0.4147 0.2078 0.1666 References Y le Page and G Donnay (1976) Acta Crystallographica, B, 32, 2456. gamgi0.17.1g/dat/cell/structures/s009b_AlCu2Mn_heusler.xml0000644000175000017500000002152311600721740022610 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s033_MgZn2_laves.txt0000644000175000017500000000102411737126277021672 0ustar carloscarlosStructure 33 Prototype: MgZn2 StrukturBericht / Pearson: C14 / hP12 Lattice parameter: MgZn2 Al2Hf 5.221 8.567 5.24 8.68 BeV2 Cu2Yb 4.385 7.130 5.260 8.567 Co2Nb Mn3SiW 2 4.835 7.860 4.76 7.75 Radius: Mg 1.5985 (half-distance) Zn 1.3325 (half-distance) 1. Building with space group (s033.xml): Group: 194 Wyckoff positions: Mg 4f, z = 0.0629 Zn 2a Zn 6h, x = 0.8305 View: Mg,Zn: style solid, size 1.0, variancy 1.0, scale 0.25 ZnZn: style solid, method length, color 0.5,0.5,0.5, size 0.5, scale 0.5 gamgi0.17.1g/dat/cell/structures/s010_CsCl.txt0000644000175000017500000000077411737126277020375 0ustar carloscarlosStructure 10 Prototype: CsCl StrukturBericht / Pearson: B2 / cP2 lattice parameter: CsCl BrCs AlCo Ag Mg 4.123 4.286 2.862 3.280 CoTi CuZn FeTi NiTi 2.986 2.945 2.976 2.972 Radius: Cs 1.0200 (Shannon radius for charge +1 coordination 8) Cl 1.8100 (Shannon radius for charge -1 coordination 8) 1. Building with space group (s010.xml): Group: 221 Wyckoff positions: Cl 1b Cs 1a View: Cl: style solid, size 1.0, variancy 1.0, scale 0.4 Cs: style solid, size 1.0, variancy 1.0, scale 0.4 gamgi0.17.1g/dat/cell/structures/s023_aHg.xml0000644000175000017500000000521111600736704020213 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s043_AuBe5.xml0000644000175000017500000002123511737126360020425 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s005_AuCu3.txt0000644000175000017500000000067311737126277020473 0ustar carloscarlosStructure 5 Prototype: AuCu3 StrukturBericht / Pearson: L1_2 / cP4 lattice parameter: AuCu3 AgPt3 AlNi3 TiZn3 3.749 3.900 3.572 3.932 AlPt3 Al3Er Al3U Pd3Y 3.876 4.215 4.287 4.074 Radius: Au 1.4420 (half-distance) Cu 1.2780 (half-distance) 1. Building with group space (s005.xml): Group: 221 Wyckoff positions: Au 1a Cu 3c Au: style solid, size 1.0, variancy 1.0, scale 0.3 Cu: style solid, size 1.0, variancy 1.0, scale 0.3 gamgi0.17.1g/dat/cell/structures/s014_ZnS_wurtzite.txt0000644000175000017500000000116711737126277022241 0ustar carloscarlosStructure 14 Prototype: ZnS (wurtzite) StrukturBericht / Pearson: B4 / hP4 lattice parameters: ZnS ZnO 3.81 6.23 3.35 5.22 BP GaN 3.562 5.90 3.190 5.189 Radius: Zn: 0.600 (Shannon radius for charge +2 coordination 4) S: 1.840 (Shannon radius for charge -2 coordination 6: 4 not available) 1. Building with space group (s014.xml): 186 Wyckoff positions: Zn 2b, z = 0.0 S 2b, z = 0.375 (3/8) Change 0.33333 (1/3), 0.66666 (2/3), 0.125 (1/8) View: Zn: style solid, size 1.0, variancy 1.0, scale 0.3 S: style solid, size 1.0, variancy 1.0, scale 0.3 ZnS: style solid, method length, color 0.5,0.5,0.5 scale 0.5 gamgi0.17.1g/dat/cell/structures/s025_aMn.txt0000644000175000017500000000064011737126277020262 0ustar carloscarlosStructure 25 Prototype: alpha-Mn StrukturBericht / Pearson: A12 / cI58 lattice parameters: Mn 8.894 Radius: Mn: 1.3655 (half-distance) 1. Building with space group (s025.xml): 217 Wyckoff positions: 1a 4c, x = 0.317 12g, x = 0.356, z = 0.42 12g, x = 0.089, z = 0.278 Cells 1 x 1 x 1 View: Mn: style solid, size 1.0, variancy 1.0, scale 0.3 MnMn: style solid, method length default, color 0.5,0.5,0.5 scale 0.3 gamgi0.17.1g/dat/cell/structures/s024a_Ga.xml0000644000175000017500000001073111601161236020201 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s003_Mg_hcp.txt0000644000175000017500000000142111737126277020736 0ustar carloscarlosStructure 3 Prototype: Mg StrukturBericht / Pearson: A3 / hP2 lattice parameter: Mg Be 3.209 5.210 2.286 3.583 Zn Cd 2.665 4.947 2.979 5.617 Ti Zr 2.950 4.679 3.232 5.148 Ru Os 2.706 4.282 2.735 4.319 Re Sm 2.761 4.458 Radius: Mg 1.5895 (half-distance) 1. Building with group space (s003a.xml): Group: 194 Wyckoff positions: Mg 2d 2. Building with conventional cell (s003b.xml): Change -0.66667 (2/3), -0.33333 (1/3), -0.25 (1/4) 3. Building with structural unit (s003b.xml): Bravais lattice: hP Mg: 0.0, 0.0, 0.0 Mg: 2/3, 1/3, 1/2 4. Node inversion simmetry (s003c.xml): Structure 1: yes Structure 2: no View: Mg: style solid, size 1.0, variancy 1.0, scale 0.4 MgMg style solid, method length, color 0.5,0.5,0.5 scale 0.6 gamgi0.17.1g/dat/cell/structures/s047_CaCu5.xml0000644000175000017500000001153712254620134020425 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s034_MgNi2_laves.xml0000644000175000017500000003003312254620055021621 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s004_AuCu.xml0000644000175000017500000000453011600721740020345 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s015b_NiAs.xml0000644000175000017500000000646311600721740020515 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s021a_gSe.xml0000644000175000017500000002731611600721740020375 0ustar carloscarlos gamgi0.17.1g/dat/cell/structures/s105_C6H6.txt0000644000175000017500000000126211737126277020215 0ustar carloscarlosStructure 105 Prototype: C6H6 StrukturBericht / Pearson: - / oP48 lattice parameters: C6H6 7.44 9.55 6.92 Radius: C: 0.7130 (half-distance) H: 0.3706 (half-distance) 1. Building with space group (s105.xml): Group: 61 Cells: 2 x 2 x 2 Wyckoff positions: C 8c, x = -0.0569, y = 0.1387, z = -0.0054 C 8c, x = -0.1335, y = 0.046, z = 0.1264 C 8c, x = -0.0774, y = -0.0925, z = 0.1295 H 8c, x = -0.0976, y = 0.2477, z = -0.0177 H 8c, x = -0.2409, y = 0.0794, z = 0.2218 H 8c, x = -0.1371, y = -0.1631, z = 0.2312 View: C: style solid, size 1.0, variancy 1.0, scale 0.3 H: style solid, size 1.0, variancy 1.0, scale 0.3 CH: style solid, method length, color 0.5,0.5,0.5 scale 0.4 gamgi0.17.1g/dat/cell/structures/s062b_TiO2_rutile.xml0000644000175000017500000003772412267056027022043 0ustar carloscarlos 3.6536 0.8834 4.4370 1.3851 1.3851 2.9580 0.8834 3.6536 4.4370 3.1519 3.1519 2.9580 1.3851 1.3851 5.9160 3.1519 3.1519 5.9160 8 3 1 2 3 3 0 1 3 3 0 3 5 3 1 0 4 3 2 1 4 3 3 2 5 3 2 4 5 3 4 0 5 1.3851 5.9221 5.9160 -0.8834 5.4204 7.3950 -1.3851 3.1519 5.9160 0.8834 3.6536 7.3950 -0.8834 5.4204 4.4370 0.8834 3.6536 4.4370 8 3 1 2 3 3 0 1 3 3 0 3 5 3 1 0 4 3 2 1 4 3 3 2 5 3 2 4 5 3 4 0 5 1.3851 1.3851 5.9160 -1.3851 -1.3851 5.9160 0.8834 -0.8834 4.4370 0.8834 -0.8834 7.3950 -0.8834 0.8834 4.4370 -0.8834 0.8834 7.3950 8 3 1 2 3 3 2 0 3 3 1 3 5 3 0 2 4 3 2 1 4 3 3 0 5 3 0 4 5 3 4 1 5 1.3851 1.3851 2.9580 -0.8834 0.8834 4.4370 -1.3851 -1.3851 2.9580 0.8834 -0.8834 4.4370 0.8834 -0.8834 1.4790 -0.8834 0.8834 1.4790 8 3 1 2 3 3 1 0 5 3 0 1 3 3 0 3 4 3 3 2 4 3 2 1 5 3 0 4 5 3 4 2 5 5.9221 1.3851 2.9580 5.4204 -0.8834 1.4790 3.1519 -1.3851 2.9580 3.6536 0.8834 1.4790 3.6536 0.8834 4.4370 5.4204 -0.8834 4.4370 8 3 1 2 3 3 1 0 5 3 0 1 3 3 0 3 4 3 3 2 4 3 2 1 5 3 0 4 5 3 4 2 5 5.9221 5.9221 5.9160 3.6536 5.4204 7.3950 3.1519 3.1519 5.9160 5.4204 3.6536 7.3950 3.6536 5.4204 4.4370 5.4204 3.6536 4.4370 8 3 1 2 3 3 0 1 3 3 0 3 5 3 1 0 4 3 2 1 4 3 3 2 5 3 2 4 5 3 4 0 5 5.9221 1.3851 5.9160 3.6536 0.8834 7.3950 3.1519 -1.3851 5.9160 5.4204 -0.8834 7.3950 5.4204 -0.8834 4.4370 3.6536 0.8834 4.4370 8 3 1 2 3 3 1 0 5 3 0 1 3 3 0 3 4 3 3 2 4 3 2 1 5 3 0 4 5 3 4 2 5 5.9221 5.9221 2.9580 3.1519 3.1519 2.9580 5.4204 3.6536 4.4370 3.6536 5.4204 4.4370 5.4204 3.6536 1.4790 3.6536 5.4204 1.4790 8 3 1 2 3 3 2 0 3 3 1 3 5 3 0 2 4 3 2 1 4 3 3 0 5 3 0 4 5 3 4 1 5 1.3851 5.9221 2.9580 -0.8834 5.4204 1.4790 -1.3851 3.1519 2.9580 -0.8834 5.4204 4.4370 0.8834 3.6536 4.4370 0.8834 3.6536 1.4790 8 3 1 2 3 3 1 0 5 3 0 1 3 3 0 3 4 3 3 2 4 3 2 1 5 3 0 4 5 3 4 2 5 3.6536 0.8834 1.4790 0.8834 3.6536 1.4790 3.1519 3.1519 -0.0000 1.3851 1.3851 -0.0000 3.1519 3.1519 2.9580 1.3851 1.3851 2.9580 8 3 1 2 3 3 2 0 3 3 1 3 5 3 0 2 4 3 2 1 4 3 3 0 5 3 0 4 5 3 4 1 5 gamgi0.17.1g/dat/cell/structures/s043_AuBe5.txt0000644000175000017500000000075111737126277020453 0ustar carloscarlosStructure 43 Prototype: AuBe5 StrukturBericht / Pearson: C15_b / cF24 Lattice parameter: AuBe5 Ni5U Cu5Gd 6.085 6.780 7.06 Cu5Tm AgCu4Gd Ni0.66Zn0.17Zr0.17 6.991 7.163 6.792 Radius: Au 1.4420 (half-distance) Be 1.1130 (half-distance) 1. Building with space group (s043.xml): Group: 216 Wyckoff positions: Au 1a Be 1c Be 4e, x = 0.625 (5/8) View: Au,Be: style solid, size 1.0, variancy 1.0, scale 0.25 FeC: style solid, method length, size 0.5, color 0.5,0.5,0.5, scale 0.5 gamgi0.17.1g/dat/cell/tetragonal.xml0000644000175000017500000000351412254614155016667 0ustar carloscarlos gamgi0.17.1g/dat/cell/martensite/0000755000175000017500000000000012254617063016156 5ustar carloscarlosgamgi0.17.1g/dat/cell/martensite/martensite_bain.xml0000644000175000017500000001336111735356724022057 0ustar carloscarlos 7.0300 3.5150 0.0000 0.0000 3.5150 0.0000 0.0000 0.0000 0.0000 7.0300 -0.0000 -0.0000 1 4 0 1 2 3 gamgi0.17.1g/dat/cell/martensite/martensite_nishiyama.xml0000644000175000017500000001431511735357000023114 0ustar carloscarlos 3.5150 0.0000 0.0000 0.0000 3.5150 0.0000 0.0000 0.0000 3.5150 1 3 0 1 2 3.5150 3.5150 3.5150 7.0300 -0.0000 3.5150 7.0300 3.5150 -0.0000 1 3 0 1 2 3.5152 0.0003 3.5148 1.7580 1.7670 3.5152 3.5182 3.5184 0.0030 5.2725 1.7576 -0.0003 1 4 0 1 2 3 gamgi0.17.1g/dat/cell/martensite/martensite_kurdjumov.xml0000644000175000017500000001434211735356661023174 0ustar carloscarlos 3.5150 0.0000 0.0000 0.0000 3.5150 0.0000 0.0000 0.0000 3.5150 1 3 0 1 2 3.5150 3.5150 3.5150 7.0300 -0.0000 3.5150 7.0300 3.5150 -0.0000 1 3 0 1 2 3.5152 0.0003 3.5148 1.7580 1.7670 3.5152 3.5182 3.5184 0.0030 5.2725 1.7576 -0.0003 1 4 0 1 2 3 gamgi0.17.1g/dat/cell/superconductors/0000755000175000017500000000000012267063750017247 5ustar carloscarlosgamgi0.17.1g/dat/cell/superconductors/s25b_Tl2Ba2Ca4Cu5O14.xml0000644000175000017500000012251012267056471023006 0ustar carloscarlos 3.8500 3.8500 56.2976 5.7750 3.8500 54.3696 3.8500 1.9250 54.3696 1.9250 3.8500 54.3696 3.8500 5.7750 54.3696 5 4 1 2 3 4 3 2 0 3 3 1 0 2 3 0 1 4 3 3 0 4 3.8500 3.8500 40.1024 3.8500 1.9250 42.0304 5.7750 3.8500 42.0304 1.9250 3.8500 42.0304 3.8500 5.7750 42.0304 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 1.9250 1.9250 64.2024 3.8500 1.9250 66.1304 1.9250 3.8500 66.1304 -0.0000 1.9250 66.1304 1.9250 0.0000 66.1304 5 4 1 2 3 4 3 2 0 3 3 1 0 2 3 0 1 4 3 3 0 4 5.7750 1.9250 64.2024 5.7750 3.8500 66.1304 3.8500 1.9250 66.1304 5.7750 0.0000 66.1304 7.7000 1.9250 66.1304 5 4 1 2 3 4 3 2 0 3 3 1 0 2 3 0 1 4 3 3 0 4 1.9250 5.7750 64.2024 3.8500 5.7750 66.1304 -0.0000 5.7750 66.1304 1.9250 3.8500 66.1304 1.9250 7.7000 66.1304 5 4 1 4 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 5.7750 5.7750 64.2024 3.8500 5.7750 66.1304 7.7000 5.7750 66.1304 5.7750 7.7000 66.1304 5.7750 3.8500 66.1304 5 4 1 4 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 5.7750 5.7750 32.1976 3.8500 5.7750 30.2696 5.7750 7.7000 30.2696 5.7750 3.8500 30.2696 7.7000 5.7750 30.2696 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 5.7750 1.9250 32.1976 5.7750 3.8500 30.2696 7.7000 1.9250 30.2696 5.7750 0.0000 30.2696 3.8500 1.9250 30.2696 5 4 1 2 3 4 3 2 0 3 3 1 0 2 3 0 1 4 3 3 0 4 1.9250 1.9250 32.1976 1.9250 0.0000 30.2696 -0.0000 1.9250 30.2696 3.8500 1.9250 30.2696 1.9250 3.8500 30.2696 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 1.9250 5.7750 32.1976 1.9250 7.7000 30.2696 1.9250 3.8500 30.2696 -0.0000 5.7750 30.2696 3.8500 5.7750 30.2696 5 4 1 4 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 -0.0000 5.7750 24.1000 1.9250 3.8500 24.1000 3.8500 5.7750 24.1000 1.9250 7.7000 24.1000 1 4 0 1 2 3 -0.0000 1.9250 24.1000 1.9250 -0.0000 24.1000 3.8500 1.9250 24.1000 1.9250 3.8500 24.1000 1 4 0 1 2 3 -0.0000 1.9250 27.1848 1.9250 -0.0000 27.1848 3.8500 1.9250 27.1848 1.9250 3.8500 27.1848 1 4 0 1 2 3 -0.0000 5.7750 27.1848 1.9250 3.8500 27.1848 3.8500 5.7750 27.1848 1.9250 7.7000 27.1848 1 4 0 1 2 3 3.8500 1.9250 27.1848 5.7750 0.0000 27.1848 7.7000 1.9250 27.1848 5.7750 3.8500 27.1848 1 4 0 1 2 3 5.7750 3.8500 24.1000 7.7000 1.9250 24.1000 5.7750 -0.0000 24.1000 3.8500 1.9250 24.1000 1 4 0 1 2 3 3.8500 5.7750 27.1848 5.7750 3.8500 27.1848 7.7000 5.7750 27.1848 5.7750 7.7000 27.1848 1 4 0 1 2 3 7.7000 5.7750 24.1000 5.7750 7.7000 24.1000 3.8500 5.7750 24.1000 5.7750 3.8500 24.1000 1 4 0 1 2 3 1.9250 3.8500 45.1152 3.8500 1.9250 45.1152 5.7750 3.8500 45.1152 3.8500 5.7750 45.1152 1 4 0 1 2 3 5.7750 3.8500 51.2848 3.8500 1.9250 51.2848 1.9250 3.8500 51.2848 3.8500 5.7750 51.2848 1 4 0 1 2 3 5.7750 3.8500 48.2000 3.8500 1.9250 48.2000 1.9250 3.8500 48.2000 3.8500 5.7750 48.2000 1 4 0 1 2 3 3.8500 1.9250 69.2152 1.9250 0.0000 69.2152 -0.0000 1.9250 69.2152 1.9250 3.8500 69.2152 1 4 0 1 2 3 3.8500 1.9250 72.3000 1.9250 3.8500 72.3000 -0.0000 1.9250 72.3000 1.9250 0.0000 72.3000 1 4 0 1 2 3 1.9250 7.7000 69.2152 -0.0000 5.7750 69.2152 1.9250 3.8500 69.2152 3.8500 5.7750 69.2152 1 4 0 1 2 3 1.9250 7.7000 72.3000 3.8500 5.7750 72.3000 1.9250 3.8500 72.3000 -0.0000 5.7750 72.3000 1 4 0 1 2 3 5.7750 0.0000 69.2152 7.7000 1.9250 69.2152 5.7750 3.8500 69.2152 3.8500 1.9250 69.2152 1 4 0 1 2 3 5.7750 3.8500 69.2152 7.7000 5.7750 69.2152 5.7750 7.7000 69.2152 3.8500 5.7750 69.2152 1 4 0 1 2 3 7.7000 5.7750 72.3000 5.7750 3.8500 72.3000 3.8500 5.7750 72.3000 5.7750 7.7000 72.3000 1 4 0 1 2 3 5.7750 3.8500 72.3000 7.7000 1.9250 72.3000 5.7750 0.0000 72.3000 3.8500 1.9250 72.3000 1 4 0 1 2 3 gamgi0.17.1g/dat/cell/superconductors/s13b_YBa2Cu3O7-x.xml0000644000175000017500000006643412267057152022420 0ustar carloscarlos 1.9114 5.8308 1.8572 1.9113 3.8872 4.4268 1.9114 7.7744 4.4268 0.0000 5.8308 4.4139 3.8227 5.8308 4.4139 6 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 3 2 1 4 1.9113 1.9436 9.8230 1.9114 3.8872 7.2534 1.9113 -0.0000 7.2534 0.0000 1.9436 7.2663 3.8227 1.9436 7.2663 6 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 3 2 1 4 1.9114 1.9436 1.8572 1.9113 -0.0000 4.4268 1.9113 3.8872 4.4268 -0.0000 1.9436 4.4139 3.8227 1.9436 4.4139 6 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 3 2 1 4 1.9114 5.8308 9.8230 1.9114 3.8872 7.2534 1.9114 7.7744 7.2534 3.8227 5.8308 7.2663 0.0000 5.8308 7.2663 6 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 3 2 1 4 1.9113 5.8308 13.5374 1.9113 3.8872 16.1070 1.9113 7.7744 16.1070 -0.0000 5.8308 16.0941 3.8227 5.8308 16.0941 6 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 3 2 1 4 5.7340 1.9436 1.8572 5.7341 3.8872 4.4268 5.7340 -0.0000 4.4268 7.6454 1.9436 4.4139 3.8227 1.9436 4.4139 6 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 3 2 1 4 5.7341 5.8308 1.8572 5.7341 3.8872 4.4268 5.7341 7.7744 4.4268 3.8227 5.8308 4.4139 7.6454 5.8308 4.4139 6 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 3 2 1 4 5.7340 5.8308 9.8230 5.7340 3.8872 7.2534 5.7341 7.7744 7.2534 7.6454 5.8308 7.2663 3.8227 5.8308 7.2663 6 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 3 2 1 4 1.9113 1.9436 13.5374 1.9113 3.8872 16.1070 1.9113 0.0000 16.1070 3.8227 1.9436 16.0941 -0.0000 1.9436 16.0941 6 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 3 2 1 4 1.9113 1.9436 21.5032 1.9113 0.0000 18.9336 1.9113 3.8872 18.9336 3.8227 1.9436 18.9465 -0.0000 1.9436 18.9465 6 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 3 2 1 4 1.9113 5.8308 21.5032 1.9113 3.8872 18.9336 1.9113 7.7744 18.9336 3.8227 5.8308 18.9465 -0.0000 5.8308 18.9465 6 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 3 2 1 4 5.7340 1.9436 9.8230 5.7340 0.0000 7.2534 5.7340 3.8872 7.2534 7.6454 1.9436 7.2663 3.8227 1.9436 7.2663 6 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 3 2 1 4 5.7340 1.9436 13.5374 5.7340 0.0000 16.1070 5.7340 3.8872 16.1070 3.8227 1.9436 16.0941 7.6454 1.9436 16.0941 6 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 3 2 1 4 5.7340 5.8308 21.5032 5.7340 3.8872 18.9336 5.7340 7.7744 18.9336 7.6454 5.8308 18.9465 3.8227 5.8308 18.9465 6 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 3 2 1 4 5.7340 5.8308 13.5374 5.7340 7.7744 16.1070 5.7340 3.8872 16.1070 7.6454 5.8308 16.0941 3.8227 5.8308 16.0941 6 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 3 2 1 4 5.7340 1.9436 21.5032 5.7340 3.8872 18.9336 5.7340 0.0000 18.9336 3.8227 1.9436 18.9465 7.6454 1.9436 18.9465 6 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 3 2 1 4 1.9113 3.8872 11.6802 1.9113 1.9436 9.8230 1.9113 0.0000 11.6802 1.9113 1.9436 13.5374 1 4 0 1 2 3 5.7340 0.0000 11.6802 5.7340 1.9436 13.5374 5.7340 3.8872 11.6802 5.7340 1.9436 9.8230 1 4 0 1 2 3 1.9113 7.7744 11.6802 1.9113 5.8308 9.8230 1.9113 3.8872 11.6802 1.9113 5.8308 13.5374 1 4 0 1 2 3 5.7340 3.8872 11.6802 5.7340 5.8308 9.8230 5.7340 7.7744 11.6802 5.7340 5.8308 13.5374 1 4 0 1 2 3 gamgi0.17.1g/dat/cell/superconductors/s04b_HgBa2CuO4+x.xml0000644000175000017500000003356212267060645022453 0ustar carloscarlos 1.9375 5.8125 7.5364 1.9375 5.8125 1.9768 3.8750 5.8125 4.7566 1.9375 3.8750 4.7566 0.0000 5.8125 4.7566 1.9375 7.7500 4.7566 8 3 1 2 3 3 2 0 3 3 0 2 5 3 1 3 4 3 3 0 4 3 2 1 5 3 1 4 5 3 4 0 5 5.8125 5.8125 7.5364 5.8125 7.7500 4.7566 5.8125 5.8125 1.9768 3.8750 5.8125 4.7566 5.8125 3.8750 4.7566 7.7500 5.8125 4.7566 8 3 1 2 3 3 1 0 5 3 0 1 3 3 0 3 4 3 3 2 4 3 2 1 5 3 0 4 5 3 4 2 5 5.8125 5.8125 11.4900 5.8125 5.8125 17.0496 5.8125 3.8750 14.2698 7.7500 5.8125 14.2698 3.8750 5.8125 14.2698 5.8125 7.7500 14.2698 8 3 1 2 3 3 2 0 3 3 1 3 5 3 0 2 4 3 2 1 4 3 3 0 5 3 0 4 5 3 4 1 5 1.9375 5.8125 11.4900 1.9375 5.8125 17.0496 0.0000 5.8125 14.2698 1.9375 3.8750 14.2698 3.8750 5.8125 14.2698 1.9375 7.7500 14.2698 8 3 1 2 3 3 2 0 3 3 0 2 5 3 1 3 4 3 3 0 4 3 2 1 5 3 1 4 5 3 4 0 5 1.9375 1.9375 7.5364 1.9375 1.9375 1.9768 3.8750 1.9375 4.7566 1.9375 -0.0000 4.7566 1.9375 3.8750 4.7566 0.0000 1.9375 4.7566 8 3 1 2 3 3 2 0 3 3 1 3 5 3 0 2 4 3 2 1 4 3 3 0 5 3 0 4 5 3 4 1 5 5.8125 1.9375 7.5364 3.8750 1.9375 4.7566 5.8125 1.9375 1.9768 5.8125 -0.0000 4.7566 7.7500 1.9375 4.7566 5.8125 3.8750 4.7566 8 3 1 2 3 3 1 0 5 3 0 1 3 3 0 3 4 3 3 2 4 3 2 1 5 3 0 4 5 3 4 2 5 1.9375 1.9375 11.4900 1.9375 3.8750 14.2698 1.9375 1.9375 17.0496 3.8750 1.9375 14.2698 1.9375 0.0000 14.2698 0.0000 1.9375 14.2698 8 3 1 2 3 3 1 0 5 3 0 1 3 3 0 3 4 3 3 2 4 3 2 1 5 3 0 4 5 3 4 2 5 5.8125 1.9375 11.4900 7.7500 1.9375 14.2698 5.8125 1.9375 17.0496 5.8125 0.0000 14.2698 3.8750 1.9375 14.2698 5.8125 3.8750 14.2698 8 3 1 2 3 3 1 0 5 3 0 1 3 3 0 3 4 3 3 2 4 3 2 1 5 3 0 4 5 3 4 2 5 gamgi0.17.1g/dat/cell/superconductors/s19b_TlBa2Ca2Cu3O9+x.xml0000644000175000017500000005376112267054746023130 0ustar carloscarlos 1.9215 5.7644 13.7760 1.9215 3.8429 11.0462 -0.0000 5.7644 11.0462 3.8429 5.7644 11.0462 1.9215 7.6858 11.0462 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 5.7643 1.9215 13.7760 7.6858 1.9215 11.0462 5.7644 0.0000 11.0462 5.7643 3.8429 11.0462 3.8429 1.9215 11.0462 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 1.9214 1.9215 13.7760 1.9215 3.8429 11.0462 3.8429 1.9215 11.0462 -0.0000 1.9215 11.0462 1.9214 0.0000 11.0462 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 5.7643 5.7644 13.7760 3.8429 5.7644 11.0462 5.7644 7.6858 11.0462 7.6858 5.7644 11.0462 5.7643 3.8429 11.0462 5 4 1 2 3 4 3 2 0 3 3 1 0 2 3 0 1 4 3 3 0 4 1.9214 1.9215 17.9660 -0.0000 1.9215 20.6958 1.9215 0.0000 20.6958 3.8429 1.9215 20.6958 1.9214 3.8429 20.6958 5 4 1 2 3 4 3 2 0 3 3 1 0 2 3 0 1 4 3 3 0 4 1.9214 5.7644 17.9660 1.9214 3.8429 20.6958 1.9215 7.6858 20.6958 -0.0000 5.7644 20.6958 3.8429 5.7644 20.6958 5 4 1 4 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 5.7644 5.7644 17.9660 5.7644 7.6858 20.6958 3.8429 5.7644 20.6958 5.7643 3.8429 20.6958 7.6858 5.7644 20.6958 5 4 1 2 3 4 3 2 0 3 3 1 0 2 3 0 1 4 3 3 0 4 5.7644 1.9215 17.9660 5.7643 3.8429 20.6958 5.7643 0.0000 20.6958 7.6858 1.9215 20.6958 3.8429 1.9215 20.6958 5 4 1 4 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 5.7643 3.8429 23.8065 7.6858 5.7644 23.8065 5.7643 7.6858 23.8065 3.8429 5.7644 23.8065 1 4 0 1 2 3 5.7643 3.8429 23.8065 3.8429 1.9215 23.8065 5.7643 0.0000 23.8065 7.6858 1.9215 23.8065 1 4 0 1 2 3 1.9214 3.8429 23.8065 3.8429 1.9215 23.8065 1.9214 0.0000 23.8065 -0.0000 1.9215 23.8065 1 4 0 1 2 3 3.8429 5.7644 23.8065 1.9214 3.8429 23.8065 -0.0000 5.7644 23.8065 1.9214 7.6858 23.8065 1 4 0 1 2 3 1.9214 0.0000 7.9355 3.8429 1.9215 7.9355 1.9214 3.8429 7.9355 -0.0000 1.9215 7.9355 1 4 0 1 2 3 1.9214 7.6858 7.9355 3.8429 5.7644 7.9355 1.9215 3.8429 7.9355 0.0000 5.7644 7.9355 1 4 0 1 2 3 5.7643 3.8429 7.9355 7.6858 5.7644 7.9355 5.7643 7.6858 7.9355 3.8429 5.7643 7.9355 1 4 0 1 2 3 3.8429 1.9214 7.9355 5.7644 3.8429 7.9355 7.6858 1.9215 7.9355 5.7644 0.0000 7.9355 1 4 0 1 2 3 gamgi0.17.1g/dat/cell/superconductors/s10a_Pb2Sr2Cu2O6.xml0000644000175000017500000002402511754307335022411 0ustar carloscarlos gamgi0.17.1g/dat/cell/superconductors/s08a_Tl2Ba2CuO6.xml0000644000175000017500000005035511754014645022316 0ustar carloscarlos gamgi0.17.1g/dat/cell/superconductors/s08_Tl2Ba2CuO6.txt0000644000175000017500000000146111773652756022202 0ustar carloscarlosSuperconductor (Tc = 95K): Tl2Ba2CuO6 Structure: 2201 Space group: 139 Lattice parameters: 3.8637 23.1392 Wyckoff positions: Tl 2e, z = 0.2971 Ba 2e, z = 0.0847 Cu 1b O 2c O 2e, z = 0.3827 O 8n, y = 0.1043 z = 0.2104, Occupancy = 0.25 Wyckoff change: O 8n -> 2e, z = 0.2104 1. with Cell (s08a.xml): Cell Change XYZ: 0.0, 0.0, 0.5 Bond: Color 0.5,0.5,0.5, Scale 0.4 2. with Polytopes (s08b.xml): Cell Change XYZ: 0.0, 0.0, 0.5 Cells: 2 x 2 x 2 Neighbours: O Number: 6 References: H. Shaked, P.M. Keane, J.C. Rodriguez, F.F. Owen, R.L. Hitterman, J.D. Jorgensen, Crystal structures of the High-Tc Superconducting Copper-Oxides, Physica C, Elsevier Science, Amsterdam, 1994 F. Izumi, J.D. Jorgensen, Y. Shimakawa, Y. Kubo, T. Manoko, S. Pei, T. Matsumoto, R.L. Hitterman, and Y. Kanke, Physica C 193, 426 (1992) gamgi0.17.1g/dat/cell/superconductors/s13a_YBa2Cu3O7-x.xml0000644000175000017500000002625011745361712022407 0ustar carloscarlos gamgi0.17.1g/dat/cell/superconductors/s19_TlBa2Ca2Cu3O9+x.txt0000644000175000017500000000137311773660166022775 0ustar carloscarlosSuperconductor (Tc = 123 K): s19_TlBa2Ca2Cu3O9+x Structure: 1223 Space group: 123 Lattice parameters: 3.8429 15.8710 Wyckoff positions: Tl 1a Ba 2h, z = 0.1760 Ca 2h, z = 0.3970 Cu 1b, Cu 2g, z = 0.3020 O 2e O 4i, z = 0.3040 O 2g, z = 0.1320 O 1c 1. with Cell (s19a.xml): Cell Change XYZ: 0.0, 0.0, 0.5 Bond: Color 0.5,0.5,0.5, Scale 0.4 2. with Polytopes (s19b.xml): Cell Change XYZ: 0.5, 0.5, 0.0 Cells: 2 x 2 x 2 Neighbours: O Number: 5, 4 References: H. Shaked, P.M. Keane, J.C. Rodriguez, F.F. Owen, R.L. Hitterman, J.D. Jorgensen, Crystal structures of the High-Tc Superconducting Copper-Oxides, Physica C, Elsevier Science, Amsterdam, 1994 S.S.P. Parkin, V.Y. Lee, A.I. Nazzal, R. Savoy, R. Beyers, and S.J. LaPlaca, Phys. Rev. Lett. 61, 750 (1988) gamgi0.17.1g/dat/cell/superconductors/s04_HgBa2CuO4+x.txt0000644000175000017500000000126311773652653022330 0ustar carloscarlosSuperconductor (Tc = 98K): HgBa2CuO4+x Structure: 1201 Space group: 123 Lattice parameters: 3.875 9.5132 Wyckoff positions: Ba 2g, z = 0.2980 Hg 1c Cu 1d O 2e O 2h, z = 0.2078 O 1a 1. with Cell (s04a.xml): Cell Change XYZ: 0.5, 0.5, 0.5 Bond: Color 0.5,0.5,0.5, Scale 0.4 2. with Polytopes (s04b.xml): Cells: 2 x 2 x 2 Neighbours: O Number: 6 References: H. Shaked, P.M. Keane, J.C. Rodriguez, F.F. Owen, R.L. Hitterman, J.D. Jorgensen, Crystal structures of the High-Tc Superconducting Copper-Oxides, Physica C, Elsevier Science, Amsterdam, 1994 J.L. Wagner, P.G. Radaelli, D.G. Hinks, J.D. Jorgensen, J.F. Mitchell, B. Dabrowski, and G.S. Knapp, M.A. Beno Physica C 210, 311 (1993) gamgi0.17.1g/dat/cell/superconductors/s06_Eu2Ba2Cu3O10-x.txt0000644000175000017500000000126411773652722022567 0ustar carloscarlosSuperconductor (Tc = 43K): (Eu,Ce)2(Ba,Eu)2Cu3O10-x Structure: 1201 T*F Space group: 139 Lattice parameters: 3.8504 28.4598 Wyckoff positions: Eu,Ce 2e, z = 0.2942 Ba,Eu 2e, z = 0.4245 Cu 1a, Cu 2e, z = 0.1423 O 2c O 2e, z = 0.0663 O 4g, z = 0.3540 O 2d 1. with Cell (s06a.xml): Bond: Color 0.5,0.5,0.5, Scale 0.4 2. with Polytopes (s06b.xml): Cells: 2 x 2 x 2 Neighbours: O Number: 5 References: H. Shaked, P.M. Keane, J.C. Rodriguez, F.F. Owen, R.L. Hitterman, J.D. Jorgensen, Crystal structures of the High-Tc Superconducting Copper-Oxides, Physica C, Elsevier Science, Amsterdam, 1994 H. Sawa, K. Obara, J. Akimitsu, Y. Matsui, and S. Horiuchi, J. Phys. Soc. Japan 58, 2252 (1989) gamgi0.17.1g/dat/cell/superconductors/s09_Bi2Sr2Gd2Cu2O10.txt0000644000175000017500000000151311773652775022711 0ustar carloscarlosSuperconductor (Tc = 34K): Bi2Sr2(Gd,Ce)2Cu2O10 Structure: 2201 T* Space group: 129 Lattice parameters: 3.85 17.88 Wyckoff positions: Bi 2c, z = 0.089 Sr 2c, z = 0.7800 Gd,Ce 2c, z = 0.5750 Cu 2c, z = 0.3270 O 4f, z = 0.3270 O 2c, z = 0.2260 O 2b O 2c, z = 0.911 1. with Cell (s10a.xml): Cell Change XYZ: -0.25, -0.25, -0.327 Bond: Color 0.5,0.5,0.5, Scale 0.4 2. with Polytopes (s10b.xml): Cell Change XYZ: -0.25, -0.25, -0.327 Cells: 2 x 2 x 2 Neighbours: O Number: 5 References: H. Shaked, P.M. Keane, J.C. Rodriguez, F.F. Owen, R.L. Hitterman, J.D. Jorgensen, Crystal structures of the High-Tc Superconducting Copper-Oxides, Physica C, Elsevier Science, Amsterdam, 1994 (Errata: data -> O4 is missing; image -> O4 and Bi are swapped) T. Arima, Y. Tokura, H. Takagi, S. Uchida, R. Beyers, and J.B. Torrance, Physica C 168, 79 (1990) gamgi0.17.1g/dat/cell/superconductors/s11a_La2CaCu2O6.xml0000644000175000017500000004021611756242011022251 0ustar carloscarlos gamgi0.17.1g/dat/cell/superconductors/s18_PbBaYSrCu3O8.txt0000644000175000017500000000126612007053336022523 0ustar carloscarlosSuperconductor (Tc = 50K): PbBaYSrCu3O8 Structure: 0223 Space group: 139 Lattice parameters: 3.842 27.66 Wyckoff positions: Ba,Pb 2e, z = 0.2900 Y,Sr 2e, z = 0.4370 Cu 1a Cu 2e, z = 0.1220 O 2c O 2e, z = 0.2000 O 4g, z = 0.1180 1. with Cell (s18a.xml): Bond: Color 0.5,0.5,0.5, Scale 0.32 2. with Polytopes (s18b.xml): Cells: 2 x 2 x 2 Neighbours: O Number: 5, 4 References: H. Shaked, P.M. Keane, J.C. Rodriguez, F.F. Owen, R.L. Hitterman, J.D. Jorgensen, Crystal structures of the High-Tc Superconducting Copper-Oxides, Physica C, Elsevier Science, Amsterdam, 1994 T. Rouillon, R.Retoux, D. Groult, C. Michel, M. Hervieu, J. Provost, and B. Raveau, J. Solid State Chem. 78, 322 (1989) gamgi0.17.1g/dat/cell/superconductors/s04a_HgBa2CuO4+x.xml0000644000175000017500000002351311745360131022436 0ustar carloscarlos gamgi0.17.1g/dat/cell/superconductors/s26a_BaCuO2.xml0000644000175000017500000001157412007040442021630 0ustar carloscarlos gamgi0.17.1g/dat/cell/superconductors/s03_Nd2CuO4.txt0000644000175000017500000000147511773652637021633 0ustar carloscarlosSuperconductor (Tc = 35K): (Nd,Sr,Ce)2CuO4 Structure: 0201 T* Space group: 129 Lattice parameters: 3.86 12.50 Wyckoff positions: Nd,Sr,Ce 2c, z = 0.3893 Nd,Sr,Ce 2c, z = 0.1035 Cu 2c, z = 0.7490 O 4f, z = 0.2378 O 8j, x = 0.2958, z = 0.5709 O 2a Change Wyckoff: O 8j -> O 2c, z = 0.5709 1. with Cell (s03a.xml): Cell Change XYZ: -0.25, -0.25, -0.7490 Bond: Color 0.5,0.5,0.5, Scale 0.4 2. with Polytopes (s03b.xml): Cell Change XYZ: -0.25, -0.25, -0.7490 Cells: 2 x 2 x 2 Neighbours: O Number: 5 References: H. Shaked, P.M. Keane, J.C. Rodriguez, F.F. Owen, R.L. Hitterman, J.D. Jorgensen, Crystal structures of the High-Tc Superconducting Copper-Oxides, Physica C, Elsevier Science, Amsterdam, 1994 F. Izumi, E. Takayama-Muromachi, A. Fujimori, T. Kamiyama, H. Asano, J. Akimitsu, and H. Sawa, Physica C 158, 440 (1989) gamgi0.17.1g/dat/cell/superconductors/s07_TlCO3Sr4Cu2O7.txt0000644000175000017500000000161111773652744022545 0ustar carloscarlosSuperconductor (Tc = 70K): (Tl,Pb)(CO3)Sr4Cu2O7 Structure: 1201 / 1201 Space group: 123 Lattice parameters: 3.8200 16.5200 Wyckoff positions: Tl,Pb 1a C 1b Sr 2h, z = 0.1596 Sr 2h, z = 0.3725 Cu 2g, z = 0.2654 O 4n, x = 0.67, occupancy = 0.25 O 2g, z = 0.1210 O 8s, x = 0.1620 z = 0.4140, occupancy = 0.25 O 4m, x = 0.3160, occupancy = 0.25 O 4i, z = 0.2770 Wyckoff change: O 4n -> O 1c O 8s -> O 2g, z = 0.4140 O 4m -> remove 3/4 of O 1. with Cell (s07a.xml): Cell Change XYZ: 0.0, 0.0, -0.2654 2. with Polytopes (s07b.xml): Cell Change XYZ: 0.5, 0.5, 0.5 Cells: 2 x 2 x 2 Neighbours: O Number: 6 References: H. Shaked, P.M. Keane, J.C. Rodriguez, F.F. Owen, R.L. Hitterman, J.D. Jorgensen, Crystal structures of the High-Tc Superconducting Copper-Oxides, Physica C, Elsevier Science, Amsterdam, 1994 M. Huve, C. Michel, A. Maignan, M. Hervieu, C. Martin, and B. Raveau Physica C 205, 219 (1993) gamgi0.17.1g/dat/cell/superconductors/s11_La2CaCu2O6.txt0000644000175000017500000000144511773653037022145 0ustar carloscarlosSuperconductor (Tc = 58 K): (La,Sr,Ca)3Cu2O6 Structure: 0212 Space group: 139 Lattice parameters: 3.8208 19.5993 Wyckoff positions: La,Sr 2e, z = 0.1766 Ca 1a Cu 2e, z = 0.5866 O 4g, z = 0.0821 O 2e, z = 0.7036 1. with Cell (s11a.xml): Cell Change XYZ: 0.0, 0.0, -0.5866 Bond: Color 0.5,0.5,0.5, Scale 0.4 2. with Polytopes (s11b.xml): Cell Change XYZ: 0.0, 0.0, 0.5 Cells: 2 x 2 x 2 Neighbours: O Number: 5 References: H. Shaked, P.M. Keane, J.C. Rodriguez, F.F. Owen, R.L. Hitterman, J.D. Jorgensen, Crystal structures of the High-Tc Superconducting Copper-Oxides, Physica C, Elsevier Science, Amsterdam, 1994 (Errata: data -> O4 is missing; image -> O4 and Bi are swapped) R.J. Cava, A. Santoro, J.J. Krajewski, R.M. Fleming, J.V. Wasczak, W.F. Peck Jr., and P. Marsh, Physica C 172, 138 (1990) gamgi0.17.1g/dat/cell/superconductors/s17_Pb2Sr2YCu3O8.txt0000644000175000017500000000141312007053266022417 0ustar carloscarlosSuperconductor (Tc = 70K): Pb2Sr2YCu3O8 Structure: 3212 Space group: 65 Lattice parameters: 5.390 5.430 15.730 Wyckoff positions: Sr 2h, z = 0.2207 Cu 2g, z = 0.1062 Pb 2g, z = 0.3883 Y 1c Cu 1d O 2g, z = 0.2514 O 2h, z = 0.3849 O 4i, z = 0.0918 Change: Group 65 -> Group 123 5.390 5.430 -> 5.410 1. with Cell (s17a.xml): Bond: Color 0.5,0.5,0.5, Scale 0.5 2. with Polytopes (s17b.xml): Cell Change XYZ: -0.5, -0.5, -0.5 Cells: 2 x 2 x 2 Neighbours: O Number: 5 References: H. Shaked, P.M. Keane, J.C. Rodriguez, F.F. Owen, R.L. Hitterman, J.D. Jorgensen, Crystal structures of the High-Tc Superconducting Copper-Oxides, Physica C, Elsevier Science, Amsterdam, 1994 R.J. Caca, M. Marezio, J.J. Krajewski, W.F. Peck Jr, A. Santoro, and F. Beech, Physica C 157, 272 (1989) gamgi0.17.1g/dat/cell/superconductors/s11b_La2CaCu2O6.xml0000644000175000017500000006643212267057634022277 0ustar carloscarlos 1.9104 1.9104 5.8092 1.9104 3.8208 8.1905 -0.0000 1.9104 8.1905 1.9104 0.0000 8.1905 3.8208 1.9104 8.1905 5 4 1 2 3 4 3 2 0 3 3 1 0 2 3 0 1 4 3 3 0 4 1.9104 1.9104 13.7901 -0.0000 1.9104 11.4088 1.9104 3.8208 11.4088 3.8208 1.9104 11.4088 1.9104 0.0000 11.4088 5 4 1 2 3 4 3 2 0 3 3 1 0 2 3 0 1 4 3 3 0 4 1.9104 5.7312 5.8092 0.0000 5.7312 8.1905 1.9104 3.8208 8.1905 3.8208 5.7312 8.1905 1.9104 7.6416 8.1905 5 4 1 2 3 4 3 2 0 3 3 1 0 2 3 0 1 4 3 3 0 4 1.9104 5.7312 13.7901 1.9104 7.6416 11.4088 1.9104 3.8208 11.4088 -0.0000 5.7312 11.4088 3.8208 5.7312 11.4088 5 4 1 4 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 5.7312 5.7312 5.8092 5.7312 3.8208 8.1905 7.6416 5.7312 8.1905 5.7312 7.6416 8.1905 3.8208 5.7312 8.1905 5 4 1 2 3 4 3 2 0 3 3 1 0 2 3 0 1 4 3 3 0 4 5.7312 5.7312 13.7901 5.7312 3.8208 11.4088 5.7312 7.6416 11.4088 7.6416 5.7312 11.4088 3.8208 5.7312 11.4088 5 4 1 4 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 3.8208 3.8208 15.6089 3.8208 1.9104 17.9902 5.7312 3.8208 17.9902 3.8208 5.7312 17.9902 1.9104 3.8208 17.9902 5 4 1 2 3 4 3 2 0 3 3 1 0 2 3 0 1 4 3 3 0 4 1.9104 5.7312 25.4085 1.9104 3.8208 27.7898 3.8208 5.7312 27.7898 1.9104 7.6416 27.7898 -0.0000 5.7312 27.7898 5 4 1 2 3 4 3 2 0 3 3 1 0 2 3 0 1 4 3 3 0 4 1.9104 5.7312 33.3894 1.9104 3.8208 31.0081 1.9104 7.6416 31.0081 3.8208 5.7312 31.0081 -0.0000 5.7312 31.0081 5 4 1 4 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 5.7312 1.9104 5.8092 5.7312 0.0000 8.1905 7.6416 1.9104 8.1905 5.7312 3.8208 8.1905 3.8208 1.9104 8.1905 5 4 1 2 3 4 3 2 0 3 3 1 0 2 3 0 1 4 3 3 0 4 5.7312 1.9104 13.7901 5.7312 3.8208 11.4088 7.6416 1.9104 11.4088 5.7312 0.0000 11.4088 3.8208 1.9104 11.4088 5 4 1 2 3 4 3 2 0 3 3 1 0 2 3 0 1 4 3 3 0 4 3.8208 3.8208 23.5897 3.8208 5.7312 21.2084 3.8208 1.9104 21.2084 1.9104 3.8208 21.2084 5.7312 3.8208 21.2084 5 4 1 4 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 1.9104 1.9104 25.4085 1.9104 3.8208 27.7898 -0.0000 1.9104 27.7898 1.9104 0.0000 27.7898 3.8208 1.9104 27.7898 5 4 1 2 3 4 3 2 0 3 3 1 0 2 3 0 1 4 3 3 0 4 1.9104 1.9104 33.3894 3.8208 1.9104 31.0081 1.9104 0.0000 31.0081 1.9104 3.8208 31.0081 -0.0000 1.9104 31.0081 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 5.7312 1.9104 25.4085 3.8208 1.9104 27.7898 5.7312 0.0000 27.7898 5.7312 3.8208 27.7898 7.6416 1.9104 27.7898 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 5.7312 1.9104 33.3894 3.8208 1.9104 31.0081 5.7312 3.8208 31.0081 5.7312 0.0000 31.0081 7.6416 1.9104 31.0081 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 5.7312 5.7312 25.4085 5.7312 7.6416 27.7898 3.8208 5.7312 27.7898 5.7312 3.8208 27.7898 7.6416 5.7312 27.7898 5 4 1 2 3 4 3 2 0 3 3 1 0 2 3 0 1 4 3 3 0 4 5.7312 5.7312 33.3894 3.8208 5.7312 31.0081 5.7312 7.6416 31.0081 5.7312 3.8208 31.0081 7.6416 5.7312 31.0081 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 gamgi0.17.1g/dat/cell/superconductors/s01b_La2CuO4.xml0000644000175000017500000004016612267056120021727 0ustar carloscarlos 5.6809 1.8937 9.0733 5.6809 1.8937 4.2150 5.6809 0.0000 6.6442 3.7873 1.8937 6.6442 7.5746 1.8937 6.6442 5.6809 3.7873 6.6441 8 3 1 2 3 3 2 0 3 3 1 3 5 3 0 2 4 3 2 1 4 3 3 0 5 3 0 4 5 3 4 1 5 1.8936 1.8937 9.0733 1.8936 0.0000 6.6442 1.8936 1.8937 4.2150 3.7873 1.8937 6.6442 -0.0000 1.8937 6.6441 1.8936 3.7873 6.6441 8 3 1 2 3 3 0 1 3 3 0 3 5 3 1 0 4 3 2 1 4 3 3 2 5 3 2 4 5 3 4 0 5 5.6809 1.8937 17.5033 5.6809 0.0000 19.9325 5.6809 1.8937 22.3616 3.7873 1.8937 19.9324 5.6809 3.7873 19.9324 7.5746 1.8937 19.9325 8 3 1 2 3 3 1 0 5 3 0 1 3 3 0 3 4 3 3 2 4 3 2 1 5 3 0 4 5 3 4 2 5 5.6810 5.6810 4.2150 5.6809 3.7873 6.6441 5.6809 5.6810 9.0733 3.7873 5.6810 6.6441 7.5746 5.6810 6.6441 5.6810 7.5746 6.6441 8 3 1 2 3 3 0 1 3 3 0 3 5 3 1 0 4 3 2 1 4 3 3 2 5 3 2 4 5 3 4 0 5 3.7873 3.7873 10.8592 3.7873 3.7873 15.7174 3.7873 1.8937 13.2883 5.6809 3.7873 13.2883 3.7873 5.6810 13.2883 1.8936 3.7873 13.2883 8 3 1 2 3 3 2 0 3 3 0 2 5 3 1 3 4 3 3 0 4 3 2 1 5 3 1 4 5 3 4 0 5 1.8936 1.8937 17.5033 1.8936 0.0000 19.9325 1.8936 1.8937 22.3616 -0.0000 1.8937 19.9324 3.7873 1.8937 19.9324 1.8936 3.7873 19.9324 8 3 1 2 3 3 0 1 3 3 0 3 5 3 1 0 4 3 2 1 4 3 3 2 5 3 2 4 5 3 4 0 5 1.8936 5.6810 9.0733 3.7873 5.6810 6.6441 1.8937 5.6810 4.2150 1.8937 7.5746 6.6441 -0.0000 5.6810 6.6441 1.8936 3.7873 6.6441 8 3 1 2 3 3 1 0 5 3 0 1 3 3 0 3 4 3 3 2 4 3 2 1 5 3 0 4 5 3 4 2 5 5.6809 5.6810 17.5033 3.7873 5.6810 19.9324 5.6809 5.6810 22.3616 5.6809 7.5746 19.9324 7.5746 5.6810 19.9324 5.6809 3.7873 19.9324 8 3 1 2 3 3 1 0 5 3 0 1 3 3 0 3 4 3 3 2 4 3 2 1 5 3 0 4 5 3 4 2 5 1.8936 5.6810 17.5033 1.8936 5.6810 22.3616 -0.0000 5.6810 19.9324 1.8936 3.7873 19.9324 3.7873 5.6810 19.9324 1.8936 7.5746 19.9324 8 3 1 2 3 3 2 0 3 3 0 2 5 3 1 3 4 3 3 0 4 3 2 1 5 3 1 4 5 3 4 0 5 gamgi0.17.1g/dat/cell/superconductors/s26b_BaCuO2.xml0000644000175000017500000002376711745626143021660 0ustar carloscarlos 3.9300 1.9650 1.7350 1.9650 0.0000 1.7350 0.0000 1.9650 1.7350 1.9650 3.9300 1.7350 1 4 0 1 2 3 3.9300 5.8950 1.7350 1.9650 3.9300 1.7350 -0.0000 5.8950 1.7350 1.9650 7.8600 1.7350 1 4 0 1 2 3 3.9300 5.8950 5.2050 1.9650 3.9300 5.2050 -0.0000 5.8950 5.2050 1.9650 7.8600 5.2050 1 4 0 1 2 3 5.8950 7.8600 1.7350 3.9300 5.8950 1.7350 5.8950 3.9300 1.7350 7.8600 5.8950 1.7350 1 4 0 1 2 3 1.9650 3.9300 5.2050 3.9300 1.9650 5.2050 1.9650 -0.0000 5.2050 -0.0000 1.9650 5.2050 1 4 0 1 2 3 7.8600 1.9650 1.7350 5.8950 3.9300 1.7350 3.9300 1.9650 1.7350 5.8950 0.0000 1.7350 1 4 0 1 2 3 7.8600 1.9650 5.2050 5.8950 0.0000 5.2050 3.9300 1.9650 5.2050 5.8950 3.9300 5.2050 1 4 0 1 2 3 5.8950 7.8600 5.2050 7.8600 5.8950 5.2050 5.8950 3.9300 5.2050 3.9300 5.8950 5.2050 1 4 0 1 2 3 gamgi0.17.1g/dat/cell/superconductors/s05b_PbEu2Sr2Cu2O9.xml0000644000175000017500000007253412267056310022715 0ustar carloscarlos 1.9000 1.9000 12.8464 3.8000 1.9000 10.4784 1.9000 0.0000 10.4784 -0.0000 1.9000 10.4784 1.9000 3.8000 10.4784 5 4 1 2 3 4 3 2 0 3 3 1 0 2 3 0 1 4 3 3 0 4 1.9000 5.7000 12.8464 1.9000 7.6000 10.4784 1.9000 3.8000 10.4784 -0.0000 5.7000 10.4784 3.8000 5.7000 10.4784 5 4 1 4 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 1.9000 5.7000 16.7536 1.9000 7.6000 19.1216 1.9000 3.8000 19.1216 3.8000 5.7000 19.1216 -0.0000 5.7000 19.1216 5 4 1 4 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 5.7000 5.7000 12.8464 5.7000 7.6000 10.4784 5.7000 3.8000 10.4784 3.8000 5.7000 10.4784 7.6000 5.7000 10.4784 5 4 1 4 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 1.9000 1.9000 16.7536 -0.0000 1.9000 19.1216 1.9000 0.0000 19.1216 1.9000 3.8000 19.1216 3.8000 1.9000 19.1216 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 5.7000 1.9000 12.8464 5.7000 3.8000 10.4784 7.6000 1.9000 10.4784 3.8000 1.9000 10.4784 5.7000 0.0000 10.4784 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 5.7000 1.9000 16.7536 7.6000 1.9000 19.1216 5.7000 3.8000 19.1216 3.8000 1.9000 19.1216 5.7000 0.0000 19.1216 5 4 1 2 3 4 3 2 0 3 3 1 0 2 3 0 1 4 3 3 0 4 5.7000 5.7000 16.7536 5.7000 3.8000 19.1216 7.6000 5.7000 19.1216 3.8000 5.7000 19.1216 5.7000 7.6000 19.1216 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 3.8000 3.8000 27.6464 3.8000 1.9000 25.2784 1.9000 3.8000 25.2784 3.8000 5.7000 25.2784 5.7000 3.8000 25.2784 5 4 1 2 3 4 3 2 0 3 3 1 0 2 3 0 1 4 3 3 0 4 3.8000 3.8000 31.5536 1.9000 3.8000 33.9216 3.8000 1.9000 33.9216 3.8000 5.7000 33.9216 5.7000 3.8000 33.9216 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 1.9000 1.9000 42.4464 1.9000 0.0000 40.0784 -0.0000 1.9000 40.0784 3.8000 1.9000 40.0784 1.9000 3.8000 40.0784 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 1.9000 5.7000 42.4464 1.9000 3.8000 40.0784 -0.0000 5.7000 40.0784 1.9000 7.6000 40.0784 3.8000 5.7000 40.0784 5 4 1 2 3 4 3 2 0 3 3 1 0 2 3 0 1 4 3 3 0 4 1.9000 5.7000 46.3536 3.8000 5.7000 48.7216 1.9000 7.6000 48.7216 1.9000 3.8000 48.7216 -0.0000 5.7000 48.7216 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 5.7000 5.7000 42.4464 5.7000 3.8000 40.0784 3.8000 5.7000 40.0784 7.6000 5.7000 40.0784 5.7000 7.6000 40.0784 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 1.9000 1.9000 46.3536 1.9000 0.0000 48.7216 3.8000 1.9000 48.7216 1.9000 3.8000 48.7216 -0.0000 1.9000 48.7216 5 4 1 2 3 4 3 2 0 3 3 1 0 2 3 0 1 4 3 3 0 4 5.7000 1.9000 42.4464 3.8000 1.9000 40.0784 5.7000 3.8000 40.0784 5.7000 0.0000 40.0784 7.6000 1.9000 40.0784 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 5.7000 1.9000 46.3536 7.6000 1.9000 48.7216 5.7000 3.8000 48.7216 5.7000 0.0000 48.7216 3.8000 1.9000 48.7216 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 5.7000 5.7000 46.3536 5.7000 3.8000 48.7216 7.6000 5.7000 48.7216 3.8000 5.7000 48.7216 5.7000 7.6000 48.7216 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 gamgi0.17.1g/dat/cell/superconductors/s05_PbEu2Sr2Cu2O9.txt0000644000175000017500000000127511773652675022605 0ustar carloscarlosSuperconductor (Tc = 25K): (Pb,Cu)(Eu,Ce)2(Sr,Eu)2Cu2O9 Structure: 1201 T* Space group: 139 Lattice parameters: 3.80 29.60 Wyckoff positions: Pb,Cu 1a Eu,Ce 2e, z = 0.2942 Sr,Eu 2e, z = 0.4245 Cu 2e, z = 0.1423 O 1b O 2e, z = 0.0660 O 4g, z = 0.3540 O 2d 1. with Cell (s05a.xml): Bond: Color 0.5,0.5,0.5, Scale 0.4 2. with Polytopes (s05b.xml): Cells: 2 x 2 x 2 Neighbours: O Number: 5 References: H. Shaked, P.M. Keane, J.C. Rodriguez, F.F. Owen, R.L. Hitterman, J.D. Jorgensen, Crystal structures of the High-Tc Superconducting Copper-Oxides, Physica C, Elsevier Science, Amsterdam, 1994 T. Maeda, K. Sakuyama, S. Koriyama, A. Ichinose, H. Yamauchi, and S. Tanaka, Physica C 169, 133 (1990) gamgi0.17.1g/dat/cell/superconductors/s06b_Eu2Ba2Cu3O10-x.xml0000644000175000017500000007356512267060330022712 0ustar carloscarlos 5.7756 5.7756 12.3430 5.7756 3.8504 10.0748 3.8504 5.7756 10.0748 7.7008 5.7756 10.0748 5.7756 7.7008 10.0748 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 5.7756 5.7756 16.1168 5.7756 3.8504 18.3850 5.7756 7.7008 18.3850 3.8504 5.7756 18.3850 7.7008 5.7756 18.3850 5 4 1 4 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 1.9252 5.7756 12.3430 1.9252 7.7008 10.0748 3.8504 5.7756 10.0748 1.9252 3.8504 10.0748 -0.0000 5.7756 10.0748 5 4 1 2 3 4 3 2 0 3 3 1 0 2 3 0 1 4 3 3 0 4 5.7756 1.9252 12.3430 5.7756 -0.0000 10.0748 3.8504 1.9252 10.0748 7.7008 1.9252 10.0748 5.7756 3.8504 10.0748 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 1.9252 5.7756 16.1168 1.9252 7.7008 18.3850 -0.0000 5.7756 18.3850 3.8504 5.7756 18.3850 1.9252 3.8504 18.3850 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 1.9252 1.9252 12.3430 1.9252 -0.0000 10.0748 1.9252 3.8504 10.0748 3.8504 1.9252 10.0748 -0.0000 1.9252 10.0748 5 4 1 4 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 1.9252 1.9252 16.1168 -0.0000 1.9252 18.3850 1.9252 -0.0000 18.3850 3.8504 1.9252 18.3850 1.9252 3.8504 18.3850 5 4 1 2 3 4 3 2 0 3 3 1 0 2 3 0 1 4 3 3 0 4 5.7756 1.9252 16.1168 3.8504 1.9252 18.3850 5.7756 -0.0000 18.3850 7.7008 1.9252 18.3850 5.7756 3.8504 18.3850 5 4 1 2 3 4 3 2 0 3 3 1 0 2 3 0 1 4 3 3 0 4 3.8504 3.8504 26.5729 3.8504 1.9252 24.3047 1.9252 3.8504 24.3047 3.8504 5.7756 24.3047 5.7756 3.8504 24.3047 5 4 1 2 3 4 3 2 0 3 3 1 0 2 3 0 1 4 3 3 0 4 3.8504 3.8504 30.3467 5.7756 3.8504 32.6149 3.8504 5.7756 32.6149 1.9252 3.8504 32.6149 3.8504 1.9252 32.6149 5 4 1 2 3 4 3 2 0 3 3 1 0 2 3 0 1 4 3 3 0 4 1.9252 5.7756 40.8028 1.9252 3.8504 38.5346 -0.0000 5.7756 38.5346 3.8504 5.7756 38.5346 1.9252 7.7008 38.5346 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 5.7756 5.7756 40.8028 5.7756 7.7008 38.5346 5.7756 3.8504 38.5346 3.8504 5.7756 38.5346 7.7008 5.7756 38.5346 5 4 1 4 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 5.7756 5.7756 44.5766 5.7756 7.7008 46.8448 5.7756 3.8504 46.8448 7.7008 5.7756 46.8448 3.8504 5.7756 46.8448 5 4 1 4 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 5.7756 1.9252 40.8028 5.7756 3.8504 38.5346 7.7008 1.9252 38.5346 3.8504 1.9252 38.5346 5.7756 -0.0000 38.5346 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 1.9252 5.7756 44.5766 1.9252 7.7008 46.8448 -0.0000 5.7756 46.8448 3.8504 5.7756 46.8448 1.9252 3.8504 46.8448 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 5.7756 1.9252 44.5766 3.8504 1.9252 46.8448 5.7756 -0.0000 46.8448 5.7756 3.8504 46.8448 7.7008 1.9252 46.8448 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 1.9252 1.9252 40.8028 1.9252 -0.0000 38.5346 -0.0000 1.9252 38.5346 3.8504 1.9252 38.5346 1.9252 3.8504 38.5346 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 1.9252 1.9252 44.5766 1.9252 -0.0000 46.8448 1.9252 3.8504 46.8448 -0.0000 1.9252 46.8448 3.8504 1.9252 46.8448 5 4 1 4 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 gamgi0.17.1g/dat/cell/superconductors/s02a_Nd2CuO4-x.xml0000644000175000017500000003022211745360332022174 0ustar carloscarlos gamgi0.17.1g/dat/cell/superconductors/s02b_Nd2CuO4-x.xml0000644000175000017500000003102511744060047022176 0ustar carloscarlos 1.9750 3.9500 6.0350 0.0000 1.9750 6.0350 1.9750 -0.0000 6.0350 3.9500 1.9750 6.0350 1 4 0 1 2 3 1.9750 7.9000 6.0350 0.0000 5.9250 6.0350 1.9750 3.9500 6.0350 3.9500 5.9250 6.0350 1 4 0 1 2 3 5.9250 3.9500 6.0350 7.9000 1.9750 6.0350 5.9250 -0.0000 6.0350 3.9500 1.9750 6.0350 1 4 0 1 2 3 5.9250 7.9000 6.0350 7.9000 5.9250 6.0350 5.9250 3.9500 6.0350 3.9500 5.9250 6.0350 1 4 0 1 2 3 3.9500 1.9750 12.0700 5.9250 3.9500 12.0700 3.9500 5.9250 12.0700 1.9750 3.9500 12.0700 1 4 0 1 2 3 1.9750 -0.0000 18.1050 3.9500 1.9750 18.1050 1.9750 3.9500 18.1050 0.0000 1.9750 18.1050 1 4 0 1 2 3 1.9750 7.9000 18.1050 3.9500 5.9250 18.1050 1.9750 3.9500 18.1050 0.0000 5.9250 18.1050 1 4 0 1 2 3 5.9250 -0.0000 18.1050 3.9500 1.9750 18.1050 5.9250 3.9500 18.1050 7.9000 1.9750 18.1050 1 4 0 1 2 3 5.9250 3.9500 18.1050 3.9500 5.9250 18.1050 5.9250 7.9000 18.1050 7.9000 5.9250 18.1050 1 4 0 1 2 3 gamgi0.17.1g/dat/cell/superconductors/s25_Tl2Ba2Ca4Cu5O14.txt0000644000175000017500000000152511773660064022665 0ustar carloscarlosSuperconductor (Tc = 105 K): Tl2Ba2Ca4Cu5O14 Structure: 2245 Space group: 139 Lattice parameters: 3.85 48.2 Wyckoff positions: Ca 8m, x = 0.5 z = 0.0320 Ca 8m, x = 0.5 z = 0.0960 Tl 2e, z = 0.2250 Ba 8m, x = 0.5 z = 0.1680 Cu 1a Cu 2e, z = 0.0640 Cu 2e, z = 0.1280 O 2c O 4g, z = 0.0640 O 4g, z = 0.1280 O 2e, z = 0.1680 O 8m, x = 0.5 z = 0.2250 1. with Cell (s25a.xml): Bond: Color 0.5,0.5,0.5, Scale 0.4 2. with Polytopes (s25b.xml): Cells: 2 x 2 x 2 Neighbours: O Number: 5, 4 References: H. Shaked, P.M. Keane, J.C. Rodriguez, F.F. Owen, R.L. Hitterman, J.D. Jorgensen, Crystal structures of the High-Tc Superconducting Copper-Oxides, Physica C, Elsevier Science, Amsterdam, 1994 (Errata: Tl and O5 are swapped) S. Nakajima, M. Kikuchi, Y. Syono, T. Oku, D. Shindo, K. Hiraga, N. Kobayashi, H. Iwasaki, and Y. Muto, Physica C 158, 471 (1989) gamgi0.17.1g/dat/cell/superconductors/s02_Nd2CuO4-x.txt0000644000175000017500000000106711773652610022063 0ustar carloscarlosSuperconductor (Tc = 24K): (Nd,Ce)2CuO4-x Structure: 0201 T' Space group: 139 Lattice parameters: 3.95 12.07 Wyckoff positions: Nd,Ce 2e, z = 0.3513 Cu 1a O 2c O 2d 1. with Cell (s02a.xml): Bond: Color 0.5,0.5,0.5, Scale 0.4 2. with Polytopes (s02b.xml): Cells: 2 x 2 x 2 Neighbours: O Number: 4 References: H. Shaked, P.M. Keane, J.C. Rodriguez, F.F. Owen, R.L. Hitterman, J.D. Jorgensen, Crystal structures of the High-Tc Superconducting Copper-Oxides, Physica C, Elsevier Science, Amsterdam, 1994 Y. Tokura, H. Takagi, and S. Uchida, Nature 337, 345 (1989) gamgi0.17.1g/dat/cell/superconductors/s10b_Pb2Sr2Cu2O6.xml0000644000175000017500000003516012267063556022420 0ustar carloscarlos 1.8780 5.6341 8.7014 1.8780 5.6341 3.9276 1.8780 7.5122 6.3145 3.7561 5.6341 6.3145 1.8780 3.7561 6.3145 0.0000 5.6341 6.3145 8 3 1 2 3 3 2 0 3 3 0 2 5 3 1 3 4 3 3 0 4 3 2 1 5 3 1 4 5 3 4 0 5 1.8780 1.8780 8.7014 1.8780 1.8780 3.9276 3.7561 1.8780 6.3145 1.8780 0.0000 6.3145 1.8780 3.7561 6.3145 -0.0000 1.8780 6.3145 8 3 1 2 3 3 2 0 3 3 1 3 5 3 0 2 4 3 2 1 4 3 3 0 5 3 0 4 5 3 4 1 5 5.6342 1.8780 3.9276 5.6341 1.8780 8.7014 3.7561 1.8780 6.3145 5.6342 0.0000 6.3145 5.6341 3.7561 6.3145 7.5122 1.8780 6.3145 8 3 1 2 3 3 2 0 3 3 1 3 5 3 0 2 4 3 2 1 4 3 3 0 5 3 0 4 5 3 4 1 5 5.6341 5.6342 8.7014 5.6341 5.6341 3.9276 3.7561 5.6341 6.3145 5.6342 7.5122 6.3145 7.5122 5.6341 6.3145 5.6341 3.7561 6.3145 8 3 1 2 3 3 2 0 3 3 0 2 5 3 1 3 4 3 3 0 4 3 2 1 5 3 1 4 5 3 4 0 5 1.8781 5.6341 21.3304 3.7561 5.6341 18.9435 1.8780 5.6342 16.5566 1.8780 7.5122 18.9435 1.8781 3.7561 18.9435 0.0000 5.6341 18.9435 8 3 1 2 3 3 0 1 3 3 0 3 5 3 1 0 4 3 2 1 4 3 3 2 5 3 2 4 5 3 4 0 5 1.8780 1.8781 21.3304 1.8781 3.7561 18.9435 1.8780 1.8780 16.5566 0.0000 1.8780 18.9435 1.8780 0.0000 18.9435 3.7561 1.8781 18.9435 8 3 1 2 3 3 1 0 5 3 0 1 3 3 0 3 4 3 3 2 4 3 2 1 5 3 0 4 5 3 4 2 5 5.6342 5.6341 21.3304 5.6341 5.6342 16.5566 5.6342 3.7561 18.9435 3.7561 5.6341 18.9435 5.6341 7.5122 18.9435 7.5122 5.6341 18.9435 8 3 1 2 3 3 2 0 3 3 0 2 5 3 1 3 4 3 3 0 4 3 2 1 5 3 1 4 5 3 4 0 5 5.6341 1.8781 21.3304 3.7561 1.8781 18.9435 5.6342 1.8780 16.5566 5.6342 -0.0000 18.9435 5.6342 3.7561 18.9435 7.5122 1.8780 18.9435 8 3 1 2 3 3 0 1 3 3 0 3 5 3 1 0 4 3 2 1 4 3 3 2 5 3 2 4 5 3 4 0 5 gamgi0.17.1g/dat/cell/superconductors/s26_BaCuO2.txt0000644000175000017500000000113511773660021021510 0ustar carloscarlosSuperconductor (Tc = 90K): (Ba,Sr)CuO2 Structure: 0 2 "oo -1" oo Space group: 123 Lattice parameters: 3.93 3.47 Wyckoff positions: Ba,Sr 1d Cu 1a O 2f 1. with Cell (s26a.xml): Bond: Color 0.5,0.5,0.5, Scale 0.4 2. with Polytopes (s26b.xml): Cell Change XYZ: 0.5, 0.5, 0.5 Cells: 2 x 2 x 2 Neighbours: O Number: 4 References: H. Shaked, P.M. Keane, J.C. Rodriguez, F.F. Owen, R.L. Hitterman, J.D. Jorgensen, Crystal structures of the High-Tc Superconducting Copper-Oxides, Physica C, Elsevier Science, Amsterdam, 1994 M. Takano, M. Azuma, Z. Hiroi, Y. Bando, and Y. Takeda, Physica C 176 441 (1991) gamgi0.17.1g/dat/cell/superconductors/s17b_Pb2Sr2YCu3O8.xml0000644000175000017500000005765112267057025022566 0ustar carloscarlos 2.7050 -0.0000 9.3090 5.4100 2.7050 9.3090 2.7050 5.4100 9.3090 2.7050 2.7050 11.8195 0.0000 2.7050 9.3090 5 3 1 2 3 3 0 1 3 4 1 0 4 2 3 0 3 4 3 3 2 4 2.7050 -0.0000 6.4210 0.0000 2.7050 6.4210 2.7050 5.4100 6.4210 2.7050 2.7050 3.9105 5.4100 2.7050 6.4210 5 3 1 2 3 3 0 1 3 4 1 0 4 2 3 0 3 4 3 3 2 4 2.7050 5.4100 9.3090 5.4100 8.1150 9.3090 0.0000 8.1150 9.3090 2.7050 8.1150 11.8195 2.7050 10.8200 9.3090 5 3 2 0 3 3 0 1 3 4 1 0 2 4 3 2 3 4 3 3 1 4 2.7050 5.4100 6.4210 -0.0000 8.1150 6.4210 2.7050 10.8200 6.4210 2.7050 8.1150 3.9105 5.4100 8.1150 6.4210 5 3 1 2 3 3 0 1 3 4 1 0 4 2 3 0 3 4 3 3 2 4 2.7050 -0.0000 22.1510 0.0000 2.7050 22.1510 5.4100 2.7050 22.1510 2.7050 2.7050 19.6405 2.7050 5.4100 22.1510 5 3 2 0 3 3 0 1 3 4 1 0 2 4 3 2 3 4 3 3 1 4 2.7050 5.4100 22.1510 0.0000 8.1150 22.1510 5.4100 8.1150 22.1510 2.7050 8.1150 19.6405 2.7050 10.8200 22.1510 5 3 2 0 3 3 0 1 3 4 1 0 2 4 3 2 3 4 3 3 1 4 5.4100 8.1150 25.0390 2.7050 10.8200 25.0390 2.7050 5.4100 25.0390 2.7050 8.1150 27.5495 0.0000 8.1150 25.0390 5 3 2 0 3 3 0 1 3 4 1 0 2 4 3 2 3 4 3 3 1 4 8.1150 5.4100 6.4210 5.4100 8.1150 6.4210 8.1150 10.8200 6.4210 8.1150 8.1150 3.9105 10.8200 8.1150 6.4210 5 3 1 2 3 3 0 1 3 4 1 0 4 2 3 0 3 4 3 3 2 4 2.7050 5.4100 25.0390 2.7050 -0.0000 25.0390 5.4100 2.7050 25.0390 2.7050 2.7050 27.5495 0.0000 2.7050 25.0390 5 3 1 2 3 3 2 0 3 4 1 4 0 2 3 1 3 4 3 3 0 4 5.4100 2.7050 6.4210 8.1150 5.4100 6.4210 8.1150 0.0000 6.4210 8.1150 2.7050 3.9105 10.8200 2.7050 6.4210 5 3 2 0 3 3 0 1 3 4 1 0 2 4 3 2 3 4 3 3 1 4 10.8200 2.7050 9.3090 8.1150 5.4100 9.3090 8.1150 -0.0000 9.3090 8.1150 2.7050 11.8195 5.4100 2.7050 9.3090 5 3 2 0 3 3 0 1 3 4 1 0 2 4 3 2 3 4 3 3 1 4 5.4100 8.1150 9.3090 8.1150 5.4100 9.3090 8.1150 10.8200 9.3090 8.1150 8.1150 11.8195 10.8200 8.1150 9.3090 5 3 2 0 3 3 0 1 3 4 1 0 2 4 3 2 3 4 3 3 1 4 8.1150 -0.0000 25.0390 8.1150 5.4100 25.0390 5.4100 2.7050 25.0390 8.1150 2.7050 27.5495 10.8200 2.7050 25.0390 5 3 1 2 3 3 2 0 3 4 1 4 0 2 3 1 3 4 3 3 0 4 8.1150 -0.0000 22.1510 8.1150 5.4100 22.1510 10.8200 2.7050 22.1510 8.1150 2.7050 19.6405 5.4100 2.7050 22.1510 5 3 1 2 3 3 2 0 3 4 1 4 0 2 3 1 3 4 3 3 0 4 8.1150 10.8200 25.0390 5.4100 8.1150 25.0390 8.1150 5.4100 25.0390 8.1150 8.1150 27.5495 10.8200 8.1150 25.0390 5 3 1 2 3 3 0 1 3 4 1 0 4 2 3 0 3 4 3 3 2 4 10.8200 8.1150 22.1510 8.1150 5.4100 22.1510 5.4100 8.1150 22.1510 8.1150 8.1150 19.6405 8.1150 10.8200 22.1510 5 3 1 2 3 3 0 1 3 4 1 0 4 2 3 0 3 4 3 3 2 4 gamgi0.17.1g/dat/cell/superconductors/s03a_Nd2CuO4.xml0000644000175000017500000002643311745360235021743 0ustar carloscarlos gamgi0.17.1g/dat/cell/superconductors/s18a_PbBaYSrCu3O8.xml0000644000175000017500000005564012007052607022652 0ustar carloscarlos gamgi0.17.1g/dat/cell/superconductors/README0000644000175000017500000000005711753770726020140 0ustar carloscarlosN2 (P = 1 atm) melting T: 63 K boiling T: 77 K gamgi0.17.1g/dat/cell/superconductors/s18b_PbBaYSrCu3O8.xml0000644000175000017500000006447012267056660022667 0ustar carloscarlos 1.9210 5.7630 19.3620 1.9210 3.8420 17.0939 -0.0000 5.7630 17.0939 1.9210 7.6840 17.0939 3.8420 5.7630 17.0939 5 4 1 2 3 4 3 2 0 3 3 1 0 2 3 0 1 4 3 3 0 4 1.9210 1.9210 19.3620 3.8420 1.9210 17.0939 -0.0000 1.9210 17.0939 1.9210 3.8420 17.0939 1.9210 -0.0000 17.0939 5 4 1 4 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 5.7630 1.9210 19.3620 3.8420 1.9210 17.0939 5.7630 3.8420 17.0939 5.7630 -0.0000 17.0939 7.6840 1.9210 17.0939 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 5.7630 5.7630 19.3620 7.6840 5.7630 17.0939 3.8420 5.7630 17.0939 5.7630 7.6840 17.0939 5.7630 3.8420 17.0939 5 4 1 4 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 3.8420 3.8420 22.1280 3.8420 5.7630 24.3961 1.9210 3.8420 24.3961 5.7630 3.8420 24.3961 3.8420 1.9210 24.3961 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 3.8420 3.8420 33.1920 5.7630 3.8420 30.9239 1.9210 3.8420 30.9239 3.8420 5.7630 30.9239 3.8420 1.9210 30.9239 5 4 1 4 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 1.9210 1.9210 35.9580 3.8420 1.9210 38.2261 1.9210 3.8420 38.2261 1.9210 0.0000 38.2261 -0.0000 1.9210 38.2261 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 1.9210 5.7630 35.9580 1.9210 7.6840 38.2261 -0.0000 5.7630 38.2261 3.8420 5.7630 38.2261 1.9210 3.8420 38.2261 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 5.7630 5.7630 35.9580 3.8420 5.7630 38.2261 7.6840 5.7630 38.2261 5.7630 7.6840 38.2261 5.7630 3.8420 38.2261 5 4 1 4 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 5.7630 1.9210 35.9580 3.8420 1.9210 38.2261 5.7630 0.0000 38.2261 5.7630 3.8420 38.2261 7.6840 1.9210 38.2261 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 1.9210 3.8420 13.8300 3.8420 5.7630 13.8300 1.9210 7.6840 13.8300 -0.0000 5.7630 13.8300 1 4 0 1 2 3 3.8420 1.9210 13.8300 1.9210 0.0000 13.8300 -0.0000 1.9210 13.8300 1.9210 3.8420 13.8300 1 4 0 1 2 3 5.7630 3.8420 13.8300 7.6840 1.9210 13.8300 5.7630 0.0000 13.8300 3.8420 1.9210 13.8300 1 4 0 1 2 3 5.7630 7.6840 13.8300 3.8420 5.7630 13.8300 5.7630 3.8420 13.8300 7.6840 5.7630 13.8300 1 4 0 1 2 3 5.7630 3.8420 27.6600 3.8420 1.9210 27.6600 1.9210 3.8420 27.6600 3.8420 5.7630 27.6600 1 4 0 1 2 3 1.9210 3.8420 41.4900 -0.0000 5.7630 41.4900 1.9210 7.6840 41.4900 3.8420 5.7630 41.4900 1 4 0 1 2 3 3.8420 5.7630 41.4900 5.7630 3.8420 41.4900 7.6840 5.7630 41.4900 5.7630 7.6840 41.4900 1 4 0 1 2 3 -0.0000 1.9210 41.4900 1.9210 3.8420 41.4900 3.8420 1.9210 41.4900 1.9210 0.0000 41.4900 1 4 0 1 2 3 5.7630 0.0000 41.4900 7.6840 1.9210 41.4900 5.7630 3.8420 41.4900 3.8420 1.9210 41.4900 1 4 0 1 2 3 gamgi0.17.1g/dat/cell/superconductors/s07a_TlCO3Sr4Cu2O7.xml0000644000175000017500000004031611753763407022671 0ustar carloscarlos gamgi0.17.1g/dat/cell/superconductors/s19a_TlBa2Ca2Cu3O9+x.xml0000644000175000017500000003665211745604174023123 0ustar carloscarlos gamgi0.17.1g/dat/cell/superconductors/s08b_Tl2Ba2CuO6.xml0000644000175000017500000004322712267061101022304 0ustar carloscarlos 1.9318 5.7955 14.2838 1.9318 3.8637 11.5696 1.9318 5.7955 8.8554 3.8637 5.7955 11.5696 1.9318 7.7274 11.5696 -0.0000 5.7955 11.5696 8 3 1 2 3 3 1 0 5 3 0 1 3 3 0 3 4 3 3 2 4 3 2 1 5 3 0 4 5 3 4 2 5 5.7955 5.7955 8.8554 5.7955 5.7955 14.2838 5.7956 7.7274 11.5696 3.8637 5.7955 11.5696 5.7955 3.8637 11.5696 7.7274 5.7955 11.5696 8 3 1 2 3 3 2 0 3 3 0 2 5 3 1 3 4 3 3 0 4 3 2 1 5 3 1 4 5 3 4 0 5 1.9318 1.9318 14.2838 1.9318 -0.0000 11.5696 1.9318 1.9318 8.8554 3.8637 1.9318 11.5696 1.9318 3.8637 11.5696 -0.0000 1.9318 11.5696 8 3 1 2 3 3 1 0 5 3 0 1 3 3 0 3 4 3 3 2 4 3 2 1 5 3 0 4 5 3 4 2 5 5.7955 1.9318 14.2838 5.7955 -0.0000 11.5696 5.7955 1.9318 8.8554 7.7274 1.9318 11.5696 3.8637 1.9318 11.5696 5.7955 3.8637 11.5696 8 3 1 2 3 3 0 1 3 3 0 3 5 3 1 0 4 3 2 1 4 3 3 2 5 3 2 4 5 3 4 0 5 3.8637 3.8637 25.8534 3.8637 3.8637 20.4250 3.8637 1.9318 23.1392 1.9318 3.8637 23.1392 5.7955 3.8637 23.1392 3.8637 5.7955 23.1392 8 3 1 2 3 3 2 0 3 3 1 3 5 3 0 2 4 3 2 1 4 3 3 0 5 3 0 4 5 3 4 1 5 1.9318 5.7955 31.9946 1.9318 7.7274 34.7088 1.9318 5.7955 37.4230 3.8637 5.7955 34.7088 -0.0000 5.7955 34.7088 1.9318 3.8637 34.7088 8 3 1 2 3 3 0 1 3 3 0 3 5 3 1 0 4 3 2 1 4 3 3 2 5 3 2 4 5 3 4 0 5 5.7955 5.7955 31.9946 5.7955 3.8637 34.7088 5.7955 5.7955 37.4230 3.8637 5.7955 34.7088 7.7274 5.7955 34.7088 5.7955 7.7274 34.7088 8 3 1 2 3 3 0 1 3 3 0 3 5 3 1 0 4 3 2 1 4 3 3 2 5 3 2 4 5 3 4 0 5 1.9318 1.9318 31.9946 1.9318 1.9318 37.4230 1.9318 -0.0000 34.7088 3.8637 1.9318 34.7088 -0.0000 1.9318 34.7088 1.9318 3.8637 34.7088 8 3 1 2 3 3 2 0 3 3 1 3 5 3 0 2 4 3 2 1 4 3 3 0 5 3 0 4 5 3 4 1 5 5.7955 1.9318 31.9946 7.7274 1.9318 34.7088 5.7955 1.9318 37.4230 5.7955 -0.0000 34.7088 3.8637 1.9318 34.7088 5.7955 3.8637 34.7088 8 3 1 2 3 3 1 0 5 3 0 1 3 3 0 3 4 3 3 2 4 3 2 1 5 3 0 4 5 3 4 2 5 gamgi0.17.1g/dat/cell/superconductors/s10_Pb2Sr2Cu2O6.txt0000644000175000017500000000141111773653014022260 0ustar carloscarlosSuperconductor (Tc = 32K): Pb2(Sr,La)2Cu2O6 Structure: 3201 Space group: 53 Lattice parameters: 5.3119 5.4140 12.629 Wyckoff positions: Pb 2g, z = 0.3603 Sr,La 2h, z = 0.1384 Cu 1a, Cu 1d, O 2f, O 2g, z = 0.1890 O 2h, z = 0.3510 Change group: 53 -> 123 Change parameters: 5.3119 5.4140 -> 3.7561 1. with Cell (s10a.xml): Bond: Color 0.5,0.5,0.5, Scale 0.4 2. with Polytopes (s10b.xml): Cells: 2 x 2 x 2 Neighbours: O Number: 6 References: H. Shaked, P.M. Keane, J.C. Rodriguez, F.F. Owen, R.L. Hitterman, J.D. Jorgensen, Crystal structures of the High-Tc Superconducting Copper-Oxides, Physica C, Elsevier Science, Amsterdam, 1994 (Errata: data -> O4 is missing; image -> O4 and Bi are swapped) F.J.M. Benschop, W.T. Fu, and W.J.A. Maaskant, Physica C 184, 311 (1991) gamgi0.17.1g/dat/cell/superconductors/s14a_Tl2Ba2CaCu2O8.xml0000644000175000017500000006044311766451434022646 0ustar carloscarlos gamgi0.17.1g/dat/cell/superconductors/s09a_Bi2Sr2Gd2Cu2O10.xml0000644000175000017500000004026311754273174023027 0ustar carloscarlos gamgi0.17.1g/dat/cell/superconductors/s12b_TlBa2CaCu2O7-x.xml0000644000175000017500000005703612267057315023030 0ustar carloscarlos 1.9283 1.9283 10.7401 1.9283 0.0000 7.9202 0.0000 1.9283 7.9202 3.8566 1.9283 7.9202 1.9283 3.8566 7.9202 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 1.9283 1.9283 2.0139 1.9283 3.8566 4.8338 0.0000 1.9283 4.8338 1.9283 -0.0000 4.8338 3.8566 1.9283 4.8338 5 4 1 2 3 4 3 2 0 3 3 1 0 2 3 0 1 4 3 3 0 4 1.9283 5.7849 10.7401 1.9283 3.8566 7.9202 0.0000 5.7849 7.9202 1.9283 7.7132 7.9202 3.8566 5.7849 7.9202 5 4 1 2 3 4 3 2 0 3 3 1 0 2 3 0 1 4 3 3 0 4 1.9283 5.7849 2.0139 1.9283 3.8566 4.8338 3.8566 5.7849 4.8338 0.0000 5.7849 4.8338 1.9283 7.7132 4.8338 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 1.9283 5.7849 14.7679 1.9283 7.7132 17.5878 -0.0000 5.7849 17.5878 1.9283 3.8566 17.5878 3.8566 5.7849 17.5878 5 4 1 2 3 4 3 2 0 3 3 1 0 2 3 0 1 4 3 3 0 4 5.7849 1.9283 2.0139 5.7849 3.8566 4.8338 3.8566 1.9283 4.8338 5.7849 -0.0000 4.8338 7.7132 1.9283 4.8338 5 4 1 2 3 4 3 2 0 3 3 1 0 2 3 0 1 4 3 3 0 4 5.7849 5.7849 2.0139 5.7849 3.8566 4.8338 7.7132 5.7849 4.8338 5.7849 7.7132 4.8338 3.8566 5.7849 4.8338 5 4 1 2 3 4 3 2 0 3 3 1 0 2 3 0 1 4 3 3 0 4 5.7849 5.7849 10.7401 3.8566 5.7849 7.9202 5.7849 7.7132 7.9202 7.7132 5.7849 7.9202 5.7849 3.8566 7.9202 5 4 1 2 3 4 3 2 0 3 3 1 0 2 3 0 1 4 3 3 0 4 1.9283 1.9283 14.7679 1.9283 3.8566 17.5878 -0.0000 1.9283 17.5878 3.8566 1.9283 17.5878 1.9283 0.0000 17.5878 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 1.9283 1.9283 23.4941 -0.0000 1.9283 20.6742 1.9283 3.8566 20.6742 3.8566 1.9283 20.6742 1.9283 0.0000 20.6742 5 4 1 2 3 4 3 2 0 3 3 1 0 2 3 0 1 4 3 3 0 4 1.9283 5.7849 23.4941 1.9283 3.8566 20.6742 -0.0000 5.7849 20.6742 3.8566 5.7849 20.6742 1.9283 7.7132 20.6742 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 5.7849 1.9283 10.7401 5.7849 0.0000 7.9202 5.7849 3.8566 7.9202 7.7132 1.9283 7.9202 3.8566 1.9283 7.9202 5 4 1 4 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 5.7849 1.9283 23.4941 5.7849 0.0000 20.6742 5.7849 3.8566 20.6742 7.7132 1.9283 20.6742 3.8566 1.9283 20.6742 5 4 1 4 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 5.7849 1.9283 14.7679 7.7132 1.9283 17.5878 5.7849 3.8566 17.5878 3.8566 1.9283 17.5878 5.7849 0.0000 17.5878 5 4 1 2 3 4 3 2 0 3 3 1 0 2 3 0 1 4 3 3 0 4 5.7849 5.7849 23.4941 5.7849 3.8566 20.6742 3.8566 5.7849 20.6742 5.7849 7.7132 20.6742 7.7132 5.7849 20.6742 5 4 1 2 3 4 3 2 0 3 3 1 0 2 3 0 1 4 3 3 0 4 5.7849 5.7849 14.7679 5.7849 3.8566 17.5878 7.7132 5.7849 17.5878 3.8566 5.7849 17.5878 5.7849 7.7132 17.5878 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 gamgi0.17.1g/dat/cell/superconductors/s06a_Eu2Ba2Cu3O10-x.xml0000644000175000017500000007274411745357723022726 0ustar carloscarlos gamgi0.17.1g/dat/cell/superconductors/s14b_Tl2Ba2CaCu2O8.xml0000644000175000017500000007403012267055141022634 0ustar carloscarlos 1.9275 1.9275 10.3756 1.9275 3.8550 13.1022 -0.0000 1.9275 13.1022 1.9275 0.0000 13.1022 3.8550 1.9275 13.1022 5 4 1 2 3 4 3 2 0 3 3 1 0 2 3 0 1 4 3 3 0 4 1.9275 1.9275 18.9424 -0.0000 1.9275 16.2158 1.9275 3.8550 16.2158 1.9275 0.0000 16.2158 3.8550 1.9275 16.2158 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 1.9275 5.7825 10.3756 -0.0000 5.7825 13.1022 1.9275 3.8550 13.1022 1.9275 7.7100 13.1022 3.8550 5.7825 13.1022 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 1.9275 5.7825 18.9424 1.9275 3.8550 16.2158 -0.0000 5.7825 16.2158 3.8550 5.7825 16.2158 1.9275 7.7100 16.2158 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 5.7825 1.9275 10.3756 5.7825 3.8550 13.1022 3.8550 1.9275 13.1022 7.7100 1.9275 13.1022 5.7825 0.0000 13.1022 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 5.7825 5.7825 10.3756 3.8550 5.7825 13.1022 7.7100 5.7825 13.1022 5.7825 7.7100 13.1022 5.7825 3.8550 13.1022 5 4 1 4 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 5.7825 5.7825 18.9424 7.7100 5.7825 16.2158 3.8550 5.7825 16.2158 5.7825 7.7100 16.2158 5.7825 3.8550 16.2158 5 4 1 4 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 3.8550 3.8550 25.0346 3.8550 5.7825 27.7612 1.9275 3.8550 27.7612 3.8550 1.9275 27.7612 5.7825 3.8550 27.7612 5 4 1 2 3 4 3 2 0 3 3 1 0 2 3 0 1 4 3 3 0 4 1.9275 5.7825 39.6936 1.9275 7.7100 42.4202 -0.0000 5.7825 42.4202 1.9275 3.8550 42.4202 3.8550 5.7825 42.4202 5 4 1 2 3 4 3 2 0 3 3 1 0 2 3 0 1 4 3 3 0 4 5.7825 1.9275 18.9424 3.8550 1.9275 16.2158 5.7825 3.8550 16.2158 7.7100 1.9275 16.2158 5.7825 0.0000 16.2158 5 4 1 2 3 4 3 2 0 3 3 1 0 2 3 0 1 4 3 3 0 4 3.8550 3.8550 33.6014 1.9275 3.8550 30.8748 3.8550 5.7825 30.8748 3.8550 1.9275 30.8748 5.7825 3.8550 30.8748 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 1.9275 1.9275 39.6936 1.9275 3.8550 42.4202 -0.0000 1.9275 42.4202 1.9275 0.0000 42.4202 3.8550 1.9275 42.4202 5 4 1 2 3 4 3 2 0 3 3 1 0 2 3 0 1 4 3 3 0 4 1.9275 1.9275 48.2604 1.9275 3.8550 45.5338 3.8550 1.9275 45.5338 -0.0000 1.9275 45.5338 1.9275 0.0000 45.5338 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 1.9275 5.7825 48.2604 1.9275 7.7100 45.5338 3.8550 5.7825 45.5338 -0.0000 5.7825 45.5338 1.9275 3.8550 45.5338 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 5.7825 1.9275 39.6936 5.7825 0.0000 42.4202 5.7825 3.8550 42.4202 3.8550 1.9275 42.4202 7.7100 1.9275 42.4202 5 4 1 4 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 5.7825 1.9275 48.2604 3.8550 1.9275 45.5338 5.7825 3.8550 45.5338 5.7825 0.0000 45.5338 7.7100 1.9275 45.5338 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 5.7825 5.7825 39.6936 5.7825 7.7100 42.4202 3.8550 5.7825 42.4202 5.7825 3.8550 42.4202 7.7100 5.7825 42.4202 5 4 1 2 3 4 3 2 0 3 3 1 0 2 3 0 1 4 3 3 0 4 5.7825 5.7825 48.2604 7.7100 5.7825 45.5338 3.8550 5.7825 45.5338 5.7825 7.7100 45.5338 5.7825 3.8550 45.5338 5 4 1 4 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 gamgi0.17.1g/dat/cell/superconductors/s12_TlBa2CaCu2O7-x.txt0000644000175000017500000000142311773653057022700 0ustar carloscarlosSuperconductor (Tc = 103 K): TlBa2CaCu2O7-x Structure: 1212 Space group: 123 Lattice parameters: 3.8566 12.754 Wyckoff positions: Ba 2h, z = 0.2842 Tl 1b Ca 1c Cu 2g, z = 0.1255 O 4i, z = 0.1210 O 2g, z = 0.3421 O 1d 1. with Cell (s12a.xml): Bond: Color 0.5,0.5,0.5, Scale 0.4 2. with Polytopes (s12b.xml): Cell Change XYZ: 0.5, 0.5, 0.5 Cells: 2 x 2 x 2 Neighbours: O Number: 5 References: H. Shaked, P.M. Keane, J.C. Rodriguez, F.F. Owen, R.L. Hitterman, J.D. Jorgensen, Crystal structures of the High-Tc Superconducting Copper-Oxides, Physica C, Elsevier Science, Amsterdam, 1994 (Errata: data -> O4 is missing; image -> O4 and Bi are swapped) B. Morosin, D.S. Ginley, P.F.Hlava, M.J. Carr, R.J. Baughman, J.E. Schirber, E.L. Venturini, and J.F. Kwak Physica C 152, 413 (1988) gamgi0.17.1g/dat/cell/superconductors/s03b_Nd2CuO4.xml0000644000175000017500000003434412267064001021734 0ustar carloscarlos 1.9300 5.7900 8.5013 -0.0000 5.7900 6.1100 1.9300 7.7200 6.1100 1.9300 3.8600 6.1100 3.8600 5.7900 6.1100 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 5.7900 5.7900 8.5013 5.7900 3.8600 6.1100 3.8600 5.7900 6.1100 5.7900 7.7200 6.1100 7.7200 5.7900 6.1100 5 4 1 2 3 4 3 2 0 3 3 1 0 2 3 0 1 4 3 3 0 4 5.7900 5.7900 21.0013 3.8600 5.7900 18.6100 5.7900 7.7200 18.6100 7.7200 5.7900 18.6100 5.7900 3.8600 18.6100 5 4 1 2 3 4 3 2 0 3 3 1 0 2 3 0 1 4 3 3 0 4 5.7900 1.9300 8.5013 3.8600 1.9300 6.1100 5.7900 3.8600 6.1100 7.7200 1.9300 6.1100 5.7900 -0.0000 6.1100 5 4 1 2 3 4 3 2 0 3 3 1 0 2 3 0 1 4 3 3 0 4 3.8600 3.8600 10.2738 3.8600 5.7900 12.6650 1.9300 3.8600 12.6650 3.8600 1.9300 12.6650 5.7900 3.8600 12.6650 5 4 1 2 3 4 3 2 0 3 3 1 0 2 3 0 1 4 3 3 0 4 1.9300 5.7900 21.0013 -0.0000 5.7900 18.6100 1.9300 7.7200 18.6100 1.9300 3.8600 18.6100 3.8600 5.7900 18.6100 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 1.9300 1.9300 8.5013 -0.0000 1.9300 6.1100 1.9300 3.8600 6.1100 3.8600 1.9300 6.1100 1.9300 -0.0000 6.1100 5 4 1 2 3 4 3 2 0 3 3 1 0 2 3 0 1 4 3 3 0 4 1.9300 1.9300 21.0013 -0.0000 1.9300 18.6100 1.9300 3.8600 18.6100 1.9300 -0.0000 18.6100 3.8600 1.9300 18.6100 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 5.7900 1.9300 21.0013 3.8600 1.9300 18.6100 5.7900 3.8600 18.6100 5.7900 -0.0000 18.6100 7.7200 1.9300 18.6100 5 4 1 2 4 3 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 gamgi0.17.1g/dat/cell/superconductors/s25a_Tl2Ba2Ca4Cu5O14.xml0000644000175000017500000013055111756242161023004 0ustar carloscarlos gamgi0.17.1g/dat/cell/superconductors/s12a_TlBa2CaCu2O7-x.xml0000644000175000017500000002441211756243163023017 0ustar carloscarlos gamgi0.17.1g/dat/cell/superconductors/s07b_TlCO3Sr4Cu2O7.xml0000644000175000017500000006755012267057741022701 0ustar carloscarlos 1.9100 5.7300 1.4207 1.9100 5.7300 6.2611 0.0000 5.7300 3.6840 1.9100 3.8200 3.6840 1.9100 7.6400 3.6840 3.8200 5.7300 3.6840 8 3 1 2 3 3 2 0 3 3 1 3 5 3 0 2 4 3 2 1 4 3 3 0 5 3 0 4 5 3 4 1 5 1.9100 1.9100 1.4207 1.9100 3.8200 3.6840 1.9100 1.9100 6.2611 3.8200 1.9100 3.6840 0.0000 1.9100 3.6840 1.9100 -0.0000 3.6840 8 3 1 2 3 3 0 1 3 3 0 3 5 3 1 0 4 3 2 1 4 3 3 2 5 3 2 4 5 3 4 0 5 1.9100 1.9100 15.0993 1.9100 1.9100 10.2589 3.8200 1.9100 12.8360 1.9100 -0.0000 12.8360 1.9100 3.8200 12.8360 0.0000 1.9100 12.8360 8 3 1 2 3 3 2 0 3 3 1 3 5 3 0 2 4 3 2 1 4 3 3 0 5 3 0 4 5 3 4 1 5 1.9100 5.7300 15.0993 -0.0000 5.7300 12.8360 1.9100 5.7300 10.2589 1.9100 3.8200 12.8360 1.9100 7.6400 12.8360 3.8200 5.7300 12.8360 8 3 1 2 3 3 0 1 3 3 0 3 5 3 1 0 4 3 2 1 4 3 3 2 5 3 2 4 5 3 4 0 5 1.9100 5.7300 17.9407 1.9100 5.7300 22.7811 1.9100 3.8200 20.2040 3.8200 5.7300 20.2040 -0.0000 5.7300 20.2040 1.9100 7.6400 20.2040 8 3 1 2 3 3 2 0 3 3 1 3 5 3 0 2 4 3 2 1 4 3 3 0 5 3 0 4 5 3 4 1 5 5.7300 1.9100 1.4207 5.7300 3.8200 3.6840 5.7300 1.9100 6.2611 7.6400 1.9100 3.6840 5.7300 -0.0000 3.6840 3.8200 1.9100 3.6840 8 3 1 2 3 3 1 0 5 3 0 1 3 3 0 3 4 3 3 2 4 3 2 1 5 3 0 4 5 3 4 2 5 5.7300 5.7300 1.4207 5.7300 5.7300 6.2611 3.8200 5.7300 3.6840 5.7300 3.8200 3.6840 7.6400 5.7300 3.6840 5.7300 7.6400 3.6840 8 3 1 2 3 3 2 0 3 3 0 2 5 3 1 3 4 3 3 0 4 3 2 1 5 3 1 4 5 3 4 0 5 5.7300 5.7300 15.0993 5.7300 5.7300 10.2589 5.7300 3.8200 12.8360 3.8200 5.7300 12.8360 5.7300 7.6400 12.8360 7.6400 5.7300 12.8360 8 3 1 2 3 3 2 0 3 3 0 2 5 3 1 3 4 3 3 0 4 3 2 1 5 3 1 4 5 3 4 0 5 1.9100 1.9100 17.9407 -0.0000 1.9100 20.2040 1.9100 1.9100 22.7811 1.9100 3.8200 20.2040 3.8200 1.9100 20.2040 1.9100 0.0000 20.2040 8 3 1 2 3 3 1 0 5 3 0 1 3 3 0 3 4 3 3 2 4 3 2 1 5 3 0 4 5 3 4 2 5 1.9100 1.9100 31.6193 1.9100 1.9100 26.7789 -0.0000 1.9100 29.3560 1.9100 3.8200 29.3560 3.8200 1.9100 29.3560 1.9100 0.0000 29.3560 8 3 1 2 3 3 2 0 3 3 0 2 5 3 1 3 4 3 3 0 4 3 2 1 5 3 1 4 5 3 4 0 5 1.9100 5.7300 31.6193 1.9100 7.6400 29.3560 1.9100 5.7300 26.7789 -0.0000 5.7300 29.3560 1.9100 3.8200 29.3560 3.8200 5.7300 29.3560 8 3 1 2 3 3 1 0 5 3 0 1 3 3 0 3 4 3 3 2 4 3 2 1 5 3 0 4 5 3 4 2 5 5.7300 1.9100 15.0993 5.7300 0.0000 12.8360 5.7300 1.9100 10.2589 7.6400 1.9100 12.8360 5.7300 3.8200 12.8360 3.8200 1.9100 12.8360 8 3 1 2 3 3 1 0 5 3 0 1 3 3 0 3 4 3 3 2 4 3 2 1 5 3 0 4 5 3 4 2 5 5.7300 1.9100 17.9407 5.7300 1.9100 22.7811 7.6400 1.9100 20.2040 5.7300 3.8200 20.2040 5.7300 0.0000 20.2040 3.8200 1.9100 20.2040 8 3 1 2 3 3 2 0 3 3 1 3 5 3 0 2 4 3 2 1 4 3 3 0 5 3 0 4 5 3 4 1 5 5.7300 5.7300 17.9407 5.7300 5.7300 22.7811 3.8200 5.7300 20.2040 5.7300 3.8200 20.2040 5.7300 7.6400 20.2040 7.6400 5.7300 20.2040 8 3 1 2 3 3 2 0 3 3 1 3 5 3 0 2 4 3 2 1 4 3 3 0 5 3 0 4 5 3 4 1 5 5.7300 5.7300 31.6193 5.7300 7.6400 29.3560 5.7300 5.7300 26.7789 3.8200 5.7300 29.3560 5.7300 3.8200 29.3560 7.6400 5.7300 29.3560 8 3 1 2 3 3 1 0 5 3 0 1 3 3 0 3 4 3 3 2 4 3 2 1 5 3 0 4 5 3 4 2 5 5.7300 1.9100 31.6193 7.6400 1.9100 29.3560 5.7300 1.9100 26.7789 5.7300 3.8200 29.3560 5.7300 0.0000 29.3560 3.8200 1.9100 29.3560 8 3 1 2 3 3 0 1 3 3 0 3 5 3 1 0 4 3 2 1 4 3 3 2 5 3 2 4 5 3 4 0 5 gamgi0.17.1g/dat/cell/superconductors/s01_La2CuO4.txt0000644000175000017500000000122011773652566021611 0ustar carloscarlosSuperconductor (Tc = 38K): (La,Ba)2CuO4 Structure: 0201 Space group: 139 Lattice parameters: 3.7873 13.2883 Wyckoff positions: La,Ba 2e, z = 0.3606 Cu 1a O 2c O 2e, z = 0.1828 1. with Cell (s01a.xml): Bond: Color 0.5,0.5,0.5, Scale 0.4 2. with Polytopes (s01b.xml): Cells: 2 x 2 x 2 Neighbours: O Number: 6 References: H. Shaked, P.M. Keane, J.C. Rodriguez, F.F. Owen, R.L. Hitterman, J.D. Jorgensen, Crystal structures of the High-Tc Superconducting Copper-Oxides, Physica C, Elsevier Science, Amsterdam, 1994 J.D. Jorgensen, H.-B. Schuttler, D.G. Hinks, D.W. Capone II, K. Zhang, M.B. Brodsky, and D.J. Scalapino, Phys. Rev. Lett. 58, 1024 (1987) gamgi0.17.1g/dat/cell/superconductors/s05a_PbEu2Sr2Cu2O9.xml0000644000175000017500000006430711745357647022734 0ustar carloscarlos gamgi0.17.1g/dat/cell/superconductors/s09b_Bi2Sr2Gd2Cu2O10.xml0000644000175000017500000003603312267060517023023 0ustar carloscarlos 3.8500 1.9250 24.0665 5.7750 0.0000 24.0665 5.7750 3.8500 24.0665 5.7750 1.9250 25.8724 7.7000 1.9250 24.0665 5 3 2 0 3 3 0 1 3 4 1 0 2 4 3 2 3 4 3 3 1 4 3.8500 5.7750 24.0665 5.7750 3.8500 24.0665 5.7750 7.7000 24.0665 5.7750 5.7750 25.8724 7.7000 5.7750 24.0665 5 3 2 0 3 3 0 1 3 4 1 0 2 4 3 2 3 4 3 3 1 4 3.8500 1.9250 6.1865 5.7750 0.0000 6.1865 5.7750 3.8500 6.1865 5.7750 1.9250 7.9924 7.7000 1.9250 6.1865 5 3 2 0 3 3 0 1 3 4 1 0 2 4 3 2 3 4 3 3 1 4 -0.0000 1.9250 24.0665 1.9250 0.0000 24.0665 1.9250 3.8500 24.0665 1.9250 1.9250 25.8724 3.8500 1.9250 24.0665 5 3 2 0 3 3 0 1 3 4 1 0 2 4 3 2 3 4 3 3 1 4 -0.0000 5.7750 24.0665 1.9250 3.8500 24.0665 3.8500 5.7750 24.0665 1.9250 5.7750 25.8724 1.9250 7.7000 24.0665 5 3 1 2 3 3 0 1 3 4 1 0 4 2 3 0 3 4 3 3 2 4 5.7750 3.8500 17.8800 3.8500 1.9250 17.8800 1.9250 3.8500 17.8800 3.8500 3.8500 16.0741 3.8500 5.7750 17.8800 5 3 1 2 3 3 0 1 3 4 1 0 4 2 3 0 3 4 3 3 2 4 3.8500 5.7750 6.1865 5.7750 3.8500 6.1865 7.7000 5.7750 6.1865 5.7750 5.7750 7.9924 5.7750 7.7000 6.1865 5 3 1 2 3 3 0 1 3 4 1 0 4 2 3 0 3 4 3 3 2 4 3.8500 1.9250 6.1865 1.9250 3.8500 6.1865 1.9250 0.0000 6.1865 1.9250 1.9250 7.9924 -0.0000 1.9250 6.1865 5 3 2 0 3 3 0 1 3 4 1 0 2 4 3 2 3 4 3 3 1 4 3.8500 5.7750 6.1865 -0.0000 5.7750 6.1865 1.9250 3.8500 6.1865 1.9250 5.7750 7.9924 1.9250 7.7000 6.1865 5 3 1 2 3 3 2 0 3 4 1 4 0 2 3 1 3 4 3 3 0 4 gamgi0.17.1g/dat/cell/superconductors/s13_YBa2Cu3O7-x.txt0000644000175000017500000000140211773653107022260 0ustar carloscarlosSuperconductor (Tc = 92K): YBa2Cu3O7-x Structure: 1212 C Space group: 47 Lattice parameters: 3.8227 3.8872 11.6802 Wyckoff positions: Y 1h Ba 2t, z = 0.1843 Cu 1a Cu 2q, z = 0.3556 O 1e O 2s, z = 0.3779 O 2r, z = 0.379 O 2q, z = 0.159 1. with Cell (s13a.xml): Radius: Half-Distance, Size: 1.0, Variancy: 1.0, Scale: 0.25 2. with Polytopes (s13b.xml): Cell Change XYZ: 0.5, 0.5, 0.0 Cells: 2 x 2 x 2 Neighbours: O Number: 5, 4 References: H. Shaked, P.M. Keane, J.C. Rodriguez, F.F. Owen, R.L. Hitterman, J.D. Jorgensen, Crystal structures of the High-Tc Superconducting Copper-Oxides, Physica C, Elsevier Science, Amsterdam, 1994 J.D. Jorgensen, B.W. Veal, A.P. Paulikas, L.J. Nowicki, G.W. Crabtree, H. Claus, and W.K. Kwok, Phys. Rev. B. 41, 1863 (1990) gamgi0.17.1g/dat/cell/superconductors/s01a_La2CuO4.xml0000644000175000017500000003400311745360415021724 0ustar carloscarlos gamgi0.17.1g/dat/cell/superconductors/s17a_Pb2Sr2YCu3O8.xml0000644000175000017500000002312312007053125022535 0ustar carloscarlos gamgi0.17.1g/dat/cell/superconductors/s14_Tl2Ba2CaCu2O8.txt0000644000175000017500000000161211773653141022512 0ustar carloscarlosSuperconductor (Tc = 118K): Tl2Ba2CaCu2O8 Structure: 2212 Space group: 139 Lattice parameters: 3.8550 29.318 Wyckoff positions: Ca 1a Tl 8m, x = 0.5, z = 0.2136 Ba 2e, z = 0.1218 Cu 8m, x = 0.5, z = 0.0540 O 4g, z = 0.0531 O 8m, x = 0.5, z = 0.1461 O 16o, x = 0.6040, y = 0.5, z = 0.2815 Change Wyckoff: O 16o -> O 2e, z = 0.2136 1. with Cell (s14a.xml): Cell Change XYZ: 0.5, 0.5, -0.0540 Bond: Color 0.5,0.5,0.5, Scale 0.4 2. with Polytopes (s14b.xml): Cell Change XYZ: 0.5, 0.5, 0.0 Cells: 2 x 2 x 2 Neighbours: O Number: 5 References: H. Shaked, P.M. Keane, J.C. Rodriguez, F.F. Owen, R.L. Hitterman, J.D. Jorgensen, Crystal structures of the High-Tc Superconducting Copper-Oxides, Physica C, Elsevier Science, Amsterdam, 1994 M. A. Subramanian, J.C. Calabrese, C. C. Torardi, J. Gopalakrishnan, T. R. Askew, R. B. Flippen, K.J. Morrissey, U. Chowdhry, and A.W. Sleight, Nature 332, 420 (1988) gamgi0.17.1g/dat/cell/link/0000755000175000017500000000000012254614747014746 5ustar carloscarlosgamgi0.17.1g/dat/cell/link/link7.xml0000644000175000017500000000063210256017716016506 0ustar carloscarlos gamgi0.17.1g/dat/cell/link/link8.xml0000644000175000017500000000053507751564120016513 0ustar carloscarlos gamgi0.17.1g/dat/cell/link/link5.xml0000644000175000017500000000065610256020055016500 0ustar carloscarlos gamgi0.17.1g/dat/cell/link/link6.xml0000644000175000017500000000067210256020062016475 0ustar carloscarlos gamgi0.17.1g/dat/cell/link/link4.xml0000644000175000017500000000063110256020050016463 0ustar carloscarlos gamgi0.17.1g/dat/cell/link/link1.xml0000644000175000017500000000073312254614600016475 0ustar carloscarlos gamgi0.17.1g/dat/cell/link/link2.xml0000644000175000017500000000100212254614747016500 0ustar carloscarlos gamgi0.17.1g/dat/cell/link/link3.xml0000644000175000017500000000057412254614621016505 0ustar carloscarlos gamgi0.17.1g/dat/cell/olivina.xml0000644000175000017500000003114110053747034016163 0ustar carloscarlos gamgi0.17.1g/dat/cell/Al_M/0000755000175000017500000000000012254616135014612 5ustar carloscarlosgamgi0.17.1g/dat/cell/Al_M/Al7Cr.xml0000644000175000017500000005473010171617054016252 0ustar carloscarlos gamgi0.17.1g/dat/cell/Al_M/Al5Mo_h.xml0000644000175000017500000002653410320071221016551 0ustar carloscarlos gamgi0.17.1g/dat/cell/Al_M/screen_Al5Mo_h_r.xml0000644000175000017500000004365110320305162020434 0ustar carloscarlos gamgi0.17.1g/dat/cell/Al_M/Al5Mo_h_bw.xml0000644000175000017500000002670110171617622017254 0ustar carloscarlos gamgi0.17.1g/dat/cell/Al_M/Al4Cr_ab_abc.txt0000644000175000017500000000035410317246776017541 0ustar carloscarlosgroup 194 P6_3/mmc Al4Cr alloy left: along direction [001] right: in perspective hP lattice a = 1.998 nm c = 2.467 nm Amelia Almeida, Desenvolvimento de Ligas Aluminio-Metal de Transicao por Sintese Assistida por Laser, PhD thesis gamgi0.17.1g/dat/cell/Al_M/Al7Cr_bw.xml0000644000175000017500000005555610171616756016761 0ustar carloscarlos gamgi0.17.1g/dat/cell/Al_M/Al4Cr_ab.xml0000644000175000017500000113343310267245122016707 0ustar carloscarlos gamgi0.17.1g/dat/cell/Al_M/Al5Mo_r.xml0000644000175000017500000006756710320071175016606 0ustar carloscarlos gamgi0.17.1g/dat/cell/Al_M/Al4Cr_abc.xml0000644000175000017500000113321310267245113017046 0ustar carloscarlos gamgi0.17.1g/dat/cell/Al_M/Al3Nb_bw.xml0000644000175000017500000001135310167313546016727 0ustar carloscarlos gamgi0.17.1g/dat/cell/Al_M/screen_Al4Cr_ab_abc.xml0000644000175000017500000071365010705703266021064 0ustar carloscarlos gamgi0.17.1g/dat/cell/etc/0000755000175000017500000000000012267054245014557 5ustar carloscarlosgamgi0.17.1g/dat/cell/etc/calcite_wired.xml0000644000175000017500000002020610147445461020076 0ustar carloscarlos gamgi0.17.1g/dat/cell/etc/calcite.xml0000644000175000017500000003715611747617520016724 0ustar carloscarlos -3.7771 7.2019 7.1088 -1.8536 8.3124 7.1088 -1.8536 6.0913 7.1088 1 3 0 1 2 -1.2823 5.7615 1.4218 0.6412 4.6510 1.4218 0.6412 6.8720 1.4218 1 3 0 1 2 0.6412 3.9913 7.1088 -1.2823 2.8807 7.1088 0.6412 1.7702 7.1088 1 3 0 1 2 -0.6412 4.6510 9.9523 1.2823 5.7615 9.9523 -0.6412 6.8720 9.9523 1 3 0 1 2 -3.1360 8.3124 15.6393 -1.2125 7.2019 15.6393 -3.1360 6.0913 15.6393 1 3 0 1 2 3.1360 2.5509 1.4217 1.2125 1.4404 1.4218 3.1360 0.3298 1.4217 1 3 0 1 2 5.6308 6.8720 1.4218 5.6308 4.6510 1.4217 3.7073 5.7615 1.4218 1 3 0 1 2 1.8536 5.4316 4.2653 3.7771 4.3211 4.2653 1.8536 3.2106 4.2653 1 3 0 1 2 1.8536 2.5509 9.9523 3.7771 1.4404 9.9522 1.8536 0.3298 9.9522 1 3 0 1 2 3.1360 8.3124 7.1088 3.1360 6.0913 7.1088 1.2125 7.2019 7.1088 1 3 0 1 2 3.1360 5.4316 12.7958 3.1360 3.2106 12.7958 1.2125 4.3211 12.7958 1 3 0 1 2 -0.6412 1.7702 15.6393 1.2823 2.8807 15.6393 -0.6412 3.9913 15.6393 1 3 0 1 2 1.8536 6.0913 15.6393 3.7771 7.2019 15.6393 1.8536 8.3124 15.6393 1 3 0 1 2 8.1256 2.5509 1.4217 8.1256 0.3298 1.4217 6.2021 1.4404 1.4217 1 3 0 1 2 5.6308 3.9913 7.1087 3.7073 2.8807 7.1087 5.6308 1.7702 7.1087 1 3 0 1 2 4.3484 4.6510 9.9523 6.2719 5.7615 9.9523 4.3484 6.8720 9.9523 1 3 0 1 2 4.3484 1.7702 15.6392 4.3484 3.9913 15.6393 6.2719 2.8807 15.6392 1 3 0 1 2 6.8432 0.3298 9.9522 8.7667 1.4404 9.9522 6.8432 2.5509 9.9522 1 3 0 1 2 gamgi0.17.1g/dat/cell/etc/calcite_solid.xml0000644000175000017500000002020610147444776020106 0ustar carloscarlos gamgi0.17.1g/dat/cell/etc/fluorapatite.xml0000644000175000017500000002355412267054047020011 0ustar carloscarlos 3.3337 3.7791 1.7203 0.8147 3.9251 1.7203 2.0461 2.1004 0.5023 2.0461 2.1004 2.9382 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 -1.6060 4.7766 5.1608 -2.9919 2.6681 5.1608 -0.7960 2.8222 3.9429 -0.7960 2.8222 6.3788 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 4.4246 0.9975 1.7203 6.5222 0.7218 2.9382 5.5577 -1.2570 1.7203 6.5222 0.7218 0.5023 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 6.2881 3.3331 1.7203 5.4781 5.2875 2.9382 7.6740 5.4416 1.7203 5.4781 5.2875 0.5023 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 1.3484 4.3305 5.1608 2.6360 6.0092 6.3788 3.8674 4.1846 5.1608 2.6360 6.0092 3.9429 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 0.2575 7.1121 5.1608 -0.8756 9.3666 5.1608 -1.8401 7.3879 3.9429 -1.8401 7.3879 6.3788 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 gamgi0.17.1g/dat/cell/etc/blenda.xml0000644000175000017500000000531411272105252016517 0ustar carloscarlos gamgi0.17.1g/dat/cell/etc/fluorapatite.txt0000644000175000017500000000124611747567175020037 0ustar carloscarlosFluorapatite: Ca10(PO4)6F2 Space group: 176 lattice parameters: Ca10(PO4)6F2 Ca10(PO4)6(OH)2 9.3642 6.8811 9.4166 6.8745 Wyckoff: Ca 4f, z = 0.001 Ca 6h, x = 0.246 y = 0.993 P 6h, x = 0.400 y = 0.369 O 6h, x = 0.329 y = 0.484 O 6h, x = 0.589 y = 0.466 O 12i, x = 0.348 y = 0.259 z = 0.073 F 2a Source: 1) Posner A.S., A. Perloff, and A.F. Diorio, Acta Cryst. 11, 308 (1958) (Wyckoff positions) 2) Anthony J.W., Bideaux R.A., Bladh K.W., and Nichols M.C., Handbook of Mineralogy, http://www.handbookofmineralogy.org/ (hydroxylapatite lattice parameters) 3) Chinthaka Silva G.W., Longzhou Ma, Hemmers O., Lindle D., Micron 39, 269 (2088) (fluorapatite lattice parameters) gamgi0.17.1g/dat/cell/etc/screen_YBa2Cu3O7-x.xml0000644000175000017500000013546312267054201020427 0ustar carloscarlos 7.6452 5.8313 7.2532 7.6449 9.7185 7.2533 5.7337 7.7748 7.2661 9.5563 7.7751 7.2661 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 7.6451 5.8313 4.4267 5.7336 7.7748 4.4139 7.6448 9.7186 4.4267 9.5563 7.7751 4.4138 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 3.8221 9.7183 4.4268 5.7336 7.7748 4.4139 3.8224 5.8310 4.4268 1.9109 7.7746 4.4140 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 3.8225 5.8310 7.2534 3.8222 9.7182 7.2535 1.9110 7.7744 7.2664 5.7337 7.7748 7.2661 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 3.8225 9.7181 16.1071 5.7340 7.7746 16.0941 3.8228 5.8308 16.1070 1.9113 7.7743 16.0942 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 7.6455 5.8310 16.1069 5.7340 7.7746 16.0941 7.6452 9.7183 16.1069 9.5567 7.7748 16.0940 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 3.8229 5.8308 18.9336 5.7341 7.7746 18.9465 3.8226 9.7180 18.9336 1.9115 7.7743 18.9465 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 7.6456 5.8310 18.9335 9.5568 7.7748 18.9463 7.6453 9.7182 18.9335 5.7341 7.7746 18.9465 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 3.8227 1.9439 4.4267 1.9112 3.8873 4.4140 3.8224 5.8310 4.4268 5.7339 3.8876 4.4138 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 7.6454 1.9441 4.4266 7.6451 5.8313 4.4267 9.5566 3.8879 4.4137 5.7339 3.8876 4.4138 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 3.8225 5.8310 7.2534 3.8228 1.9438 7.2533 5.7340 3.8875 7.2661 1.9112 3.8873 7.2662 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 7.6454 1.9441 7.2531 9.5567 3.8877 7.2660 7.6452 5.8313 7.2532 5.7340 3.8875 7.2661 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 7.6458 1.9439 16.1067 5.7342 3.8874 16.0941 7.6455 5.8310 16.1069 9.5570 3.8877 16.0939 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 7.6459 1.9438 18.9334 9.5571 3.8875 18.9462 7.6456 5.8310 18.9335 5.7343 3.8873 18.9463 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 3.8229 5.8308 18.9336 1.9117 3.8870 18.9465 3.8232 1.9435 18.9335 5.7343 3.8873 18.9463 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 3.8228 5.8308 16.1070 3.8230 1.9437 16.1069 1.9115 3.8871 16.0942 5.7342 3.8874 16.0941 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 7.6451 7.7749 9.8230 7.6449 9.7185 7.2533 7.6452 5.8313 7.2532 5.7337 7.7748 7.2661 9.5563 7.7751 7.2661 6 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 3 2 1 4 7.6449 7.7749 1.8570 7.6451 5.8313 4.4267 7.6448 9.7186 4.4267 5.7336 7.7748 4.4139 9.5563 7.7751 4.4138 6 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 3 2 1 4 3.8222 7.7747 1.8572 3.8221 9.7183 4.4268 3.8224 5.8310 4.4268 5.7336 7.7748 4.4139 1.9109 7.7746 4.4140 6 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 3 2 1 4 3.8225 7.7746 9.8231 3.8222 9.7182 7.2535 3.8225 5.8310 7.2534 1.9110 7.7744 7.2664 5.7337 7.7748 7.2661 6 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 3 2 1 4 3.8226 7.7744 13.5374 3.8225 9.7181 16.1071 3.8228 5.8308 16.1070 5.7340 7.7746 16.0941 1.9113 7.7743 16.0942 6 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 3 2 1 4 7.6453 7.7747 13.5372 7.6455 5.8310 16.1069 7.6452 9.7183 16.1069 5.7340 7.7746 16.0941 9.5567 7.7748 16.0940 6 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 3 2 1 4 3.8229 7.7743 21.5033 3.8229 5.8308 18.9336 3.8226 9.7180 18.9336 5.7341 7.7746 18.9465 1.9115 7.7743 18.9465 6 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 3 2 1 4 7.6456 7.7746 21.5031 7.6456 5.8310 18.9335 7.6453 9.7182 18.9335 9.5568 7.7748 18.9463 5.7341 7.7746 18.9465 6 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 3 2 1 4 3.8225 3.8876 1.8571 3.8227 1.9439 4.4267 3.8224 5.8310 4.4268 1.9112 3.8873 4.4140 5.7339 3.8876 4.4138 6 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 3 2 1 4 7.6451 3.8878 1.8570 7.6451 5.8313 4.4267 7.6454 1.9441 4.4266 9.5566 3.8879 4.4137 5.7339 3.8876 4.4138 6 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 3 2 1 4 3.8227 3.8874 9.8230 3.8228 1.9438 7.2533 3.8225 5.8310 7.2534 5.7340 3.8875 7.2661 1.9112 3.8873 7.2662 6 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 3 2 1 4 7.6454 3.8876 9.8229 7.6454 1.9441 7.2531 7.6452 5.8313 7.2532 9.5567 3.8877 7.2660 5.7340 3.8875 7.2661 6 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 3 2 1 4 7.6456 3.8876 13.5372 7.6458 1.9439 16.1067 7.6455 5.8310 16.1069 5.7342 3.8874 16.0941 9.5570 3.8877 16.0939 6 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 3 2 1 4 7.6458 3.8874 21.5031 7.6459 1.9438 18.9334 7.6456 5.8310 18.9335 9.5571 3.8875 18.9462 5.7343 3.8873 18.9463 6 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 3 2 1 4 3.8231 3.8871 21.5031 3.8229 5.8308 18.9336 3.8232 1.9435 18.9335 1.9117 3.8870 18.9465 5.7343 3.8873 18.9463 6 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 3 2 1 4 3.8228 3.8873 13.5373 3.8230 1.9437 16.1069 3.8228 5.8308 16.1070 1.9115 3.8871 16.0942 5.7342 3.8874 16.0941 6 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 4 3 0 2 4 3 2 1 4 3.8224 9.7181 11.6803 3.8226 7.7744 13.5374 3.8226 5.8309 11.6802 3.8225 7.7746 9.8231 1 4 0 1 2 3 7.6450 9.7184 11.6802 7.6453 7.7747 13.5372 7.6453 5.8312 11.6800 7.6451 7.7749 9.8230 1 4 0 1 2 3 3.8229 1.9437 11.6801 3.8228 3.8873 13.5373 3.8226 5.8309 11.6802 3.8227 3.8874 9.8230 1 4 0 1 2 3 7.6453 5.8312 11.6800 7.6454 3.8876 9.8229 7.6456 1.9440 11.6800 7.6456 3.8876 13.5372 1 4 0 1 2 3 gamgi0.17.1g/dat/cell/etc/screen_blenda.xml0000644000175000017500000002057612267054265020101 0ustar carloscarlos 5.4047 2.7044 2.7026 5.4053 0.0013 -0.0004 2.7028 0.0007 2.7028 2.7021 2.7036 -0.0002 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 2.7024 2.7037 5.4057 -0.0006 0.0002 5.4058 -0.0011 2.7031 2.7028 2.7028 0.0007 2.7028 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 2.7024 2.7037 5.4057 5.4044 5.4074 5.4056 5.4047 2.7044 2.7026 2.7018 5.4067 2.7028 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 2.7018 5.4067 2.7028 2.7021 2.7036 -0.0002 -0.0011 2.7031 2.7028 -0.0019 5.4060 -0.0002 4 3 1 2 3 3 2 0 3 3 0 1 3 3 1 0 2 gamgi0.17.1g/dat/cell/interstices/0000755000175000017500000000000012267054466016345 5ustar carloscarlosgamgi0.17.1g/dat/cell/interstices/solid.xml0000644000175000017500000003257312135255746020211 0ustar carloscarlos gamgi0.17.1g/dat/cell/interstices/polyhedra.xml0000644000175000017500000003470512267054504021060 0ustar carloscarlos 1.4139 2.8280 1.4143 1.4139 1.4139 2.8282 -0.0001 1.4139 1.4141 2.8279 1.4140 1.4143 1.4139 0.0000 1.4141 1.4140 1.4141 0.0002 8 3 2 0 5 3 4 2 5 3 0 1 3 3 1 0 2 3 1 2 4 3 3 1 4 3 0 3 5 3 3 4 5 1.4138 4.2419 2.8284 -0.0002 4.2419 1.4143 1.4138 5.6560 1.4144 1.4139 4.2421 0.0003 2.8278 4.2420 1.4144 1.4139 2.8280 1.4143 8 3 1 2 3 3 0 1 5 3 1 0 2 3 2 0 4 3 3 2 4 3 1 3 5 3 3 4 5 3 4 0 5 4.2419 2.8281 1.4143 2.8280 2.8281 0.0003 2.8279 1.4140 1.4143 2.8279 2.8279 2.8283 1.4139 2.8280 1.4143 2.8278 4.2420 1.4144 8 3 0 1 5 3 2 0 3 3 1 4 5 3 1 0 2 3 1 2 4 3 2 3 4 3 3 0 5 3 4 3 5 4.2420 1.4141 0.0002 5.6559 1.4141 1.4143 4.2419 2.8281 1.4143 4.2419 1.4139 2.8283 2.8279 1.4140 1.4143 4.2419 0.0001 1.4142 8 3 1 2 3 3 0 1 5 3 1 0 2 3 2 0 4 3 3 2 4 3 1 3 5 3 3 4 5 3 4 0 5 2.8278 4.2420 1.4144 4.2419 4.2421 0.0005 4.2418 5.6561 1.4146 4.2419 2.8281 1.4143 4.2418 4.2419 2.8285 5.6559 4.2421 1.4146 8 3 1 2 5 3 0 1 3 3 1 0 2 3 2 0 4 3 0 3 4 3 3 1 5 3 2 4 5 3 4 3 5 2.3089 2.3091 0.0001 2.3090 0.0001 0.0000 2.3090 -0.0000 2.3091 1.1544 1.1545 1.1545 2.3088 2.3090 2.3091 3.4635 1.1546 1.1546 8 3 1 2 3 3 1 0 5 3 0 1 3 3 0 3 4 3 3 2 4 3 2 1 5 3 0 4 5 3 4 2 5 -0.0001 2.3090 0.0000 -0.0001 2.3089 2.3091 2.3089 2.3091 0.0001 1.1544 3.4635 1.1546 2.3088 2.3090 2.3091 1.1544 1.1545 1.1545 8 3 1 0 5 3 2 0 3 3 0 1 3 3 4 1 5 3 2 3 4 3 3 1 4 3 0 2 5 3 2 4 5 1.1544 1.1545 1.1545 1.1544 3.4635 1.1546 3.4633 3.4636 1.1547 2.3089 2.3091 0.0001 3.4635 1.1546 1.1546 2.3088 2.3090 2.3091 8 3 1 2 3 3 1 0 5 3 0 1 3 3 0 4 5 3 0 3 4 3 3 2 4 3 2 1 5 3 4 2 5 2.3089 2.3091 0.0001 2.3088 2.3090 2.3091 4.6180 2.3091 0.0002 3.4633 3.4636 1.1547 4.6179 2.3091 2.3092 3.4635 1.1546 1.1546 8 3 1 0 5 3 2 0 3 3 0 1 3 3 2 3 4 3 3 1 4 3 0 2 5 3 2 4 5 3 4 1 5 2.3088 2.3090 2.3091 2.3088 4.6180 2.3091 2.3089 2.3091 0.0001 1.1544 3.4635 1.1546 2.3089 4.6180 0.0002 3.4633 3.4636 1.1547 8 3 1 0 5 3 2 0 3 3 0 1 3 3 4 1 5 3 2 3 4 3 3 1 4 3 0 2 5 3 2 4 5 gamgi0.17.1g/dat/cell/interstices/wired.xml0000644000175000017500000003152612135261130020166 0ustar carloscarlos gamgi0.17.1g/dat/bond/0000755000175000017500000000000012254621572014006 5ustar carloscarlosgamgi0.17.1g/dat/bond/solid.xml0000644000175000017500000000007007426327435015645 0ustar carloscarlos gamgi0.17.1g/dat/bond/wired.xml0000644000175000017500000000007007426330253015635 0ustar carloscarlos gamgi0.17.1g/dat/text/0000755000175000017500000000000012254623024014042 5ustar carloscarlosgamgi0.17.1g/dat/text/fonts.xml0000644000175000017500000000266111316452060015720 0ustar carloscarlos gamgi0.17.1g/dat/text/keyboard.xml0000644000175000017500000000136611316452013016366 0ustar carloscarlos gamgi0.17.1g/dat/text/wired.xml0000644000175000017500000000460310377424127015710 0ustar carloscarlos gamgi0.17.1g/dat/all.xml0000644000175000017500000001234212254620376014361 0ustar carloscarlos gamgi0.17.1g/dat/atom/0000755000175000017500000000000012254621553014023 5ustar carloscarlosgamgi0.17.1g/dat/atom/solid.xml0000644000175000017500000000007007426327477015671 0ustar carloscarlos gamgi0.17.1g/dat/atom/wired.xml0000644000175000017500000000007007426330216015652 0ustar carloscarlos gamgi0.17.1g/INSTALL0000644000175000017500000000507511350247766013361 0ustar carloscarlos- COMPILATION - 1) GAMGI requires the following libraries (latest releases suggested): GtkGLext 1.0, Mesa, Gtk 2.0, Atk-1.0, Pango-1.0, Cairo, Glib-2.0, Expat, Freetype 2.0. Both library (.so) and header (.h) files must be installed, before compiling GAMGI. Modern Linux distributions come with all these files, often already installed. Installing GtkGLext 1.0 forces the installation of all the other libraries (except Expat). 2) When the files are not in standard locations, edit src/make_local to add your local paths. Some of the most common PC and Mac configurations are commented below. 3) To change compile options edit the file "make_rules" (not needed). 4) Type "make" to create and "make clean" to remove object files and executable. - INSTALLATION - 5) We suggest creating a root directory "gamgi" the first time and then unarchive the tarball inside, this way automatically creating a sub-directory "gamgi_version" for each new version. For example, /opt/gamgi/ or /usr/local/gamgi/ or /home/carlos/gamgi. We suggest creating two links, one inside the "gamgi" directory: ln -s gamgi_version gamgi and another inside the "/usr/local/bin" directory, for example: ln -s ~/gamgi/gamgi/src/gamgi gamgi With the second link GAMGI can be seen everywhere, and when installing a new version, we need only to change the first link. 6) Set the environment variable "GAMGI_HELP", to let Gamgi know where are the local documentation files. For example, add a line as this to file ~/.bashrc (or ~/.profile, in some systems): GAMGI_HELP=~/gamgi/gamgi/doc; export GAMGI_HELP 7) Set the environment variable "GAMGI_TEXT", to indicate where are the DeJaVu TrueType fonts used by GAMGI. For example, if these fonts are in /usr/share/fonts/truetype/ttf-dejavu, the usual place for most Linux distributions, just add this line to file ~/.bashrc (or ~/.profile, in some systems): GAMGI_TEXT=/usr/share/fonts/truetype/ttf-dejavu; export GAMGI_TEXT If these fonts are not available, just download them from dejavu.sourceforge.net, www.gamgi.org or ftp.gamgi.org. 8) Set the environment variable "BROWSER", to let GAMGI know which browser to launch, in case "Help Remote" is solicited. For example, add a line as this to file ~/.bashrc (or ~/.profile, in some systems): BROWSER=firefox; export BROWSER - HELP - 9) Compiling and installing GAMGI is trivial, _as_long_as_ all libraries can be seen at compile time, link time and run time. If problems arise, please see doc/installation/. To contact the author send a message to . 10) To install a man page and an icon, see DISTROS. gamgi0.17.1g/DISTROS0000644000175000017500000000334711102361443013362 0ustar carloscarlos- ENVIRONMENT VARIABLES - GAMGI requires two environment variables, GAMGI_HELP and GAMGI_TEXT. GAMGI_HELP should point to the directory doc/, where the Help documentation files are. GAMGI_TEXT should indicate where are the ten Bitstream Vera Truetype fonts, that are also distributed by GAMGI: VeraBI.ttf VeraMoBd.ttf VeraMoIt.ttf VeraSeBd.ttf Vera.ttf VeraBd.ttf VeraIt.ttf VeraMoBI.ttf VeraMono.ttf VeraSe.ttf If your distribution does not come with these files, just set GAMGI_TEXT to the directory src/io/fonts/. If your distribution already has these files, remove src/io/fonts/ and point GAMGI_TEXT to the system directory containing them. For example, in Debian: /usr/share/fonts/truetype/ttf-bitstream-vera/ The best solution is probably to launch gamgi from a wrapper script, as in the following working example, that reads files from the command line and automatically sets GAMGI_HELP and GAMGI_TEXT: #!/bin/sh GAMGI_HELP=/usr/local/gamgi/doc export GAMGI_HELP GAMGI_TEXT=/usr/share/fonts/truetype/ttf-bitstream-vera export GAMGI_TEXT exec /usr/local/bin/gamgi "$@" To check that these variables are properly set, select File->Import and choose dat/text/keyboard.xml, then select Help->Current. - DATA FILES - The wrapper script above can be used to read any data files from the command line (see the man page). - MAN PAGES - The GAMGI man page is at doc/man/, with instructions. - ICONS - The GAMGI icons are at doc/icon/. Currently only rasterized transparent png images are available, with 316x316, 128x128, 48x48, 32x32, 22x22, 16x16 pixels. Read doc/icon/icon.html to see the images and an explanation. If GAMGI is part of your distribution, we would be delighted to know about it, just send us a note, to . gamgi0.17.1g/src/0000755000175000017500000000000012306410615013073 5ustar carloscarlosgamgi0.17.1g/src/make_rules0000644000175000017500000000360512256111566015160 0ustar carloscarlos########################################### # # $GAMGI/src/make_rules # # Copyright (C) 2001, 2004 Carlos Pereira # # Distributed under the terms of the GNU # General Public License: $GAMGI/LICENSE # #================================ shell ==================================== SHELL=/bin/sh #================================ compiler ================================= CC ?= gcc CFLAGS ?= -O3 -Wall -ansi -g #override CFLAGS += -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED \ # -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED \ # -DGSEAL_ENABLE \ # -DG_DISABLE_SINGLE_INCLUDES -DATK_DISABLE_SINGLE_INCLUDES \ # -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES LDFLAGS ?= COMPILE = $(CC) $(CFLAGS) LINK = $(CC) $(LDFLAGS) #================================ executable =============================== EXE = gamgi #================================ shared libs ============================== LIBS = -lgtkglext-x11-1.0 -lgdkglext-x11-1.0 \ -lGLU -lGL -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 \ -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 \ -lglib-2.0 -lXext -lX11 -lXi -lXmu -lfreetype -lexpat -lm -ldl #================================ full paths =============================== PATH_H = $(PATH_GAMGI_H) \ $(PATH_GTKGL_H) $(PATH_MESA_H) $(PATH_GTK_H) $(PATH_ATK_H) \ $(PATH_PANGO_H) $(PATH_CAIRO_H) $(PATH_GLIB_H) $(PATH_X_H) \ $(PATH_FREETYPE_H) $(PATH_EXPAT_H) PATH_L = $(PATH_GTKGL_L) $(PATH_MESA_L) $(PATH_GTK_L) $(PATH_ATK_L) \ $(PATH_PANGO_L) $(PATH_CAIRO_L) $(PATH_GLIB_L) $(PATH_X_L) \ $(PATH_FREETYPE_L) $(PATH_EXPAT_L) #============================== compile all ================================ $(EXE): $(GAMGI_o) $(LINK) -o $@ $^ $(PATH_L) $(LIBS) %.o : %.c $(GAMGI_h) $(COMPILE) -c $(PATH_H) $< -o $@ #=============================== clean all ================================= .PHONY: clean clean: $(RM) $(EXE) $(GAMGI_o) gamgi0.17.1g/src/engine/0000755000175000017500000000000012305726571014352 5ustar carloscarlosgamgi0.17.1g/src/engine/gamgi_engine_copy_out.c0000644000175000017500000005506412272314051021047 0ustar carloscarlos/********************************************* * * $GAMGI/src/engine/gamgi_engine_copy_out.c * * Copyright (C) 2001, 2004 Carlos Pereira * * Distributed under the terms of the GNU * General Public License: $GAMGI/LICENSE * */ #include "gamgi_engine.h" #include "gamgi_mesa.h" #include "gamgi_io.h" #include "gamgi_math_vector.h" #include "gamgi_math_matrix.h" #include "gamgi_mesa_text.h" static void static_copy (gamgi_object *object, gamgi_object *object_new) { strcpy (object_new->name, object->name); strcpy (object_new->label, object->label); object_new->class = object->class; object_new->scale = object->scale; } void gamgi_engine_copy_out_text (gamgi_text *text, gamgi_text *text_new) { static_copy (GAMGI_CAST_OBJECT text, GAMGI_CAST_OBJECT text_new); text_new->draw = text->draw; text_new->mark = text->mark; /********************************** * safe programming: text->string * * should never be NULL here * **********************************/ if (text->string != NULL) { text_new->string = (char *) malloc ((text->length + 1) * sizeof (char)); strcpy (text_new->string, text->string); } text_new->length = text->length; text_new->style = text->style; text_new->font = text->font; gamgi_mesa_text_font_increase (text_new, NULL); /**************************** * position and orientation * ****************************/ text_new->origin[0] = text->origin[0]; text_new->origin[1] = text->origin[1]; text_new->origin[2] = text->origin[2]; text_new->center[0] = text->center[0]; text_new->center[1] = text->center[1]; text_new->center[2] = text->center[2]; text_new->quaternion[0] = text->quaternion[0]; text_new->quaternion[1] = text->quaternion[1]; text_new->quaternion[2] = text->quaternion[2]; text_new->quaternion[3] = text->quaternion[3]; /************* * view data * *************/ text_new->red = text->red; text_new->green = text->green; text_new->blue = text->blue; } void gamgi_engine_copy_out_orbital (gamgi_orbital *orbital, gamgi_orbital *orbital_new) { int i; static_copy (GAMGI_CAST_OBJECT orbital, GAMGI_CAST_OBJECT orbital_new); orbital_new->draw = orbital->draw; orbital_new->n = orbital->n; orbital_new->l = orbital->l; orbital_new->m = orbital->m; orbital_new->charge = orbital->charge; orbital_new->style = orbital->style; orbital_new->radius = orbital->radius; orbital_new->density = orbital->density; orbital_new->sampling = orbital->sampling; orbital_new->seed = orbital->seed; orbital_new->phase = orbital->phase; orbital_new->frame = orbital->frame; for (i = 0; i < 8; i++) orbital_new->octants[i] = orbital->octants[i]; orbital_new->axes = orbital->axes; /****************************** * copy arrays: points, lines * ******************************/ orbital_new->dots[0] = orbital->dots[0]; orbital_new->dots[1] = orbital->dots[1]; orbital_new->dots[2] = orbital->dots[2]; orbital_new->points = NULL; i = 3 * orbital->n_points; if (i != 0) orbital_new->points = (double *) malloc (sizeof (double) * i); while (i-- > 0) orbital_new->points[i] = orbital->points[i]; orbital_new->lines = NULL; i = orbital->n_lines; if (i != 0) orbital_new->lines = (int *) malloc (sizeof (int) * i); while (i-- > 0) orbital_new->lines[i] = orbital->lines[i]; orbital_new->n_points = orbital->n_points; orbital_new->n_lines = orbital->n_lines; /************************************** * copy position and orientation data * **************************************/ orbital_new->origin[0] = orbital->origin[0]; orbital_new->origin[1] = orbital->origin[1]; orbital_new->origin[2] = orbital->origin[2]; orbital_new->center[0] = orbital->center[0]; orbital_new->center[1] = orbital->center[1]; orbital_new->center[2] = orbital->center[2]; orbital_new->quaternion[0] = orbital->quaternion[0]; orbital_new->quaternion[1] = orbital->quaternion[1]; orbital_new->quaternion[2] = orbital->quaternion[2]; orbital_new->quaternion[3] = orbital->quaternion[3]; /************************** * copy color information * **************************/ orbital_new->base_r = orbital->base_r; orbital_new->base_g = orbital->base_g; orbital_new->base_b = orbital->base_b; orbital_new->phase_r = orbital->phase_r; orbital_new->phase_g = orbital->phase_g; orbital_new->phase_b = orbital->phase_b; orbital_new->frame_r = orbital->frame_r; orbital_new->frame_g = orbital->frame_g; orbital_new->frame_b = orbital->frame_b; } void gamgi_engine_copy_out_bond (gamgi_bond *bond, gamgi_bond *bond_new) { /************* * copy data * *************/ static_copy (GAMGI_CAST_OBJECT bond, GAMGI_CAST_OBJECT bond_new); bond_new->draw = bond->draw; bond_new->size = bond->size; bond_new->color = bond->color; bond_new->red = bond->red; bond_new->green = bond->green; bond_new->blue = bond->blue; bond_new->order = bond->order; bond_new->covalency = bond->covalency; /************** * start data * **************/ bond_new->first = TRUE; bond_new->copy = NULL; bond_new->atom1 = NULL; bond_new->atom2 = NULL; bond_new->dlist1 = NULL; bond_new->dlist2 = NULL; } void gamgi_engine_copy_out_atom (gamgi_atom *atom, gamgi_atom *atom_new) { static_copy (GAMGI_CAST_OBJECT atom, GAMGI_CAST_OBJECT atom_new); atom_new->draw = atom->draw; atom_new->mark = atom->mark; atom_new->element = atom->element; atom_new->mass = atom->mass; atom_new->radius = atom->radius; atom_new->charge = atom->charge; atom_new->temperature = atom->temperature; atom_new->occupancy = atom->occupancy; atom_new->position[0] = atom->position[0]; atom_new->position[1] = atom->position[1]; atom_new->position[2] = atom->position[2]; /************* * view data * *************/ atom_new->size = atom->size; atom_new->variancy = atom->variancy; atom_new->red = atom->red; atom_new->green = atom->green; atom_new->blue = atom->blue; } void gamgi_engine_copy_out_direction (gamgi_direction *direction, gamgi_direction *direction_new) { int i; static_copy (GAMGI_CAST_OBJECT direction, GAMGI_CAST_OBJECT direction_new); direction_new->net = direction->net; direction_new->draw = direction->draw; direction_new->reference = direction->reference; direction_new->model = direction->model; /***************************** * copy description: indices * *****************************/ direction_new->uvw[0] = direction->uvw[0]; direction_new->uvw[1] = direction->uvw[1]; direction_new->uvw[2] = direction->uvw[2]; direction_new->vectors = direction->vectors; direction_new->node[0] = direction->node[0]; direction_new->node[1] = direction->node[1]; direction_new->node[2] = direction->node[2]; direction_new->node[3] = direction->node[3]; /************************************** * copy position and orientation data * **************************************/ direction_new->origin[0] = direction->origin[0]; direction_new->origin[1] = direction->origin[1]; direction_new->origin[2] = direction->origin[2]; direction_new->center[0] = direction->center[0]; direction_new->center[1] = direction->center[1]; direction_new->center[2] = direction->center[2]; direction_new->quaternion[0] = direction->quaternion[0]; direction_new->quaternion[1] = direction->quaternion[1]; direction_new->quaternion[2] = direction->quaternion[2]; direction_new->quaternion[3] = direction->quaternion[3]; /****************************** * copy arrays: points, loops * ******************************/ direction_new->points = NULL; i = 3 * direction->n_points; if (i != 0) direction_new->points = (double *) malloc (sizeof (double) * i); while (i-- > 0) direction_new->points[i] = direction->points[i]; direction_new->loops = NULL; i = direction->n_loops; if (i != 0) direction_new->loops = (int *) malloc (sizeof (int) * i); while (i-- > 0) direction_new->loops[i] = direction->loops[i]; direction_new->n_points = direction->n_points; direction_new->n_loops = direction->n_loops; /***************************** * copy visualization: color * *****************************/ direction_new->red = direction->red; direction_new->green = direction->green; direction_new->blue = direction->blue; } void gamgi_engine_copy_out_plane (gamgi_plane *plane, gamgi_plane *plane_new) { int i; static_copy (GAMGI_CAST_OBJECT plane, GAMGI_CAST_OBJECT plane_new); plane_new->net = plane->net; plane_new->draw = plane->draw; plane_new->reference = plane->reference; plane_new->model = plane->model; /***************************** * copy description: indices * *****************************/ plane_new->hkl[0] = plane->hkl[0]; plane_new->hkl[1] = plane->hkl[1]; plane_new->hkl[2] = plane->hkl[2]; plane_new->vectors = plane->vectors; plane_new->order = plane->order; /************************************** * copy position and orientation data * **************************************/ plane_new->origin[0] = plane->origin[0]; plane_new->origin[1] = plane->origin[1]; plane_new->origin[2] = plane->origin[2]; plane_new->center[0] = plane->center[0]; plane_new->center[1] = plane->center[1]; plane_new->center[2] = plane->center[2]; plane_new->quaternion[0] = plane->quaternion[0]; plane_new->quaternion[1] = plane->quaternion[1]; plane_new->quaternion[2] = plane->quaternion[2]; plane_new->quaternion[3] = plane->quaternion[3]; /******************************************** * copy visualization arrays: points, loops * ********************************************/ plane_new->points = NULL; i = 3 * plane->n_points; if (i != 0) plane_new->points = (double *) malloc (sizeof (double) * i); while (i-- > 0) plane_new->points[i] = plane->points[i]; plane_new->loops = NULL; i = plane->n_loops; if (i != 0) plane_new->loops = (int *) malloc (sizeof (int) * i); while (i-- > 0) plane_new->loops[i] = plane->loops[i]; plane_new->n_points = plane->n_points; plane_new->n_loops = plane->n_loops; /************** * copy color * **************/ plane_new->red = plane->red; plane_new->green = plane->green; plane_new->blue = plane->blue; } void gamgi_engine_copy_out_group (gamgi_group *group, gamgi_group *group_new) { int i; static_copy (GAMGI_CAST_OBJECT group, GAMGI_CAST_OBJECT group_new); group_new->draw = group->draw; group_new->reference = group->reference; group_new->mark = group->mark; /************************************** * copy position and orientation data * **************************************/ group_new->origin[0] = group->origin[0]; group_new->origin[1] = group->origin[1]; group_new->origin[2] = group->origin[2]; group_new->center[0] = group->center[0]; group_new->center[1] = group->center[1]; group_new->center[2] = group->center[2]; group_new->quaternion[0] = group->quaternion[0]; group_new->quaternion[1] = group->quaternion[1]; group_new->quaternion[2] = group->quaternion[2]; group_new->quaternion[3] = group->quaternion[3]; /****************************** * copy arrays: points, loops * ******************************/ group_new->points = NULL; i = 3 * group->n_points; if (i > 0) group_new->points = (double *) malloc (sizeof (double) * i); while (i-- > 0) group_new->points[i] = group->points[i]; group_new->loops = NULL; i = group->n_loops; if (i > 0) group_new->loops = (int *) malloc (sizeof (int) * i); while (i-- > 0) group_new->loops[i] = group->loops[i]; /******************************** * copy number of points, loops * ********************************/ group_new->n_points = group->n_points; group_new->n_loops = group->n_loops; /****************** * copy view data * ******************/ group_new->faces = group->faces; group_new->red = group->red; group_new->green = group->green; group_new->blue = group->blue; } void gamgi_engine_copy_out_molecule (gamgi_molecule *molecule, gamgi_molecule *molecule_new) { static_copy (GAMGI_CAST_OBJECT molecule, GAMGI_CAST_OBJECT molecule_new); molecule_new->draw = molecule->draw; /************************************** * copy position and orientation data * **************************************/ molecule_new->origin[0] = molecule->origin[0]; molecule_new->origin[1] = molecule->origin[1]; molecule_new->origin[2] = molecule->origin[2]; molecule_new->center[0] = molecule->center[0]; molecule_new->center[1] = molecule->center[1]; molecule_new->center[2] = molecule->center[2]; molecule_new->quaternion[0] = molecule->quaternion[0]; molecule_new->quaternion[1] = molecule->quaternion[1]; molecule_new->quaternion[2] = molecule->quaternion[2]; molecule_new->quaternion[3] = molecule->quaternion[3]; } void gamgi_engine_copy_out_cluster (gamgi_cluster *cluster, gamgi_cluster *cluster_new) { int i; static_copy (GAMGI_CAST_OBJECT cluster, GAMGI_CAST_OBJECT cluster_new); cluster_new->reference = cluster->reference; cluster_new->mark = cluster->mark; /************************************** * copy position and orientation data * **************************************/ cluster_new->origin[0] = cluster->origin[0]; cluster_new->origin[1] = cluster->origin[1]; cluster_new->origin[2] = cluster->origin[2]; cluster_new->center[0] = cluster->center[0]; cluster_new->center[1] = cluster->center[1]; cluster_new->center[2] = cluster->center[2]; cluster_new->quaternion[0] = cluster->quaternion[0]; cluster_new->quaternion[1] = cluster->quaternion[1]; cluster_new->quaternion[2] = cluster->quaternion[2]; cluster_new->quaternion[3] = cluster->quaternion[3]; /********************************************** * copy arrays: points, loops, colors, paints * **********************************************/ cluster_new->points = NULL; i = 3 * cluster->n_points; if (i > 0) cluster_new->points = (double *) malloc (sizeof (double) * i); while (i-- > 0) cluster_new->points[i] = cluster->points[i]; cluster_new->loops = NULL; i = cluster->n_loops; if (i > 0) cluster_new->loops = (int *) malloc (sizeof (int) * i); while (i-- > 0) cluster_new->loops[i] = cluster->loops[i]; cluster_new->colors = NULL; i = 3 * cluster->n_colors; if (i > 0) cluster_new->colors = (float *) malloc (sizeof (float) * i); while (i-- > 0) cluster_new->colors[i] = cluster->colors[i]; cluster_new->paints = NULL; i = cluster->n_paints; if (i > 0) cluster_new->paints = (int *) malloc (sizeof (int) * i); while (i-- > 0) cluster_new->paints[i] = cluster->paints[i]; /********************************************************** * copy number of points, loops, colors, paints and seeds * **********************************************************/ cluster_new->n_points = cluster->n_points; cluster_new->n_loops = cluster->n_loops; cluster_new->n_colors = cluster->n_colors; cluster_new->n_paints = cluster->n_paints; cluster_new->atoms = cluster->atoms; /************* * View data * *************/ cluster_new->faces = cluster->faces; } void gamgi_engine_copy_out_cell (gamgi_cell *cell, gamgi_cell *cell_new) { int i; static_copy (GAMGI_CAST_OBJECT cell, GAMGI_CAST_OBJECT cell_new); /****************************** * copy crystallographic data * ******************************/ cell_new->lattice = cell->lattice; cell_new->group = cell->group; cell_new->reciprocal = cell->reciprocal; cell_new->a = cell->a; cell_new->b = cell->b; cell_new->c = cell->c; cell_new->ab = cell->ab; cell_new->ac = cell->ac; cell_new->bc = cell->bc; /******************************************* * copy conventional and primitive vectors * *******************************************/ gamgi_math_vector_copy (cell->a1, cell_new->a1); gamgi_math_vector_copy (cell->a2, cell_new->a2); gamgi_math_vector_copy (cell->a3, cell_new->a3); gamgi_math_vector_copy (cell->p1, cell_new->p1); gamgi_math_vector_copy (cell->p2, cell_new->p2); gamgi_math_vector_copy (cell->p3, cell_new->p3); /************************************** * copy position and orientation data * **************************************/ cell_new->origin[0] = cell->origin[0]; cell_new->origin[1] = cell->origin[1]; cell_new->origin[2] = cell->origin[2]; cell_new->center[0] = cell->center[0]; cell_new->center[1] = cell->center[1]; cell_new->center[2] = cell->center[2]; cell_new->quaternion[0] = cell->quaternion[0]; cell_new->quaternion[1] = cell->quaternion[1]; cell_new->quaternion[2] = cell->quaternion[2]; cell_new->quaternion[3] = cell->quaternion[3]; /************************************* * copy arrays: points, loops, lines * *************************************/ cell_new->points = NULL; i = 3 * cell->n_points; if (i != 0) cell_new->points = (double *) malloc (sizeof (double) * i); while (i-- > 0) cell_new->points[i] = cell->points[i]; cell_new->loops = NULL; i = cell->n_loops; if (i != 0) cell_new->loops = (int *) malloc (sizeof (int) * i); while (i-- > 0) cell_new->loops[i] = cell->loops[i]; cell_new->lines = NULL; i = cell->n_lines; if (i != 0) cell_new->lines = (int *) malloc (sizeof (int) * i); while (i-- > 0) cell_new->lines[i] = cell->lines[i]; /************************************************* * copy number of points, loops, lines and nodes * *************************************************/ cell_new->n_points = cell->n_points; cell_new->n_loops = cell->n_loops; cell_new->n_lines = cell->n_lines; cell_new->n_nodes = cell->n_nodes; /******************************************************** * copy volume data: number of cells, volume parameters * ********************************************************/ cell_new->model = cell->model; cell_new->n1 = cell->n1; cell_new->n2 = cell->n2; cell_new->n3 = cell->n3; cell_new->v1 = cell->v1; cell_new->v2 = cell->v2; cell_new->v3 = cell->v3; cell_new->v12 = cell->v12; cell_new->v13 = cell->v13; cell_new->v23 = cell->v23; /******************** * copy origin data * ********************/ cell_new->o1 = cell->o1; cell_new->o2 = cell->o2; cell_new->o3 = cell->o3; cell_new->origin_vectors = cell->origin_vectors; /****************** * copy axes data * ******************/ cell_new->axes = cell->axes; cell_new->axes_vectors = cell->axes_vectors; /************************************************ * copy enumerations and booleans, regarding * * the type of lattice, group, volume, borders, * * and whether faces and nodes are visible. * ************************************************/ cell_new->borders = cell->borders; cell_new->faces = cell->faces; cell_new->nodes = cell->nodes; /************************** * copy color information * **************************/ cell_new->red = cell->red; cell_new->green = cell->green; cell_new->blue = cell->blue; } void gamgi_engine_copy_out_arrow (gamgi_arrow *arrow, gamgi_arrow *arrow_new) { static_copy (GAMGI_CAST_OBJECT arrow, GAMGI_CAST_OBJECT arrow_new); arrow_new->draw = arrow->draw; } void gamgi_engine_copy_out_shape (gamgi_shape *shape, gamgi_shape *shape_new) { static_copy (GAMGI_CAST_OBJECT shape, GAMGI_CAST_OBJECT shape_new); shape_new->draw = shape->draw; } void gamgi_engine_copy_out_graph (gamgi_graph *graph, gamgi_graph *graph_new) { static_copy (GAMGI_CAST_OBJECT graph, GAMGI_CAST_OBJECT graph_new); graph_new->draw = graph->draw; } void gamgi_engine_copy_out_assembly (gamgi_assembly *assembly, gamgi_assembly *assembly_new) { static_copy (GAMGI_CAST_OBJECT assembly, GAMGI_CAST_OBJECT assembly_new); assembly_new->draw = assembly->draw; assembly_new->mark = assembly->mark; /************************************** * copy position and orientation data * **************************************/ assembly_new->origin[0] = assembly->origin[0]; assembly_new->origin[1] = assembly->origin[1]; assembly_new->origin[2] = assembly->origin[2]; assembly_new->center[0] = assembly->center[0]; assembly_new->center[1] = assembly->center[1]; assembly_new->center[2] = assembly->center[2]; assembly_new->quaternion[0] = assembly->quaternion[0]; assembly_new->quaternion[1] = assembly->quaternion[1]; assembly_new->quaternion[2] = assembly->quaternion[2]; assembly_new->quaternion[3] = assembly->quaternion[3]; } void gamgi_engine_copy_out_light (gamgi_light *light, gamgi_light *light_new) { static_copy (GAMGI_CAST_OBJECT light, GAMGI_CAST_OBJECT light_new); light_new->draw = light->draw; light_new->ambient [0] = light->ambient [0]; light_new->ambient [1] = light->ambient [1]; light_new->ambient [2] = light->ambient [2]; light_new->ambient [3] = light->ambient [3]; light_new->diffuse [0] = light->diffuse [0]; light_new->diffuse [1] = light->diffuse [1]; light_new->diffuse [2] = light->diffuse [2]; light_new->diffuse [3] = light->diffuse [3]; light_new->specular [0] = light->specular [0]; light_new->specular [1] = light->specular [1]; light_new->specular [2] = light->specular [2]; light_new->specular [3] = light->specular [3]; light_new->position[0] = light->position[0]; light_new->position[1] = light->position[1]; light_new->position[2] = light->position[2]; light_new->position[3] = light->position[3]; light_new->direction[0] = light->direction[0]; light_new->direction[1] = light->direction[1]; light_new->direction[2] = light->direction[2]; light_new->constant = light->constant; light_new->linear = light->linear; light_new->quadratic = light->quadratic; light_new->angle = light->angle; light_new->radial = light->radial; } void gamgi_engine_copy_out_layer (gamgi_layer *layer, gamgi_layer *layer_new) { static_copy (GAMGI_CAST_OBJECT layer, GAMGI_CAST_OBJECT layer_new); layer_new->draw = layer->draw; layer_new->perspective = layer->perspective; layer_new->top = layer->top; layer_new->near = layer->near; layer_new->far = layer->far; gamgi_math_vector_copy (layer->eye, layer_new->eye); gamgi_math_vector_copy (layer->center, layer_new->center); gamgi_math_vector_copy (layer->up, layer_new->up); gamgi_math_matrix_copy (layer->referential, layer_new->referential); layer_new->visibility_in = layer->visibility_in; layer_new->visibility_out = layer->visibility_out; layer_new->axes = layer->axes; layer_new->light = layer->light; layer_new->color[0] = layer->color[0]; layer_new->color[1] = layer->color[1]; layer_new->color[2] = layer->color[2]; layer_new->color[3] = layer->color[3]; } void gamgi_engine_copy_out_window (gamgi_window *window, gamgi_window *window_new) { /************* * copy data * *************/ static_copy (GAMGI_CAST_OBJECT window, GAMGI_CAST_OBJECT window_new); window_new->draw = window->draw; window_new->origin_x = window->origin_x; window_new->origin_y = window->origin_y; window_new->width = window->width; window_new->height = window->height; window_new->top = window->top; window_new->medium = window->medium; window_new->bottom = window->bottom; window_new->top_flag = window->top_flag; window_new->medium_flag = window->medium_flag; window_new->bottom_flag = window->bottom_flag; /************** * start data * **************/ window_new->window = NULL; window_new->dialog0 = NULL; window_new->dialog1 = NULL; window_new->help = NULL; window_new->area = NULL; window_new->history = NULL; window_new->layer = NULL; window_new->focus = NULL; window_new->action = FALSE; window_new->mode = FALSE; window_new->axes = FALSE; window_new->class = FALSE; window_new->top_flag = TRUE; window_new->medium_flag = TRUE; window_new->bottom_flag = TRUE; window_new->timer_focus = 0; window_new->timer_layer = 0; window_new->timer_message = 0; window_new->timer_progress = 0; window_new->axis = FALSE; window_new->total = 0.0; window_new->demo_flag = 0; } gamgi0.17.1g/src/engine/gamgi_engine_task.c0000644000175000017500000000537711566456207020171 0ustar carloscarlos/******************************************* * * $GAMGI/src/engine/gamgi_engine_task.c * * Copyright (C) 2001, 2004 Carlos Pereira * * Distributed under the terms of the GNU * General Public License: $GAMGI/LICENSE * */ #include "gamgi_engine.h" #include "gamgi_global.h" static unsigned int task; unsigned int gamgi_engine_task_get (void) { return task; } void gamgi_engine_task_start (void) { gamgi_text *text; gamgi_orbital *orbital; gamgi_bond *bond; gamgi_atom *atom; gamgi_direction *direction; gamgi_plane *plane; gamgi_group *group; gamgi_molecule *molecule; gamgi_cluster *cluster; gamgi_cell *cell; gamgi_arrow *arrow; gamgi_shape *shape; gamgi_graph *graph; gamgi_assembly *assembly; gamgi_light *light; gamgi_layer *layer; gamgi_window *window; task = 0; for (text = gamgi->text_start; text != NULL; text = text->next) (GAMGI_CAST_OBJECT text)->task = 0; for (orbital = gamgi->orbital_start; orbital != NULL; orbital = orbital->next) (GAMGI_CAST_OBJECT orbital)->task = 0; for (bond = gamgi->bond_start; bond != NULL; bond = bond->next) (GAMGI_CAST_OBJECT bond)->task = 0; for (atom = gamgi->atom_start; atom != NULL; atom = atom->next) (GAMGI_CAST_OBJECT atom)->task = 0; for (direction = gamgi->direction_start; direction != NULL; direction = direction->next) (GAMGI_CAST_OBJECT direction)->task = 0; for (plane = gamgi->plane_start; plane != NULL; plane = plane->next) (GAMGI_CAST_OBJECT plane)->task = 0; for (group = gamgi->group_start; group != NULL; group = group->next) (GAMGI_CAST_OBJECT group)->task = 0; for (molecule = gamgi->molecule_start; molecule != NULL; molecule = molecule->next) (GAMGI_CAST_OBJECT molecule)->task = 0; for (cluster = gamgi->cluster_start; cluster != NULL; cluster = cluster->next) (GAMGI_CAST_OBJECT cluster)->task = 0; for (cell = gamgi->cell_start; cell != NULL; cell = cell->next) (GAMGI_CAST_OBJECT cell)->task = 0; for (shape = gamgi->shape_start; shape != NULL; shape = shape->next) (GAMGI_CAST_OBJECT shape)->task = 0; for (arrow = gamgi->arrow_start; arrow != NULL; arrow = arrow->next) (GAMGI_CAST_OBJECT arrow)->task = 0; for (graph = gamgi->graph_start; graph != NULL; graph = graph->next) (GAMGI_CAST_OBJECT graph)->task = 0; for (assembly = gamgi->assembly_start; assembly != NULL; assembly = assembly->next) (GAMGI_CAST_OBJECT assembly)->task = 0; for (light = gamgi->light_start; light != NULL; light = light->next) (GAMGI_CAST_OBJECT light)->task = 0; for (layer = gamgi->layer_start; layer != NULL; layer = layer->next) (GAMGI_CAST_OBJECT layer)->task = 0; for (window = gamgi->window_start; window != NULL; window = window->next) (GAMGI_CAST_OBJECT window)->task = 0; } unsigned int gamgi_engine_task_new (void) { if (task == UINT_MAX) gamgi_engine_task_start (); return ++task; } gamgi0.17.1g/src/engine/gamgi_engine_find.c0000644000175000017500000026177311451406641020141 0ustar carloscarlos/******************************************* * * $GAMGI/src/engine/gamgi_engine_find.c * * Copyright (C) 2001, 2004 Carlos Pereira * * Distributed under the terms of the GNU * General Public License: $GAMGI/LICENSE * */ #include "gamgi_engine.h" #include "gamgi_global.h" gamgi_bool gamgi_engine_find_object (gamgi_object *object, gamgi_object *parent) { gamgi_bond *bond; int class = parent->class; /*********************************************************************** * handle this case separately because the normal algorithm does not * * work (object->object = NULL) and any object belongs to gamgi anyway * ***********************************************************************/ if (class == GAMGI_ENGINE_GAMGI) return TRUE; /************************************** * when object is a bond, try to find * * one of the two atoms in parent * **************************************/ do { if (object == parent) return TRUE; if (object->class == GAMGI_ENGINE_BOND) { bond = GAMGI_CAST_BOND object; if (gamgi_engine_find_object (GAMGI_CAST_OBJECT bond->atom1, parent) == TRUE) return TRUE; if (gamgi_engine_find_object (GAMGI_CAST_OBJECT bond->atom2, parent) == TRUE) return TRUE; return FALSE; } else object = object->object; } while (object != NULL && object->class <= class); return FALSE; } gamgi_layer *gamgi_engine_find_layer (gamgi_object *object) { if (object->class > GAMGI_ENGINE_LAYER) return NULL; while (object->class < GAMGI_ENGINE_LAYER) { if (object->class == GAMGI_ENGINE_BOND) object = (GAMGI_CAST_BOND object)->atom1->object.object; else object = object->object; } return GAMGI_CAST_LAYER object; } gamgi_window *gamgi_engine_find_window (gamgi_object *object) { gamgi_layer *layer = gamgi_engine_find_layer (object); return GAMGI_CAST_WINDOW layer->object.object; } gamgi_object *gamgi_engine_find_root (gamgi_object *object1, gamgi_object *object2, gamgi_object *scope) { gamgi_object *i, *j; int class = scope->class; for (i = object1; i != NULL && i->class <= class; i = i->object) { for (j = object2; j != NULL && j->class <= class; j = j->object) { if (i->class > j->class) continue; if (i->class < j->class) break; if (i == j) { /****************************** * a common parent was found, * * check if it is in scope * ******************************/ if (gamgi_engine_find_object (i, scope) == TRUE) return j; return NULL; } } } return NULL; } gamgi_text *gamgi_engine_find_text_text (unsigned int number, gamgi_text *text) { gamgi_text *new_text; gamgi_dlist *dlist; if (text->object.number == number) return text; dlist = text->text_start; while (dlist != NULL) { new_text = gamgi_engine_find_text_text (number, GAMGI_CAST_TEXT dlist->data); if (new_text != NULL) return new_text; dlist = dlist->next; } return NULL; } gamgi_text *gamgi_engine_find_text_orbital (unsigned int number, gamgi_orbital *orbital) { gamgi_text *text; gamgi_dlist *dlist; dlist = orbital->text_start; while (dlist != NULL) { text = gamgi_engine_find_text_text (number, GAMGI_CAST_TEXT dlist->data); if (text != NULL) return text; dlist = dlist->next; } return NULL; } gamgi_text *gamgi_engine_find_text_bond (unsigned int number, gamgi_bond *bond) { gamgi_text *text; gamgi_dlist *dlist; dlist = bond->text_start; while (dlist != NULL) { text = gamgi_engine_find_text_text (number, GAMGI_CAST_TEXT dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = bond->orbital_start; while (dlist != NULL) { text = gamgi_engine_find_text_orbital (number, GAMGI_CAST_ORBITAL dlist->data); if (text != NULL) return text; dlist = dlist->next; } return NULL; } gamgi_text *gamgi_engine_find_text_atom (unsigned int number, gamgi_atom *atom) { gamgi_text *text; gamgi_dlist *dlist; dlist = atom->text_start; while (dlist != NULL) { text = gamgi_engine_find_text_text (number, GAMGI_CAST_TEXT dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = atom->orbital_start; while (dlist != NULL) { text = gamgi_engine_find_text_orbital (number, GAMGI_CAST_ORBITAL dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = atom->bond_start; while (dlist != NULL) { text = gamgi_engine_find_text_bond (number, GAMGI_CAST_BOND dlist->data); if (text != NULL) return text; dlist = dlist->next; } return NULL; } gamgi_text *gamgi_engine_find_text_direction (unsigned int number, gamgi_direction *direction) { gamgi_text *text; gamgi_dlist *dlist; dlist = direction->text_start; while (dlist != NULL) { text = gamgi_engine_find_text_text (number, GAMGI_CAST_TEXT dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = direction->orbital_start; while (dlist != NULL) { text = gamgi_engine_find_text_orbital (number, GAMGI_CAST_ORBITAL dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = direction->atom_start; while (dlist != NULL) { text = gamgi_engine_find_text_atom (number, GAMGI_CAST_ATOM dlist->data); if (text != NULL) return text; dlist = dlist->next; } return NULL; } gamgi_text *gamgi_engine_find_text_plane (unsigned int number, gamgi_plane *plane) { gamgi_text *text; gamgi_dlist *dlist; dlist = plane->text_start; while (dlist != NULL) { text = gamgi_engine_find_text_text (number, GAMGI_CAST_TEXT dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = plane->orbital_start; while (dlist != NULL) { text = gamgi_engine_find_text_orbital (number, GAMGI_CAST_ORBITAL dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = plane->atom_start; while (dlist != NULL) { text = gamgi_engine_find_text_atom (number, GAMGI_CAST_ATOM dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = plane->direction_start; while (dlist != NULL) { text = gamgi_engine_find_text_direction (number, GAMGI_CAST_DIRECTION dlist->data); if (text != NULL) return text; dlist = dlist->next; } return NULL; } gamgi_text *gamgi_engine_find_text_group (unsigned int number, gamgi_group *group) { gamgi_text *text; gamgi_dlist *dlist; dlist = group->text_start; while (dlist != NULL) { text = gamgi_engine_find_text_text (number, GAMGI_CAST_TEXT dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = group->orbital_start; while (dlist != NULL) { text = gamgi_engine_find_text_orbital (number, GAMGI_CAST_ORBITAL dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = group->atom_start; while (dlist != NULL) { text = gamgi_engine_find_text_atom (number, GAMGI_CAST_ATOM dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = group->direction_start; while (dlist != NULL) { text = gamgi_engine_find_text_direction (number, GAMGI_CAST_DIRECTION dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = group->plane_start; while (dlist != NULL) { text = gamgi_engine_find_text_plane (number, GAMGI_CAST_PLANE dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = group->group_start; while (dlist != NULL) { text = gamgi_engine_find_text_group (number, GAMGI_CAST_GROUP dlist->data); if (text != NULL) return text; dlist = dlist->next; } return NULL; } gamgi_text *gamgi_engine_find_text_molecule (unsigned int number, gamgi_molecule *molecule) { gamgi_text *text; gamgi_dlist *dlist; dlist = molecule->text_start; while (dlist != NULL) { text = gamgi_engine_find_text_text (number, GAMGI_CAST_TEXT dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = molecule->orbital_start; while (dlist != NULL) { text = gamgi_engine_find_text_orbital (number, GAMGI_CAST_ORBITAL dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = molecule->atom_start; while (dlist != NULL) { text = gamgi_engine_find_text_atom (number, GAMGI_CAST_ATOM dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = molecule->direction_start; while (dlist != NULL) { text = gamgi_engine_find_text_direction (number, GAMGI_CAST_DIRECTION dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = molecule->plane_start; while (dlist != NULL) { text = gamgi_engine_find_text_plane (number, GAMGI_CAST_PLANE dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = molecule->group_start; while (dlist != NULL) { text = gamgi_engine_find_text_group (number, GAMGI_CAST_GROUP dlist->data); if (text != NULL) return text; dlist = dlist->next; } return NULL; } gamgi_text *gamgi_engine_find_text_cluster (unsigned int number, gamgi_cluster *cluster) { gamgi_text *text; gamgi_dlist *dlist; dlist = cluster->text_start; while (dlist != NULL) { text = gamgi_engine_find_text_text (number, GAMGI_CAST_TEXT dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = cluster->orbital_start; while (dlist != NULL) { text = gamgi_engine_find_text_orbital (number, GAMGI_CAST_ORBITAL dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = cluster->atom_start; while (dlist != NULL) { text = gamgi_engine_find_text_atom (number, GAMGI_CAST_ATOM dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = cluster->direction_start; while (dlist != NULL) { text = gamgi_engine_find_text_direction (number, GAMGI_CAST_DIRECTION dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = cluster->plane_start; while (dlist != NULL) { text = gamgi_engine_find_text_plane (number, GAMGI_CAST_PLANE dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = cluster->group_start; while (dlist != NULL) { text = gamgi_engine_find_text_group (number, GAMGI_CAST_GROUP dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = cluster->molecule_start; while (dlist != NULL) { text = gamgi_engine_find_text_molecule (number, GAMGI_CAST_MOLECULE dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = cluster->cluster_start; while (dlist != NULL) { text = gamgi_engine_find_text_cluster (number, GAMGI_CAST_CLUSTER dlist->data); if (text != NULL) return text; dlist = dlist->next; } return NULL; } gamgi_text *gamgi_engine_find_text_cell (unsigned int number, gamgi_cell *cell) { gamgi_text *text; gamgi_dlist *dlist; dlist = cell->text_start; while (dlist != NULL) { text = gamgi_engine_find_text_text (number, GAMGI_CAST_TEXT dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = cell->orbital_start; while (dlist != NULL) { text = gamgi_engine_find_text_orbital (number, GAMGI_CAST_ORBITAL dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = cell->atom_start; while (dlist != NULL) { text = gamgi_engine_find_text_atom (number, GAMGI_CAST_ATOM dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = cell->direction_start; while (dlist != NULL) { text = gamgi_engine_find_text_direction (number, GAMGI_CAST_DIRECTION dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = cell->plane_start; while (dlist != NULL) { text = gamgi_engine_find_text_plane (number, GAMGI_CAST_PLANE dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = cell->group_start; while (dlist != NULL) { text = gamgi_engine_find_text_group (number, GAMGI_CAST_GROUP dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = cell->molecule_start; while (dlist != NULL) { text = gamgi_engine_find_text_molecule (number, GAMGI_CAST_MOLECULE dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = cell->cluster_start; while (dlist != NULL) { text = gamgi_engine_find_text_cluster (number, GAMGI_CAST_CLUSTER dlist->data); if (text != NULL) return text; dlist = dlist->next; } return NULL; } gamgi_text *gamgi_engine_find_text_arrow (unsigned int number, gamgi_arrow *arrow) { gamgi_text *text; gamgi_dlist *dlist; dlist = arrow->text_start; while (dlist != NULL) { text = gamgi_engine_find_text_text (number, GAMGI_CAST_TEXT dlist->data); if (text != NULL) return text; dlist = dlist->next; } return NULL; } gamgi_text *gamgi_engine_find_text_shape (unsigned int number, gamgi_shape *shape) { gamgi_text *text; gamgi_dlist *dlist; dlist = shape->text_start; while (dlist != NULL) { text = gamgi_engine_find_text_text (number, GAMGI_CAST_TEXT dlist->data); if (text != NULL) return text; dlist = dlist->next; } return NULL; } gamgi_text *gamgi_engine_find_text_graph (unsigned int number, gamgi_graph *graph) { gamgi_text *text; gamgi_dlist *dlist; dlist = graph->text_start; while (dlist != NULL) { text = gamgi_engine_find_text_text (number, GAMGI_CAST_TEXT dlist->data); if (text != NULL) return text; dlist = dlist->next; } return NULL; } gamgi_text *gamgi_engine_find_text_assembly (unsigned int number, gamgi_assembly *assembly) { gamgi_text *text; gamgi_dlist *dlist; dlist = assembly->text_start; while (dlist != NULL) { text = gamgi_engine_find_text_text (number, GAMGI_CAST_TEXT dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = assembly->orbital_start; while (dlist != NULL) { text = gamgi_engine_find_text_orbital (number, GAMGI_CAST_ORBITAL dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = assembly->atom_start; while (dlist != NULL) { text = gamgi_engine_find_text_atom (number, GAMGI_CAST_ATOM dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = assembly->direction_start; while (dlist != NULL) { text = gamgi_engine_find_text_direction (number, GAMGI_CAST_DIRECTION dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = assembly->plane_start; while (dlist != NULL) { text = gamgi_engine_find_text_plane (number, GAMGI_CAST_PLANE dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = assembly->group_start; while (dlist != NULL) { text = gamgi_engine_find_text_group (number, GAMGI_CAST_GROUP dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = assembly->molecule_start; while (dlist != NULL) { text = gamgi_engine_find_text_molecule (number, GAMGI_CAST_MOLECULE dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = assembly->cluster_start; while (dlist != NULL) { text = gamgi_engine_find_text_cluster (number, GAMGI_CAST_CLUSTER dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = assembly->cell_start; while (dlist != NULL) { text = gamgi_engine_find_text_cell (number, GAMGI_CAST_CELL dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = assembly->arrow_start; while (dlist != NULL) { text = gamgi_engine_find_text_arrow (number, GAMGI_CAST_ARROW dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = assembly->shape_start; while (dlist != NULL) { text = gamgi_engine_find_text_shape (number, GAMGI_CAST_SHAPE dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = assembly->graph_start; while (dlist != NULL) { text = gamgi_engine_find_text_graph (number, GAMGI_CAST_GRAPH dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = assembly->assembly_start; while (dlist != NULL) { text = gamgi_engine_find_text_assembly (number, GAMGI_CAST_ASSEMBLY dlist->data); if (text != NULL) return text; dlist = dlist->next; } return NULL; } gamgi_text *gamgi_engine_find_text_layer (unsigned int number, gamgi_layer *layer) { gamgi_text *text; gamgi_dlist *dlist; dlist = layer->text_start; while (dlist != NULL) { text = gamgi_engine_find_text_text (number, GAMGI_CAST_TEXT dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = layer->orbital_start; while (dlist != NULL) { text = gamgi_engine_find_text_orbital (number, GAMGI_CAST_ORBITAL dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = layer->atom_start; while (dlist != NULL) { text = gamgi_engine_find_text_atom (number, GAMGI_CAST_ATOM dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = layer->direction_start; while (dlist != NULL) { text = gamgi_engine_find_text_direction (number, GAMGI_CAST_DIRECTION dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = layer->plane_start; while (dlist != NULL) { text = gamgi_engine_find_text_plane (number, GAMGI_CAST_PLANE dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = layer->group_start; while (dlist != NULL) { text = gamgi_engine_find_text_group (number, GAMGI_CAST_GROUP dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = layer->molecule_start; while (dlist != NULL) { text = gamgi_engine_find_text_molecule (number, GAMGI_CAST_MOLECULE dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = layer->cluster_start; while (dlist != NULL) { text = gamgi_engine_find_text_cluster (number, GAMGI_CAST_CLUSTER dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = layer->cell_start; while (dlist != NULL) { text = gamgi_engine_find_text_cell (number, GAMGI_CAST_CELL dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = layer->arrow_start; while (dlist != NULL) { text = gamgi_engine_find_text_arrow (number, GAMGI_CAST_ARROW dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = layer->shape_start; while (dlist != NULL) { text = gamgi_engine_find_text_shape (number, GAMGI_CAST_SHAPE dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = layer->graph_start; while (dlist != NULL) { text = gamgi_engine_find_text_graph (number, GAMGI_CAST_GRAPH dlist->data); if (text != NULL) return text; dlist = dlist->next; } dlist = layer->assembly_start; while (dlist != NULL) { text = gamgi_engine_find_text_assembly (number, GAMGI_CAST_ASSEMBLY dlist->data); if (text != NULL) return text; dlist = dlist->next; } return NULL; } gamgi_text *gamgi_engine_find_text_window (unsigned int number, gamgi_window *window) { gamgi_text *text; gamgi_dlist *dlist; dlist = window->layer_start; while (dlist != NULL) { text = gamgi_engine_find_text_layer (number, GAMGI_CAST_LAYER dlist->data); if (text != NULL) return text; dlist = dlist->next; } return NULL; } gamgi_text *gamgi_engine_find_text_gamgi (unsigned int number) { gamgi_window *window; gamgi_text *text; window = gamgi->window_start; while (window != NULL) { text = gamgi_engine_find_text_window (number, window); if (text != NULL) return text; window = window->next; } return NULL; } gamgi_orbital *gamgi_engine_find_orbital_orbital (unsigned int number, gamgi_orbital *orbital) { if (orbital->object.number == number) return orbital; return NULL; } gamgi_orbital *gamgi_engine_find_orbital_bond (unsigned int number, gamgi_bond *bond) { gamgi_orbital *orbital; gamgi_dlist *dlist; dlist = bond->orbital_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_orbital (number, GAMGI_CAST_ORBITAL dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } return NULL; } gamgi_orbital *gamgi_engine_find_orbital_atom (unsigned int number, gamgi_atom *atom) { gamgi_orbital *orbital; gamgi_dlist *dlist; dlist = atom->orbital_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_orbital (number, GAMGI_CAST_ORBITAL dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } dlist = atom->bond_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_bond (number, GAMGI_CAST_BOND dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } return NULL; } gamgi_orbital *gamgi_engine_find_orbital_direction (unsigned int number, gamgi_direction *direction) { gamgi_orbital *orbital; gamgi_dlist *dlist; dlist = direction->orbital_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_orbital (number, GAMGI_CAST_ORBITAL dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } dlist = direction->atom_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_atom (number, GAMGI_CAST_ATOM dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } return NULL; } gamgi_orbital *gamgi_engine_find_orbital_plane (unsigned int number, gamgi_plane *plane) { gamgi_orbital *orbital; gamgi_dlist *dlist; dlist = plane->orbital_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_orbital (number, GAMGI_CAST_ORBITAL dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } dlist = plane->atom_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_atom (number, GAMGI_CAST_ATOM dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } dlist = plane->direction_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_direction (number, GAMGI_CAST_DIRECTION dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } return NULL; } gamgi_orbital *gamgi_engine_find_orbital_group (unsigned int number, gamgi_group *group) { gamgi_orbital *orbital; gamgi_dlist *dlist; dlist = group->orbital_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_orbital (number, GAMGI_CAST_ORBITAL dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } dlist = group->atom_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_atom (number, GAMGI_CAST_ATOM dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } dlist = group->direction_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_direction (number, GAMGI_CAST_DIRECTION dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } dlist = group->plane_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_plane (number, GAMGI_CAST_PLANE dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } dlist = group->group_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_group (number, GAMGI_CAST_GROUP dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } return NULL; } gamgi_orbital *gamgi_engine_find_orbital_molecule (unsigned int number, gamgi_molecule *molecule) { gamgi_orbital *orbital; gamgi_dlist *dlist; dlist = molecule->orbital_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_orbital (number, GAMGI_CAST_ORBITAL dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } dlist = molecule->atom_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_atom (number, GAMGI_CAST_ATOM dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } dlist = molecule->direction_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_direction (number, GAMGI_CAST_DIRECTION dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } dlist = molecule->plane_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_plane (number, GAMGI_CAST_PLANE dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } dlist = molecule->group_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_group (number, GAMGI_CAST_GROUP dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } return NULL; } gamgi_orbital *gamgi_engine_find_orbital_cluster (unsigned int number, gamgi_cluster *cluster) { gamgi_orbital *orbital; gamgi_dlist *dlist; dlist = cluster->orbital_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_orbital (number, GAMGI_CAST_ORBITAL dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } dlist = cluster->atom_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_atom (number, GAMGI_CAST_ATOM dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } dlist = cluster->direction_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_direction (number, GAMGI_CAST_DIRECTION dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } dlist = cluster->plane_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_plane (number, GAMGI_CAST_PLANE dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } dlist = cluster->group_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_group (number, GAMGI_CAST_GROUP dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } dlist = cluster->molecule_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_molecule (number, GAMGI_CAST_MOLECULE dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } dlist = cluster->cluster_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_cluster (number, GAMGI_CAST_CLUSTER dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } return NULL; } gamgi_orbital *gamgi_engine_find_orbital_cell (unsigned int number, gamgi_cell *cell) { gamgi_orbital *orbital; gamgi_dlist *dlist; dlist = cell->orbital_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_orbital (number, GAMGI_CAST_ORBITAL dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } dlist = cell->atom_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_atom (number, GAMGI_CAST_ATOM dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } dlist = cell->direction_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_direction (number, GAMGI_CAST_DIRECTION dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } dlist = cell->plane_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_plane (number, GAMGI_CAST_PLANE dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } dlist = cell->group_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_group (number, GAMGI_CAST_GROUP dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } dlist = cell->molecule_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_molecule (number, GAMGI_CAST_MOLECULE dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } dlist = cell->cluster_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_cluster (number, GAMGI_CAST_CLUSTER dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } return NULL; } gamgi_orbital *gamgi_engine_find_orbital_assembly (unsigned int number, gamgi_assembly *assembly) { gamgi_orbital *orbital; gamgi_dlist *dlist; dlist = assembly->orbital_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_orbital (number, GAMGI_CAST_ORBITAL dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } dlist = assembly->atom_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_atom (number, GAMGI_CAST_ATOM dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } dlist = assembly->direction_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_direction (number, GAMGI_CAST_DIRECTION dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } dlist = assembly->plane_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_plane (number, GAMGI_CAST_PLANE dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } dlist = assembly->group_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_group (number, GAMGI_CAST_GROUP dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } dlist = assembly->molecule_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_molecule (number, GAMGI_CAST_MOLECULE dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } dlist = assembly->cluster_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_cluster (number, GAMGI_CAST_CLUSTER dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } dlist = assembly->cell_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_cell (number, GAMGI_CAST_CELL dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } dlist = assembly->assembly_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_assembly (number, GAMGI_CAST_ASSEMBLY dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } return NULL; } gamgi_orbital *gamgi_engine_find_orbital_layer (unsigned int number, gamgi_layer *layer) { gamgi_orbital *orbital; gamgi_dlist *dlist; dlist = layer->orbital_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_orbital (number, GAMGI_CAST_ORBITAL dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } dlist = layer->atom_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_atom (number, GAMGI_CAST_ATOM dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } dlist = layer->direction_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_direction (number, GAMGI_CAST_DIRECTION dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } dlist = layer->plane_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_plane (number, GAMGI_CAST_PLANE dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } dlist = layer->group_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_group (number, GAMGI_CAST_GROUP dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } dlist = layer->molecule_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_molecule (number, GAMGI_CAST_MOLECULE dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } dlist = layer->cluster_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_cluster (number, GAMGI_CAST_CLUSTER dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } dlist = layer->cell_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_cell (number, GAMGI_CAST_CELL dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } dlist = layer->assembly_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_assembly (number, GAMGI_CAST_ASSEMBLY dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } return NULL; } gamgi_orbital *gamgi_engine_find_orbital_window (unsigned int number, gamgi_window *window) { gamgi_orbital *orbital; gamgi_dlist *dlist; dlist = window->layer_start; while (dlist != NULL) { orbital = gamgi_engine_find_orbital_layer (number, GAMGI_CAST_LAYER dlist->data); if (orbital != NULL) return orbital; dlist = dlist->next; } return NULL; } gamgi_orbital *gamgi_engine_find_orbital_gamgi (unsigned int number) { gamgi_window *window; gamgi_orbital *orbital; window = gamgi->window_start; while (window != NULL) { orbital = gamgi_engine_find_orbital_window (number, window); if (orbital != NULL) return orbital; window = window->next; } return NULL; } gamgi_atom *gamgi_engine_find_atom_atom (unsigned int number, gamgi_atom *atom) { if (atom->object.number == number) return atom; return NULL; } gamgi_atom *gamgi_engine_find_atom_direction (unsigned int number, gamgi_direction *direction) { gamgi_atom *atom; gamgi_dlist *dlist; dlist = direction->atom_start; while (dlist != NULL) { atom = gamgi_engine_find_atom_atom (number, GAMGI_CAST_ATOM dlist->data); if (atom != NULL) return atom; dlist = dlist->next; } return NULL; } gamgi_atom *gamgi_engine_find_atom_plane (unsigned int number, gamgi_plane *plane) { gamgi_atom *atom; gamgi_dlist *dlist; dlist = plane->atom_start; while (dlist != NULL) { atom = gamgi_engine_find_atom_atom (number, GAMGI_CAST_ATOM dlist->data); if (atom != NULL) return atom; dlist = dlist->next; } dlist = plane->direction_start; while (dlist != NULL) { atom = gamgi_engine_find_atom_direction (number, GAMGI_CAST_DIRECTION dlist->data); if (atom != NULL) return atom; dlist = dlist->next; } return NULL; } gamgi_atom *gamgi_engine_find_atom_group (unsigned int number, gamgi_group *group) { gamgi_atom *atom; gamgi_dlist *dlist; dlist = group->atom_start; while (dlist != NULL) { atom = gamgi_engine_find_atom_atom (number, GAMGI_CAST_ATOM dlist->data); if (atom != NULL) return atom; dlist = dlist->next; } dlist = group->direction_start; while (dlist != NULL) { atom = gamgi_engine_find_atom_direction (number, GAMGI_CAST_DIRECTION dlist->data); if (atom != NULL) return atom; dlist = dlist->next; } dlist = group->plane_start; while (dlist != NULL) { atom = gamgi_engine_find_atom_plane (number, GAMGI_CAST_PLANE dlist->data); if (atom != NULL) return atom; dlist = dlist->next; } dlist = group->group_start; while (dlist != NULL) { atom = gamgi_engine_find_atom_group (number, GAMGI_CAST_GROUP dlist->data); if (atom != NULL) return atom; dlist = dlist->next; } return NULL; } gamgi_atom *gamgi_engine_find_atom_molecule (unsigned int number, gamgi_molecule *molecule) { gamgi_atom *atom; gamgi_dlist *dlist; dlist = molecule->atom_start; while (dlist != NULL) { atom = gamgi_engine_find_atom_atom (number, GAMGI_CAST_ATOM dlist->data); if (atom != NULL) return atom; dlist = dlist->next; } dlist = molecule->direction_start; while (dlist != NULL) { atom = gamgi_engine_find_atom_direction (number, GAMGI_CAST_DIRECTION dlist->data); if (atom != NULL) return atom; dlist = dlist->next; } dlist = molecule->plane_start; while (dlist != NULL) { atom = gamgi_engine_find_atom_plane (number, GAMGI_CAST_PLANE dlist->data); if (atom != NULL) return atom; dlist = dlist->next; } dlist = molecule->group_start; while (dlist != NULL) { atom = gamgi_engine_find_atom_group (number, GAMGI_CAST_GROUP dlist->data); if (atom != NULL) return atom; dlist = dlist->next; } return NULL; } gamgi_atom *gamgi_engine_find_atom_cluster (unsigned int number, gamgi_cluster *cluster) { gamgi_atom *atom; gamgi_dlist *dlist; dlist = cluster->atom_start; while (dlist != NULL) { atom = gamgi_engine_find_atom_atom (number, GAMGI_CAST_ATOM dlist->data); if (atom != NULL) return atom; dlist = dlist->next; } dlist = cluster->direction_start; while (dlist != NULL) { atom = gamgi_engine_find_atom_direction (number, GAMGI_CAST_DIRECTION dlist->data); if (atom != NULL) return atom; dlist = dlist->next; } dlist = cluster->plane_start; while (dlist != NULL) { atom = gamgi_engine_find_atom_plane (number, GAMGI_CAST_PLANE dlist->data); if (atom != NULL) return atom; dlist = dlist->next; } dlist = cluster->group_start; while (dlist != NULL) { atom = gamgi_engine_find_atom_group (number, GAMGI_CAST_GROUP dlist->data); if (atom != NULL) return atom; dlist = dlist->next; } dlist = cluster->molecule_start; while (dlist != NULL) { atom = gamgi_engine_find_atom_molecule (number, GAMGI_CAST_MOLECULE dlist->data); if (atom != NULL) return atom; dlist = dlist->next; } dlist = cluster->cluster_start; while (dlist != NULL) { atom = gamgi_engine_find_atom_cluster (number, GAMGI_CAST_CLUSTER dlist->data); if (atom != NULL) return atom; dlist = dlist->next; } return NULL; } gamgi_atom *gamgi_engine_find_atom_cell (unsigned int number, gamgi_cell *cell) { gamgi_atom *atom; gamgi_dlist *dlist; dlist = cell->atom_start; while (dlist != NULL) { atom = gamgi_engine_find_atom_atom (number, GAMGI_CAST_ATOM dlist->data); if (atom != NULL) return atom; dlist = dlist->next; } dlist = cell->direction_start; while (dlist != NULL) { atom = gamgi_engine_find_atom_direction (number, GAMGI_CAST_DIRECTION dlist->data); if (atom != NULL) return atom; dlist = dlist->next; } dlist = cell->plane_start; while (dlist != NULL) { atom = gamgi_engine_find_atom_plane (number, GAMGI_CAST_PLANE dlist->data); if (atom != NULL) return atom; dlist = dlist->next; } dlist = cell->group_start; while (dlist != NULL) { atom = gamgi_engine_find_atom_group (number, GAMGI_CAST_GROUP dlist->data); if (atom != NULL) return atom; dlist = dlist->next; } dlist = cell->molecule_start; while (dlist != NULL) { atom = gamgi_engine_find_atom_molecule (number, GAMGI_CAST_MOLECULE dlist->data); if (atom != NULL) return atom; dlist = dlist->next; } dlist = cell->cluster_start; while (dlist != NULL) { atom = gamgi_engine_find_atom_cluster (number, GAMGI_CAST_CLUSTER dlist->data); if (atom != NULL) return atom; dlist = dlist->next; } return NULL; } gamgi_atom *gamgi_engine_find_atom_assembly (unsigned int number, gamgi_assembly *assembly) { gamgi_atom *atom; gamgi_dlist *dlist; dlist = assembly->atom_start; while (dlist != NULL) { atom = gamgi_engine_find_atom_atom (number, GAMGI_CAST_ATOM dlist->data); if (atom != NULL) return atom; dlist = dlist->next; } dlist = assembly->direction_start; while (dlist != NULL) { atom = gamgi_engine_find_atom_direction (number, GAMGI_CAST_DIRECTION dlist->data); if (atom != NULL) return atom; dlist = dlist->next; } dlist = assembly->plane_start; while (dlist != NULL) { atom = gamgi_engine_find_atom_plane (number, GAMGI_CAST_PLANE dlist->data); if (atom != NULL) return atom; dlist = dlist->next; } dlist = assembly->group_start; while (dlist != NULL) { atom = gamgi_engine_find_atom_group (number, GAMGI_CAST_GROUP dlist->data); if (atom != NULL) return atom; dlist = dlist->next; } dlist = assembly->molecule_start; while (dlist != NULL) { atom = gamgi_engine_find_atom_molecule (number, GAMGI_CAST_MOLECULE dlist->data); if (atom != NULL) return atom; dlist = dlist->next; } dlist = assembly->cluster_start; while (dlist != NULL) { atom = gamgi_engine_find_atom_cluster (number, GAMGI_CAST_CLUSTER dlist->data); if (atom != NULL) return atom; dlist = dlist->next; } dlist = assembly->cell_start; while (dlist != NULL) { atom = gamgi_engine_find_atom_cell (number, GAMGI_CAST_CELL dlist->data); if (atom != NULL) return atom; dlist = dlist->next; } dlist = assembly->assembly_start; while (dlist != NULL) { atom = gamgi_engine_find_atom_assembly (number, GAMGI_CAST_ASSEMBLY dlist->data); if (atom != NULL) return atom; dlist = dlist->next; } return NULL; } gamgi_atom *gamgi_engine_find_atom_layer (unsigned int number, gamgi_layer *layer) { gamgi_atom *atom; gamgi_dlist *dlist; dlist = layer->atom_start; while (dlist != NULL) { atom = gamgi_engine_find_atom_atom (number, GAMGI_CAST_ATOM dlist->data); if (atom != NULL) return atom; dlist = dlist->next; } dlist = layer->direction_start; while (dlist != NULL) { atom = gamgi_engine_find_atom_direction (number, GAMGI_CAST_DIRECTION dlist->data); if (atom != NULL) return atom; dlist = dlist->next; } dlist = layer->plane_start; while (dlist != NULL) { atom = gamgi_engine_find_atom_plane (number, GAMGI_CAST_PLANE dlist->data); if (atom != NULL) return atom; dlist = dlist->next; } dlist = layer->group_start; while (dlist != NULL) { atom = gamgi_engine_find_atom_group (number, GAMGI_CAST_GROUP dlist->data); if (atom != NULL) return atom; dlist = dlist->next; } dlist = layer->molecule_start; while (dlist != NULL) { atom = gamgi_engine_find_atom_molecule (number, GAMGI_CAST_MOLECULE dlist->data); if (atom != NULL) return atom; dlist = dlist->next; } dlist = layer->cluster_start; while (dlist != NULL) { atom = gamgi_engine_find_atom_cluster (number, GAMGI_CAST_CLUSTER dlist->data); if (atom != NULL) return atom; dlist = dlist->next; } dlist = layer->cell_start; while (dlist != NULL) { atom = gamgi_engine_find_atom_cell (number, GAMGI_CAST_CELL dlist->data); if (atom != NULL) return atom; dlist = dlist->next; } dlist = layer->assembly_start; while (dlist != NULL) { atom = gamgi_engine_find_atom_assembly (number, GAMGI_CAST_ASSEMBLY dlist->data); if (atom != NULL) return atom; dlist = dlist->next; } return NULL; } gamgi_atom *gamgi_engine_find_atom_window (unsigned int number, gamgi_window *window) { gamgi_atom *atom; gamgi_dlist *dlist; dlist = window->layer_start; while (dlist != NULL) { atom = gamgi_engine_find_atom_layer (number, GAMGI_CAST_LAYER dlist->data); if (atom != NULL) return atom; dlist = dlist->next; } return NULL; } gamgi_atom *gamgi_engine_find_atom_gamgi (unsigned int number) { gamgi_window *window; gamgi_atom *atom; window = gamgi->window_start; while (window != NULL) { atom = gamgi_engine_find_atom_window (number, window); if (atom != NULL) return atom; window = window->next; } return NULL; } gamgi_bond *gamgi_engine_find_bond_atom (unsigned int number, gamgi_atom *atom) { gamgi_bond *bond; gamgi_dlist *dlist; dlist = atom->bond_start; while (dlist != NULL) { bond = GAMGI_CAST_BOND dlist->data; if (bond->object.number == number) return bond; dlist = dlist->next; } return NULL; } gamgi_bond *gamgi_engine_find_bond_direction (unsigned int number, gamgi_direction *direction) { gamgi_bond *bond; gamgi_dlist *dlist; dlist = direction->atom_start; while (dlist != NULL) { bond = gamgi_engine_find_bond_atom (number, GAMGI_CAST_ATOM dlist->data); if (bond != NULL) return bond; dlist = dlist->next; } return NULL; } gamgi_bond *gamgi_engine_find_bond_plane (unsigned int number, gamgi_plane *plane) { gamgi_bond *bond; gamgi_dlist *dlist; dlist = plane->atom_start; while (dlist != NULL) { bond = gamgi_engine_find_bond_atom (number, GAMGI_CAST_ATOM dlist->data); if (bond != NULL) return bond; dlist = dlist->next; } dlist = plane->direction_start; while (dlist != NULL) { bond = gamgi_engine_find_bond_direction (number, GAMGI_CAST_DIRECTION dlist->data); if (bond != NULL) return bond; dlist = dlist->next; } return NULL; } gamgi_bond *gamgi_engine_find_bond_group (unsigned int number, gamgi_group *group) { gamgi_bond *bond; gamgi_dlist *dlist; dlist = group->atom_start; while (dlist != NULL) { bond = gamgi_engine_find_bond_atom (number, GAMGI_CAST_ATOM dlist->data); if (bond != NULL) return bond; dlist = dlist->next; } dlist = group->direction_start; while (dlist != NULL) { bond = gamgi_engine_find_bond_direction (number, GAMGI_CAST_DIRECTION dlist->data); if (bond != NULL) return bond; dlist = dlist->next; } dlist = group->plane_start; while (dlist != NULL) { bond = gamgi_engine_find_bond_plane (number, GAMGI_CAST_PLANE dlist->data); if (bond != NULL) return bond; dlist = dlist->next; } dlist = group->group_start; while (dlist != NULL) { bond = gamgi_engine_find_bond_group (number, GAMGI_CAST_GROUP dlist->data); if (bond != NULL) return bond; dlist = dlist->next; } return NULL; } gamgi_bond *gamgi_engine_find_bond_molecule (unsigned int number, gamgi_molecule *molecule) { gamgi_bond *bond; gamgi_dlist *dlist; dlist = molecule->atom_start; while (dlist != NULL) { bond = gamgi_engine_find_bond_atom (number, GAMGI_CAST_ATOM dlist->data); if (bond != NULL) return bond; dlist = dlist->next; } dlist = molecule->direction_start; while (dlist != NULL) { bond = gamgi_engine_find_bond_direction (number, GAMGI_CAST_DIRECTION dlist->data); if (bond != NULL) return bond; dlist = dlist->next; } dlist = molecule->plane_start; while (dlist != NULL) { bond = gamgi_engine_find_bond_plane (number, GAMGI_CAST_PLANE dlist->data); if (bond != NULL) return bond; dlist = dlist->next; } dlist = molecule->group_start; while (dlist != NULL) { bond = gamgi_engine_find_bond_group (number, GAMGI_CAST_GROUP dlist->data); if (bond != NULL) return bond; dlist = dlist->next; } return NULL; } gamgi_bond *gamgi_engine_find_bond_cluster (unsigned int number, gamgi_cluster *cluster) { gamgi_bond *bond; gamgi_dlist *dlist; dlist = cluster->atom_start; while (dlist != NULL) { bond = gamgi_engine_find_bond_atom (number, GAMGI_CAST_ATOM dlist->data); if (bond != NULL) return bond; dlist = dlist->next; } dlist = cluster->direction_start; while (dlist != NULL) { bond = gamgi_engine_find_bond_direction (number, GAMGI_CAST_DIRECTION dlist->data); if (bond != NULL) return bond; dlist = dlist->next; } dlist = cluster->plane_start; while (dlist != NULL) { bond = gamgi_engine_find_bond_plane (number, GAMGI_CAST_PLANE dlist->data); if (bond != NULL) return bond; dlist = dlist->next; } dlist = cluster->group_start; while (dlist != NULL) { bond = gamgi_engine_find_bond_group (number, GAMGI_CAST_GROUP dlist->data); if (bond != NULL) return bond; dlist = dlist->next; } dlist = cluster->molecule_start; while (dlist != NULL) { bond = gamgi_engine_find_bond_molecule (number, GAMGI_CAST_MOLECULE dlist->data); if (bond != NULL) return bond; dlist = dlist->next; } dlist = cluster->cluster_start; while (dlist != NULL) { bond = gamgi_engine_find_bond_cluster (number, GAMGI_CAST_CLUSTER dlist->data); if (bond != NULL) return bond; dlist = dlist->next; } return NULL; } gamgi_bond *gamgi_engine_find_bond_cell (unsigned int number, gamgi_cell *cell) { gamgi_bond *bond; gamgi_dlist *dlist; dlist = cell->atom_start; while (dlist != NULL) { bond = gamgi_engine_find_bond_atom (number, GAMGI_CAST_ATOM dlist->data); if (bond != NULL) return bond; dlist = dlist->next; } dlist = cell->direction_start; while (dlist != NULL) { bond = gamgi_engine_find_bond_direction (number, GAMGI_CAST_DIRECTION dlist->data); if (bond != NULL) return bond; dlist = dlist->next; } dlist = cell->plane_start; while (dlist != NULL) { bond = gamgi_engine_find_bond_plane (number, GAMGI_CAST_PLANE dlist->data); if (bond != NULL) return bond; dlist = dlist->next; } dlist = cell->group_start; while (dlist != NULL) { bond = gamgi_engine_find_bond_group (number, GAMGI_CAST_GROUP dlist->data); if (bond != NULL) return bond; dlist = dlist->next; } dlist = cell->molecule_start; while (dlist != NULL) { bond = gamgi_engine_find_bond_molecule (number, GAMGI_CAST_MOLECULE dlist->data); if (bond != NULL) return bond; dlist = dlist->next; } dlist = cell->cluster_start; while (dlist != NULL) { bond = gamgi_engine_find_bond_cluster (number, GAMGI_CAST_CLUSTER dlist->data); if (bond != NULL) return bond; dlist = dlist->next; } return NULL; } gamgi_bond *gamgi_engine_find_bond_assembly (unsigned int number, gamgi_assembly *assembly) { gamgi_bond *bond; gamgi_dlist *dlist; dlist = assembly->atom_start; while (dlist != NULL) { bond = gamgi_engine_find_bond_atom (number, GAMGI_CAST_ATOM dlist->data); if (bond != NULL) return bond; dlist = dlist->next; } dlist = assembly->direction_start; while (dlist != NULL) { bond = gamgi_engine_find_bond_direction (number, GAMGI_CAST_DIRECTION dlist->data); if (bond != NULL) return bond; dlist = dlist->next; } dlist = assembly->plane_start; while (dlist != NULL) { bond = gamgi_engine_find_bond_plane (number, GAMGI_CAST_PLANE dlist->data); if (bond != NULL) return bond; dlist = dlist->next; } dlist = assembly->group_start; while (dlist != NULL) { bond = gamgi_engine_find_bond_group (number, GAMGI_CAST_GROUP dlist->data); if (bond != NULL) return bond; dlist = dlist->next; } dlist = assembly->molecule_start; while (dlist != NULL) { bond = gamgi_engine_find_bond_molecule (number, GAMGI_CAST_MOLECULE dlist->data); if (bond != NULL) return bond; dlist = dlist->next; } dlist = assembly->cluster_start; while (dlist != NULL) { bond = gamgi_engine_find_bond_cluster (number, GAMGI_CAST_CLUSTER dlist->data); if (bond != NULL) return bond; dlist = dlist->next; } dlist = assembly->cell_start; while (dlist != NULL) { bond = gamgi_engine_find_bond_cell (number, GAMGI_CAST_CELL dlist->data); if (bond != NULL) return bond; dlist = dlist->next; } dlist = assembly->assembly_start; while (dlist != NULL) { bond = gamgi_engine_find_bond_assembly (number, GAMGI_CAST_ASSEMBLY dlist->data); if (bond != NULL) return bond; dlist = dlist->next; } return NULL; } gamgi_bond *gamgi_engine_find_bond_layer (unsigned int number, gamgi_layer *layer) { gamgi_bond *bond; gamgi_dlist *dlist; dlist = layer->atom_start; while (dlist != NULL) { bond = gamgi_engine_find_bond_atom (number, GAMGI_CAST_ATOM dlist->data); if (bond != NULL) return bond; dlist = dlist->next; } dlist = layer->direction_start; while (dlist != NULL) { bond = gamgi_engine_find_bond_direction (number, GAMGI_CAST_DIRECTION dlist->data); if (bond != NULL) return bond; dlist = dlist->next; } dlist = layer->plane_start; while (dlist != NULL) { bond = gamgi_engine_find_bond_plane (number, GAMGI_CAST_PLANE dlist->data); if (bond != NULL) return bond; dlist = dlist->next; } dlist = layer->group_start; while (dlist != NULL) { bond = gamgi_engine_find_bond_group (number, GAMGI_CAST_GROUP dlist->data); if (bond != NULL) return bond; dlist = dlist->next; } dlist = layer->molecule_start; while (dlist != NULL) { bond = gamgi_engine_find_bond_molecule (number, GAMGI_CAST_MOLECULE dlist->data); if (bond != NULL) return bond; dlist = dlist->next; } dlist = layer->cluster_start; while (dlist != NULL) { bond = gamgi_engine_find_bond_cluster (number, GAMGI_CAST_CLUSTER dlist->data); if (bond != NULL) return bond; dlist = dlist->next; } dlist = layer->cell_start; while (dlist != NULL) { bond = gamgi_engine_find_bond_cell (number, GAMGI_CAST_CELL dlist->data); if (bond != NULL) return bond; dlist = dlist->next; } dlist = layer->assembly_start; while (dlist != NULL) { bond = gamgi_engine_find_bond_assembly (number, GAMGI_CAST_ASSEMBLY dlist->data); if (bond != NULL) return bond; dlist = dlist->next; } return NULL; } gamgi_bond *gamgi_engine_find_bond_window (unsigned int number, gamgi_window *window) { gamgi_bond *bond; gamgi_dlist *dlist; dlist = window->layer_start; while (dlist != NULL) { bond = gamgi_engine_find_bond_layer (number, GAMGI_CAST_LAYER dlist->data); if (bond != NULL) return bond; dlist = dlist->next; } return NULL; } gamgi_bond *gamgi_engine_find_bond_gamgi (unsigned int number) { gamgi_window *window; gamgi_bond *bond; window = gamgi->window_start; while (window != NULL) { bond = gamgi_engine_find_bond_window (number, window); if (bond != NULL) return bond; window = window->next; } return NULL; } gamgi_direction *gamgi_engine_find_direction_direction (unsigned int number, gamgi_direction *direction) { if (direction->object.number == number) return direction; return NULL; } gamgi_direction *gamgi_engine_find_direction_plane (unsigned int number, gamgi_plane *plane) { gamgi_direction *direction; gamgi_dlist *dlist; dlist = plane->direction_start; while (dlist != NULL) { direction = gamgi_engine_find_direction_direction (number, GAMGI_CAST_DIRECTION dlist->data); if (direction != NULL) return direction; dlist = dlist->next; } return NULL; } gamgi_direction *gamgi_engine_find_direction_group (unsigned int number, gamgi_group *group) { gamgi_direction *direction; gamgi_dlist *dlist; dlist = group->direction_start; while (dlist != NULL) { direction = gamgi_engine_find_direction_direction (number, GAMGI_CAST_DIRECTION dlist->data); if (direction != NULL) return direction; dlist = dlist->next; } dlist = group->plane_start; while (dlist != NULL) { direction = gamgi_engine_find_direction_plane (number, GAMGI_CAST_PLANE dlist->data); if (direction != NULL) return direction; dlist = dlist->next; } dlist = group->group_start; while (dlist != NULL) { direction = gamgi_engine_find_direction_group (number, GAMGI_CAST_GROUP dlist->data); if (direction != NULL) return direction; dlist = dlist->next; } return NULL; } gamgi_direction *gamgi_engine_find_direction_molecule (unsigned int number, gamgi_molecule *molecule) { gamgi_direction *direction; gamgi_dlist *dlist; dlist = molecule->direction_start; while (dlist != NULL) { direction = gamgi_engine_find_direction_direction (number, GAMGI_CAST_DIRECTION dlist->data); if (direction != NULL) return direction; dlist = dlist->next; } dlist = molecule->plane_start; while (dlist != NULL) { direction = gamgi_engine_find_direction_plane (number, GAMGI_CAST_PLANE dlist->data); if (direction != NULL) return direction; dlist = dlist->next; } dlist = molecule->group_start; while (dlist != NULL) { direction = gamgi_engine_find_direction_group (number, GAMGI_CAST_GROUP dlist->data); if (direction != NULL) return direction; dlist = dlist->next; } return NULL; } gamgi_direction *gamgi_engine_find_direction_cluster (unsigned int number, gamgi_cluster *cluster) { gamgi_direction *direction; gamgi_dlist *dlist; dlist = cluster->direction_start; while (dlist != NULL) { direction = gamgi_engine_find_direction_direction (number, GAMGI_CAST_DIRECTION dlist->data); if (direction != NULL) return direction; dlist = dlist->next; } dlist = cluster->plane_start; while (dlist != NULL) { direction = gamgi_engine_find_direction_plane (number, GAMGI_CAST_PLANE dlist->data); if (direction != NULL) return direction; dlist = dlist->next; } dlist = cluster->group_start; while (dlist != NULL) { direction = gamgi_engine_find_direction_group (number, GAMGI_CAST_GROUP dlist->data); if (direction != NULL) return direction; dlist = dlist->next; } dlist = cluster->molecule_start; while (dlist != NULL) { direction = gamgi_engine_find_direction_molecule (number, GAMGI_CAST_MOLECULE dlist->data); if (direction != NULL) return direction; dlist = dlist->next; } dlist = cluster->cluster_start; while (dlist != NULL) { direction = gamgi_engine_find_direction_cluster (number, GAMGI_CAST_CLUSTER dlist->data); if (direction != NULL) return direction; dlist = dlist->next; } return NULL; } gamgi_direction *gamgi_engine_find_direction_cell (unsigned int number, gamgi_cell *cell) { gamgi_direction *direction; gamgi_dlist *dlist; dlist = cell->direction_start; while (dlist != NULL) { direction = gamgi_engine_find_direction_direction (number, GAMGI_CAST_DIRECTION dlist->data); if (direction != NULL) return direction; dlist = dlist->next; } dlist = cell->plane_start; while (dlist != NULL) { direction = gamgi_engine_find_direction_plane (number, GAMGI_CAST_PLANE dlist->data); if (direction != NULL) return direction; dlist = dlist->next; } dlist = cell->group_start; while (dlist != NULL) { direction = gamgi_engine_find_direction_group (number, GAMGI_CAST_GROUP dlist->data); if (direction != NULL) return direction; dlist = dlist->next; } dlist = cell->molecule_start; while (dlist != NULL) { direction = gamgi_engine_find_direction_molecule (number, GAMGI_CAST_MOLECULE dlist->data); if (direction != NULL) return direction; dlist = dlist->next; } dlist = cell->cluster_start; while (dlist != NULL) { direction = gamgi_engine_find_direction_cluster (number, GAMGI_CAST_CLUSTER dlist->data); if (direction != NULL) return direction; dlist = dlist->next; } return NULL; } gamgi_direction *gamgi_engine_find_direction_assembly (unsigned int number, gamgi_assembly *assembly) { gamgi_direction *direction; gamgi_dlist *dlist; dlist = assembly->direction_start; while (dlist != NULL) { direction = gamgi_engine_find_direction_direction (number, GAMGI_CAST_DIRECTION dlist->data); if (direction != NULL) return direction; dlist = dlist->next; } dlist = assembly->plane_start; while (dlist != NULL) { direction = gamgi_engine_find_direction_plane (number, GAMGI_CAST_PLANE dlist->data); if (direction != NULL) return direction; dlist = dlist->next; } dlist = assembly->group_start; while (dlist != NULL) { direction = gamgi_engine_find_direction_group (number, GAMGI_CAST_GROUP dlist->data); if (direction != NULL) return direction; dlist = dlist->next; } dlist = assembly->molecule_start; while (dlist != NULL) { direction = gamgi_engine_find_direction_molecule (number, GAMGI_CAST_MOLECULE dlist->data); if (direction != NULL) return direction; dlist = dlist->next; } dlist = assembly->cluster_start; while (dlist != NULL) { direction = gamgi_engine_find_direction_cluster (number, GAMGI_CAST_CLUSTER dlist->data); if (direction != NULL) return direction; dlist = dlist->next; } dlist = assembly->cell_start; while (dlist != NULL) { direction = gamgi_engine_find_direction_cell (number, GAMGI_CAST_CELL dlist->data); if (direction != NULL) return direction; dlist = dlist->next; } dlist = assembly->assembly_start; while (dlist != NULL) { direction = gamgi_engine_find_direction_assembly (number, GAMGI_CAST_ASSEMBLY dlist->data); if (direction != NULL) return direction; dlist = dlist->next; } return NULL; } gamgi_direction *gamgi_engine_find_direction_layer (unsigned int number, gamgi_layer *layer) { gamgi_direction *direction; gamgi_dlist *dlist; dlist = layer->direction_start; while (dlist != NULL) { direction = gamgi_engine_find_direction_direction (number, GAMGI_CAST_DIRECTION dlist->data); if (direction != NULL) return direction; dlist = dlist->next; } dlist = layer->plane_start; while (dlist != NULL) { direction = gamgi_engine_find_direction_plane (number, GAMGI_CAST_PLANE dlist->data); if (direction != NULL) return direction; dlist = dlist->next; } dlist = layer->group_start; while (dlist != NULL) { direction = gamgi_engine_find_direction_group (number, GAMGI_CAST_GROUP dlist->data); if (direction != NULL) return direction; dlist = dlist->next; } dlist = layer->molecule_start; while (dlist != NULL) { direction = gamgi_engine_find_direction_molecule (number, GAMGI_CAST_MOLECULE dlist->data); if (direction != NULL) return direction; dlist = dlist->next; } dlist = layer->cluster_start; while (dlist != NULL) { direction = gamgi_engine_find_direction_cluster (number, GAMGI_CAST_CLUSTER dlist->data); if (direction != NULL) return direction; dlist = dlist->next; } dlist = layer->cell_start; while (dlist != NULL) { direction = gamgi_engine_find_direction_cell (number, GAMGI_CAST_CELL dlist->data); if (direction != NULL) return direction; dlist = dlist->next; } dlist = layer->assembly_start; while (dlist != NULL) { direction = gamgi_engine_find_direction_assembly (number, GAMGI_CAST_ASSEMBLY dlist->data); if (direction != NULL) return direction; dlist = dlist->next; } return NULL; } gamgi_direction *gamgi_engine_find_direction_window (unsigned int number, gamgi_window *window) { gamgi_direction *direction; gamgi_dlist *dlist; dlist = window->layer_start; while (dlist != NULL) { direction = gamgi_engine_find_direction_layer (number, GAMGI_CAST_LAYER dlist->data); if (direction != NULL) return direction; dlist = dlist->next; } return NULL; } gamgi_direction *gamgi_engine_find_direction_gamgi (unsigned int number) { gamgi_window *window; gamgi_direction *direction; window = gamgi->window_start; while (window != NULL) { direction = gamgi_engine_find_direction_window (number, window); if (direction != NULL) return direction; window = window->next; } return NULL; } gamgi_plane *gamgi_engine_find_plane_plane (unsigned int number, gamgi_plane *plane) { if (plane->object.number == number) return plane; return NULL; } gamgi_plane *gamgi_engine_find_plane_group (unsigned int number, gamgi_group *group) { gamgi_plane *plane; gamgi_dlist *dlist; dlist = group->plane_start; while (dlist != NULL) { plane = gamgi_engine_find_plane_plane (number, GAMGI_CAST_PLANE dlist->data); if (plane != NULL) return plane; dlist = dlist->next; } dlist = group->group_start; while (dlist != NULL) { plane = gamgi_engine_find_plane_group (number, GAMGI_CAST_GROUP dlist->data); if (plane != NULL) return plane; dlist = dlist->next; } return NULL; } gamgi_plane *gamgi_engine_find_plane_molecule (unsigned int number, gamgi_molecule *molecule) { gamgi_plane *plane; gamgi_dlist *dlist; dlist = molecule->plane_start; while (dlist != NULL) { plane = gamgi_engine_find_plane_plane (number, GAMGI_CAST_PLANE dlist->data); if (plane != NULL) return plane; dlist = dlist->next; } dlist = molecule->group_start; while (dlist != NULL) { plane = gamgi_engine_find_plane_group (number, GAMGI_CAST_GROUP dlist->data); if (plane != NULL) return plane; dlist = dlist->next; } return NULL; } gamgi_plane *gamgi_engine_find_plane_cluster (unsigned int number, gamgi_cluster *cluster) { gamgi_plane *plane; gamgi_dlist *dlist; dlist = cluster->plane_start; while (dlist != NULL) { plane = gamgi_engine_find_plane_plane (number, GAMGI_CAST_PLANE dlist->data); if (plane != NULL) return plane; dlist = dlist->next; } dlist = cluster->group_start; while (dlist != NULL) { plane = gamgi_engine_find_plane_group (number, GAMGI_CAST_GROUP dlist->data); if (plane != NULL) return plane; dlist = dlist->next; } dlist = cluster->molecule_start; while (dlist != NULL) { plane = gamgi_engine_find_plane_molecule (number, GAMGI_CAST_MOLECULE dlist->data); if (plane != NULL) return plane; dlist = dlist->next; } dlist = cluster->cluster_start; while (dlist != NULL) { plane = gamgi_engine_find_plane_cluster (number, GAMGI_CAST_CLUSTER dlist->data); if (plane != NULL) return plane; dlist = dlist->next; } return NULL; } gamgi_plane *gamgi_engine_find_plane_cell (unsigned int number, gamgi_cell *cell) { gamgi_plane *plane; gamgi_dlist *dlist; dlist = cell->plane_start; while (dlist != NULL) { plane = gamgi_engine_find_plane_plane (number, GAMGI_CAST_PLANE dlist->data); if (plane != NULL) return plane; dlist = dlist->next; } dlist = cell->group_start; while (dlist != NULL) { plane = gamgi_engine_find_plane_group (number, GAMGI_CAST_GROUP dlist->data); if (plane != NULL) return plane; dlist = dlist->next; } dlist = cell->molecule_start; while (dlist != NULL) { plane = gamgi_engine_find_plane_molecule (number, GAMGI_CAST_MOLECULE dlist->data); if (plane != NULL) return plane; dlist = dlist->next; } dlist = cell->cluster_start; while (dlist != NULL) { plane = gamgi_engine_find_plane_cluster (number, GAMGI_CAST_CLUSTER dlist->data); if (plane != NULL) return plane; dlist = dlist->next; } return NULL; } gamgi_plane *gamgi_engine_find_plane_assembly (unsigned int number, gamgi_assembly *assembly) { gamgi_plane *plane; gamgi_dlist *dlist; dlist = assembly->plane_start; while (dlist != NULL) { plane = gamgi_engine_find_plane_plane (number, GAMGI_CAST_PLANE dlist->data); if (plane != NULL) return plane; dlist = dlist->next; } dlist = assembly->group_start; while (dlist != NULL) { plane = gamgi_engine_find_plane_group (number, GAMGI_CAST_GROUP dlist->data); if (plane != NULL) return plane; dlist = dlist->next; } dlist = assembly->molecule_start; while (dlist != NULL) { plane = gamgi_engine_find_plane_molecule (number, GAMGI_CAST_MOLECULE dlist->data); if (plane != NULL) return plane; dlist = dlist->next; } dlist = assembly->cluster_start; while (dlist != NULL) { plane = gamgi_engine_find_plane_cluster (number, GAMGI_CAST_CLUSTER dlist->data); if (plane != NULL) return plane; dlist = dlist->next; } dlist = assembly->cell_start; while (dlist != NULL) { plane = gamgi_engine_find_plane_cell (number, GAMGI_CAST_CELL dlist->data); if (plane != NULL) return plane; dlist = dlist->next; } dlist = assembly->assembly_start; while (dlist != NULL) { plane = gamgi_engine_find_plane_assembly (number, GAMGI_CAST_ASSEMBLY dlist->data); if (plane != NULL) return plane; dlist = dlist->next; } return NULL; } gamgi_plane *gamgi_engine_find_plane_layer (unsigned int number, gamgi_layer *layer) { gamgi_plane *plane; gamgi_dlist *dlist; dlist = layer->plane_start; while (dlist != NULL) { plane = gamgi_engine_find_plane_plane (number, GAMGI_CAST_PLANE dlist->data); if (plane != NULL) return plane; dlist = dlist->next; } dlist = layer->group_start; while (dlist != NULL) { plane = gamgi_engine_find_plane_group (number, GAMGI_CAST_GROUP dlist->data); if (plane != NULL) return plane; dlist = dlist->next; } dlist = layer->molecule_start; while (dlist != NULL) { plane = gamgi_engine_find_plane_molecule (number, GAMGI_CAST_MOLECULE dlist->data); if (plane != NULL) return plane; dlist = dlist->next; } dlist = layer->cluster_start; while (dlist != NULL) { plane = gamgi_engine_find_plane_cluster (number, GAMGI_CAST_CLUSTER dlist->data); if (plane != NULL) return plane; dlist = dlist->next; } dlist = layer->cell_start; while (dlist != NULL) { plane = gamgi_engine_find_plane_cell (number, GAMGI_CAST_CELL dlist->data); if (plane != NULL) return plane; dlist = dlist->next; } dlist = layer->assembly_start; while (dlist != NULL) { plane = gamgi_engine_find_plane_assembly (number, GAMGI_CAST_ASSEMBLY dlist->data); if (plane != NULL) return plane; dlist = dlist->next; } return NULL; } gamgi_plane *gamgi_engine_find_plane_window (unsigned int number, gamgi_window *window) { gamgi_plane *plane; gamgi_dlist *dlist; dlist = window->layer_start; while (dlist != NULL) { plane = gamgi_engine_find_plane_layer (number, GAMGI_CAST_LAYER dlist->data); if (plane != NULL) return plane; dlist = dlist->next; } return NULL; } gamgi_plane *gamgi_engine_find_plane_gamgi (unsigned int number) { gamgi_window *window; gamgi_plane *plane; window = gamgi->window_start; while (window != NULL) { plane = gamgi_engine_find_plane_window (number, window); if (plane != NULL) return plane; window = window->next; } return NULL; } gamgi_group *gamgi_engine_find_group_group (unsigned int number, gamgi_group *group) { gamgi_group *new_group; gamgi_dlist *dlist; if (group->object.number == number) return group; dlist = group->group_start; while (dlist != NULL) { new_group = gamgi_engine_find_group_group (number, GAMGI_CAST_GROUP dlist->data); if (new_group != NULL) return new_group; dlist = dlist->next; } return NULL; } gamgi_group *gamgi_engine_find_group_molecule (unsigned int number, gamgi_molecule *molecule) { gamgi_group *group; gamgi_dlist *dlist; dlist = molecule->group_start; while (dlist != NULL) { group = gamgi_engine_find_group_group (number, GAMGI_CAST_GROUP dlist->data); if (group != NULL) return group; dlist = dlist->next; } return NULL; } gamgi_group *gamgi_engine_find_group_cluster (unsigned int number, gamgi_cluster *cluster) { gamgi_group *group; gamgi_dlist *dlist; dlist = cluster->group_start; while (dlist != NULL) { group = gamgi_engine_find_group_group (number, GAMGI_CAST_GROUP dlist->data); if (group != NULL) return group; dlist = dlist->next; } dlist = cluster->molecule_start; while (dlist != NULL) { group = gamgi_engine_find_group_molecule (number, GAMGI_CAST_MOLECULE dlist->data); if (group != NULL) return group; dlist = dlist->next; } dlist = cluster->cluster_start; while (dlist != NULL) { group = gamgi_engine_find_group_cluster (number, GAMGI_CAST_CLUSTER dlist->data); if (group != NULL) return group; dlist = dlist->next; } return NULL; } gamgi_group *gamgi_engine_find_group_cell (unsigned int number, gamgi_cell *cell) { gamgi_group *group; gamgi_dlist *dlist; dlist = cell->group_start; while (dlist != NULL) { group = gamgi_engine_find_group_group (number, GAMGI_CAST_GROUP dlist->data); if (group != NULL) return group; dlist = dlist->next; } dlist = cell->molecule_start; while (dlist != NULL) { group = gamgi_engine_find_group_molecule (number, GAMGI_CAST_MOLECULE dlist->data); if (group != NULL) return group; dlist = dlist->next; } dlist = cell->cluster_start; while (dlist != NULL) { group = gamgi_engine_find_group_cluster (number, GAMGI_CAST_CLUSTER dlist->data); if (group != NULL) return group; dlist = dlist->next; } return NULL; } gamgi_group *gamgi_engine_find_group_assembly (unsigned int number, gamgi_assembly *assembly) { gamgi_group *group; gamgi_dlist *dlist; dlist = assembly->group_start; while (dlist != NULL) { group = gamgi_engine_find_group_group (number, GAMGI_CAST_GROUP dlist->data); if (group != NULL) return group; dlist = dlist->next; } dlist = assembly->molecule_start; while (dlist != NULL) { group = gamgi_engine_find_group_molecule (number, GAMGI_CAST_MOLECULE dlist->data); if (group != NULL) return group; dlist = dlist->next; } dlist = assembly->cluster_start; while (dlist != NULL) { group = gamgi_engine_find_group_cluster (number, GAMGI_CAST_CLUSTER dlist->data); if (group != NULL) return group; dlist = dlist->next; } dlist = assembly->cell_start; while (dlist != NULL) { group = gamgi_engine_find_group_cell (number, GAMGI_CAST_CELL dlist->data); if (group != NULL) return group; dlist = dlist->next; } dlist = assembly->assembly_start; while (dlist != NULL) { group = gamgi_engine_find_group_assembly (number, GAMGI_CAST_ASSEMBLY dlist->data); if (group != NULL) return group; dlist = dlist->next; } return NULL; } gamgi_group *gamgi_engine_find_group_layer (unsigned int number, gamgi_layer *layer) { gamgi_group *group; gamgi_dlist *dlist; dlist = layer->group_start; while (dlist != NULL) { group = gamgi_engine_find_group_group (number, GAMGI_CAST_GROUP dlist->data); if (group != NULL) return group; dlist = dlist->next; } dlist = layer->molecule_start; while (dlist != NULL) { group = gamgi_engine_find_group_molecule (number, GAMGI_CAST_MOLECULE dlist->data); if (group != NULL) return group; dlist = dlist->next; } dlist = layer->cluster_start; while (dlist != NULL) { group = gamgi_engine_find_group_cluster (number, GAMGI_CAST_CLUSTER dlist->data); if (group != NULL) return group; dlist = dlist->next; } dlist = layer->cell_start; while (dlist != NULL) { group = gamgi_engine_find_group_cell (number, GAMGI_CAST_CELL dlist->data); if (group != NULL) return group; dlist = dlist->next; } dlist = layer->assembly_start; while (dlist != NULL) { group = gamgi_engine_find_group_assembly (number, GAMGI_CAST_ASSEMBLY dlist->data); if (group != NULL) return group; dlist = dlist->next; } return NULL; } gamgi_group *gamgi_engine_find_group_window (unsigned int number, gamgi_window *window) { gamgi_group *group; gamgi_dlist *dlist; dlist = window->layer_start; while (dlist != NULL) { group = gamgi_engine_find_group_layer (number, GAMGI_CAST_LAYER dlist->data); if (group != NULL) return group; dlist = dlist->next; } return NULL; } gamgi_group *gamgi_engine_find_group_gamgi (unsigned int number) { gamgi_window *window; gamgi_group *group; window = gamgi->window_start; while (window != NULL) { group = gamgi_engine_find_group_window (number, window); if (group != NULL) return group; window = window->next; } return NULL; } gamgi_molecule *gamgi_engine_find_molecule_molecule (unsigned int number, gamgi_molecule *molecule) { if (molecule->object.number == number) return molecule; return NULL; } gamgi_molecule *gamgi_engine_find_molecule_cluster (unsigned int number, gamgi_cluster *cluster) { gamgi_molecule *molecule; gamgi_dlist *dlist; dlist = cluster->molecule_start; while (dlist != NULL) { molecule = gamgi_engine_find_molecule_molecule (number, GAMGI_CAST_MOLECULE dlist->data); if (molecule != NULL) return molecule; dlist = dlist->next; } dlist = cluster->cluster_start; while (dlist != NULL) { molecule = gamgi_engine_find_molecule_cluster (number, GAMGI_CAST_CLUSTER dlist->data); if (molecule != NULL) return molecule; dlist = dlist->next; } return NULL; } gamgi_molecule *gamgi_engine_find_molecule_cell (unsigned int number, gamgi_cell *cell) { gamgi_molecule *molecule; gamgi_dlist *dlist; dlist = cell->molecule_start; while (dlist != NULL) { molecule = gamgi_engine_find_molecule_molecule (number, GAMGI_CAST_MOLECULE dlist->data); if (molecule != NULL) return molecule; dlist = dlist->next; } dlist = cell->cluster_start; while (dlist != NULL) { molecule = gamgi_engine_find_molecule_cluster (number, GAMGI_CAST_CLUSTER dlist->data); if (molecule != NULL) return molecule; dlist = dlist->next; } return NULL; } gamgi_molecule *gamgi_engine_find_molecule_assembly (unsigned int number, gamgi_assembly *assembly) { gamgi_molecule *molecule; gamgi_dlist *dlist; dlist = assembly->molecule_start; while (dlist != NULL) { molecule = gamgi_engine_find_molecule_molecule (number, GAMGI_CAST_MOLECULE dlist->data); if (molecule != NULL) return molecule; dlist = dlist->next; } dlist = assembly->cluster_start; while (dlist != NULL) { molecule = gamgi_engine_find_molecule_cluster (number, GAMGI_CAST_CLUSTER dlist->data); if (molecule != NULL) return molecule; dlist = dlist->next; } dlist = assembly->cell_start; while (dlist != NULL) { molecule = gamgi_engine_find_molecule_cell (number, GAMGI_CAST_CELL dlist->data); if (molecule != NULL) return molecule; dlist = dlist->next; } dlist = assembly->assembly_start; while (dlist != NULL) { molecule = gamgi_engine_find_molecule_assembly (number, GAMGI_CAST_ASSEMBLY dlist->data); if (molecule != NULL) return molecule; dlist = dlist->next; } return NULL; } gamgi_molecule *gamgi_engine_find_molecule_layer (unsigned int number, gamgi_layer *layer) { gamgi_molecule *molecule; gamgi_dlist *dlist; dlist = layer->molecule_start; while (dlist != NULL) { molecule = gamgi_engine_find_molecule_molecule (number, GAMGI_CAST_MOLECULE dlist->data); if (molecule != NULL) return molecule; dlist = dlist->next; } dlist = layer->cluster_start; while (dlist != NULL) { molecule = gamgi_engine_find_molecule_cluster (number, GAMGI_CAST_CLUSTER dlist->data); if (molecule != NULL) return molecule; dlist = dlist->next; } dlist = layer->cell_start; while (dlist != NULL) { molecule = gamgi_engine_find_molecule_cell (number, GAMGI_CAST_CELL dlist->data); if (molecule != NULL) return molecule; dlist = dlist->next; } dlist = layer->assembly_start; while (dlist != NULL) { molecule = gamgi_engine_find_molecule_assembly (number, GAMGI_CAST_ASSEMBLY dlist->data); if (molecule != NULL) return molecule; dlist = dlist->next; } return NULL; } gamgi_molecule *gamgi_engine_find_molecule_window (unsigned int number, gamgi_window *window) { gamgi_molecule *molecule; gamgi_dlist *dlist; dlist = window->layer_start; while (dlist != NULL) { molecule = gamgi_engine_find_molecule_layer (number, GAMGI_CAST_LAYER dlist->data); if (molecule != NULL) return molecule; dlist = dlist->next; } return NULL; } gamgi_molecule *gamgi_engine_find_molecule_gamgi (unsigned int number) { gamgi_window *window; gamgi_molecule *molecule; window = gamgi->window_start; while (window != NULL) { molecule = gamgi_engine_find_molecule_window (number, window); if (molecule != NULL) return molecule; window = window->next; } return NULL; } gamgi_cluster *gamgi_engine_find_cluster_cluster (unsigned int number, gamgi_cluster *cluster) { gamgi_cluster *cluster_child; gamgi_dlist *dlist; if (cluster->object.number == number) return cluster; dlist = cluster->cluster_start; while (dlist != NULL) { cluster_child = gamgi_engine_find_cluster_cluster (number, GAMGI_CAST_CLUSTER dlist->data); if (cluster_child != NULL) return cluster_child; dlist = dlist->next; } return NULL; } gamgi_cluster *gamgi_engine_find_cluster_cell (unsigned int number, gamgi_cell *cell) { gamgi_cluster *cluster; gamgi_dlist *dlist; dlist = cell->cluster_start; while (dlist != NULL) { cluster = gamgi_engine_find_cluster_cluster (number, GAMGI_CAST_CLUSTER dlist->data); if (cluster != NULL) return cluster; dlist = dlist->next; } return NULL; } gamgi_cluster *gamgi_engine_find_cluster_assembly (unsigned int number, gamgi_assembly *assembly) { gamgi_cluster *cluster; gamgi_dlist *dlist; dlist = assembly->cluster_start; while (dlist != NULL) { cluster = gamgi_engine_find_cluster_cluster (number, GAMGI_CAST_CLUSTER dlist->data); if (cluster != NULL) return cluster; dlist = dlist->next; } dlist = assembly->cell_start; while (dlist != NULL) { cluster = gamgi_engine_find_cluster_cell (number, GAMGI_CAST_CELL dlist->data); if (cluster != NULL) return cluster; dlist = dlist->next; } dlist = assembly->assembly_start; while (dlist != NULL) { cluster = gamgi_engine_find_cluster_assembly (number, GAMGI_CAST_ASSEMBLY dlist->data); if (cluster != NULL) return cluster; dlist = dlist->next; } return NULL; } gamgi_cluster *gamgi_engine_find_cluster_layer (unsigned int number, gamgi_layer *layer) { gamgi_cluster *cluster; gamgi_dlist *dlist; dlist = layer->cluster_start; while (dlist != NULL) { cluster = gamgi_engine_find_cluster_cluster (number, GAMGI_CAST_CLUSTER dlist->data); if (cluster != NULL) return cluster; dlist = dlist->next; } dlist = layer->cell_start; while (dlist != NULL) { cluster = gamgi_engine_find_cluster_cell (number, GAMGI_CAST_CELL dlist->data); if (cluster != NULL) return cluster; dlist = dlist->next; } dlist = layer->assembly_start; while (dlist != NULL) { cluster = gamgi_engine_find_cluster_assembly (number, GAMGI_CAST_ASSEMBLY dlist->data); if (cluster != NULL) return cluster; dlist = dlist->next; } return NULL; } gamgi_cluster *gamgi_engine_find_cluster_window (unsigned int number, gamgi_window *window) { gamgi_cluster *cluster; gamgi_dlist *dlist; dlist = window->layer_start; while (dlist != NULL) { cluster = gamgi_engine_find_cluster_layer (number, GAMGI_CAST_LAYER dlist->data); if (cluster != NULL) return cluster; dlist = dlist->next; } return NULL; } gamgi_cluster *gamgi_engine_find_cluster_gamgi (unsigned int number) { gamgi_window *window; gamgi_cluster *cluster; window = gamgi->window_start; while (window != NULL) { cluster = gamgi_engine_find_cluster_window (number, window); if (cluster != NULL) return cluster; window = window->next; } return NULL; } gamgi_cell *gamgi_engine_find_cell_cell (unsigned int number, gamgi_cell *cell) { if (cell->object.number == number) return cell; return NULL; } gamgi_cell *gamgi_engine_find_cell_assembly (unsigned int number, gamgi_assembly *assembly) { gamgi_cell *cell; gamgi_dlist *dlist; dlist = assembly->cell_start; while (dlist != NULL) { cell = gamgi_engine_find_cell_cell (number, GAMGI_CAST_CELL dlist->data); if (cell != NULL) return cell; dlist = dlist->next; } dlist = assembly->assembly_start; while (dlist != NULL) { cell = gamgi_engine_find_cell_assembly (number, GAMGI_CAST_ASSEMBLY dlist->data); if (cell != NULL) return cell; dlist = dlist->next; } return NULL; } gamgi_cell *gamgi_engine_find_cell_layer (unsigned int number, gamgi_layer *layer) { gamgi_cell *cell; gamgi_dlist *dlist; dlist = layer->cell_start; while (dlist != NULL) { cell = gamgi_engine_find_cell_cell (number, GAMGI_CAST_CELL dlist->data); if (cell != NULL) return cell; dlist = dlist->next; } dlist = layer->assembly_start; while (dlist != NULL) { cell = gamgi_engine_find_cell_assembly (number, GAMGI_CAST_ASSEMBLY dlist->data); if (cell != NULL) return cell; dlist = dlist->next; } return NULL; } gamgi_cell *gamgi_engine_find_cell_window (unsigned int number, gamgi_window *window) { gamgi_cell *cell; gamgi_dlist *dlist; dlist = window->layer_start; while (dlist != NULL) { cell = gamgi_engine_find_cell_layer (number, GAMGI_CAST_LAYER dlist->data); if (cell != NULL) return cell; dlist = dlist->next; } return NULL; } gamgi_cell *gamgi_engine_find_cell_gamgi (unsigned int number) { gamgi_window *window; gamgi_cell *cell; window = gamgi->window_start; while (window != NULL) { cell = gamgi_engine_find_cell_window (number, window); if (cell != NULL) return cell; window = window->next; } return NULL; } gamgi_arrow *gamgi_engine_find_arrow_arrow (unsigned int number, gamgi_arrow *arrow) { if (arrow->object.number == number) return arrow; return NULL; } gamgi_arrow *gamgi_engine_find_arrow_assembly (unsigned int number, gamgi_assembly *assembly) { gamgi_arrow *arrow; gamgi_dlist *dlist; dlist = assembly->arrow_start; while (dlist != NULL) { arrow = gamgi_engine_find_arrow_arrow (number, GAMGI_CAST_ARROW dlist->data); if (arrow != NULL) return arrow; dlist = dlist->next; } return NULL; } gamgi_arrow *gamgi_engine_find_arrow_layer (unsigned int number, gamgi_layer *layer) { gamgi_arrow *arrow; gamgi_dlist *dlist; dlist = layer->arrow_start; while (dlist != NULL) { arrow = gamgi_engine_find_arrow_arrow (number, GAMGI_CAST_ARROW dlist->data); if (arrow != NULL) return arrow; dlist = dlist->next; } dlist = layer->assembly_start; while (dlist != NULL) { arrow = gamgi_engine_find_arrow_assembly (number, GAMGI_CAST_ASSEMBLY dlist->data); if (arrow != NULL) return arrow; dlist = dlist->next; } return NULL; } gamgi_arrow *gamgi_engine_find_arrow_window (unsigned int number, gamgi_window *window) { gamgi_arrow *arrow; gamgi_dlist *dlist; dlist = window->layer_start; while (dlist != NULL) { arrow = gamgi_engine_find_arrow_layer (number, GAMGI_CAST_LAYER dlist->data); if (arrow != NULL) return arrow; dlist = dlist->next; } return NULL; } gamgi_arrow *gamgi_engine_find_arrow_gamgi (unsigned int number) { gamgi_window *window; gamgi_arrow *arrow; window = gamgi->window_start; while (window != NULL) { arrow = gamgi_engine_find_arrow_window (number, window); if (arrow != NULL) return arrow; window = window->next; } return NULL; } gamgi_shape *gamgi_engine_find_shape_shape (unsigned int number, gamgi_shape *shape) { if (shape->object.number == number) return shape; return NULL; } gamgi_shape *gamgi_engine_find_shape_assembly (unsigned int number, gamgi_assembly *assembly) { gamgi_shape *shape; gamgi_dlist *dlist; dlist = assembly->shape_start; while (dlist != NULL) { shape = gamgi_engine_find_shape_shape (number, GAMGI_CAST_SHAPE dlist->data); if (shape != NULL) return shape; dlist = dlist->next; } return NULL; } gamgi_shape *gamgi_engine_find_shape_layer (unsigned int number, gamgi_layer *layer) { gamgi_shape *shape; gamgi_dlist *dlist; dlist = layer->shape_start; while (dlist != NULL) { shape = gamgi_engine_find_shape_shape (number, GAMGI_CAST_SHAPE dlist->data); if (shape != NULL) return shape; dlist = dlist->next; } dlist = layer->assembly_start; while (dlist != NULL) { shape = gamgi_engine_find_shape_assembly (number, GAMGI_CAST_ASSEMBLY dlist->data); if (shape != NULL) return shape; dlist = dlist->next; } return NULL; } gamgi_shape *gamgi_engine_find_shape_window (unsigned int number, gamgi_window *window) { gamgi_shape *shape; gamgi_dlist *dlist; dlist = window->layer_start; while (dlist != NULL) { shape = gamgi_engine_find_shape_layer (number, GAMGI_CAST_LAYER dlist->data); if (shape != NULL) return shape; dlist = dlist->next; } return NULL; } gamgi_shape *gamgi_engine_find_shape_gamgi (unsigned int number) { gamgi_window *window; gamgi_shape *shape; window = gamgi->window_start; while (window != NULL) { shape = gamgi_engine_find_shape_window (number, window); if (shape != NULL) return shape; window = window->next; } return NULL; } gamgi_graph *gamgi_engine_find_graph_graph (unsigned int number, gamgi_graph *graph) { if (graph->object.number == number) return graph; return NULL; } gamgi_graph *gamgi_engine_find_graph_assembly (unsigned int number, gamgi_assembly *assembly) { gamgi_graph *graph; gamgi_dlist *dlist; dlist = assembly->graph_start; while (dlist != NULL) { graph = gamgi_engine_find_graph_graph (number, GAMGI_CAST_GRAPH dlist->data); if (graph != NULL) return graph; dlist = dlist->next; } return NULL; } gamgi_graph *gamgi_engine_find_graph_layer (unsigned int number, gamgi_layer *layer) { gamgi_graph *graph; gamgi_dlist *dlist; dlist = layer->graph_start; while (dlist != NULL) { graph = gamgi_engine_find_graph_graph (number, GAMGI_CAST_GRAPH dlist->data); if (graph != NULL) return graph; dlist = dlist->next; } dlist = layer->assembly_start; while (dlist != NULL) { graph = gamgi_engine_find_graph_assembly (number, GAMGI_CAST_ASSEMBLY dlist->data); if (graph != NULL) return graph; dlist = dlist->next; } return NULL; } gamgi_graph *gamgi_engine_find_graph_window (unsigned int number, gamgi_window *window) { gamgi_graph *graph; gamgi_dlist *dlist; dlist = window->layer_start; while (dlist != NULL) { graph = gamgi_engine_find_graph_layer (number, GAMGI_CAST_LAYER dlist->data); if (graph != NULL) return graph; dlist = dlist->next; } return NULL; } gamgi_graph *gamgi_engine_find_graph_gamgi (unsigned int number) { gamgi_window *window; gamgi_graph *graph; window = gamgi->window_start; while (window != NULL) { graph = gamgi_engine_find_graph_window (number, window); if (graph != NULL) return graph; window = window->next; } return NULL; } gamgi_assembly *gamgi_engine_find_assembly_assembly (unsigned int number, gamgi_assembly *assembly) { gamgi_assembly *assembly_child; gamgi_dlist *dlist; if (assembly->object.number == number) return assembly; dlist = assembly->assembly_start; while (dlist != NULL) { assembly_child = gamgi_engine_find_assembly_assembly (number, GAMGI_CAST_ASSEMBLY dlist->data); if (assembly_child != NULL) return assembly_child; dlist = dlist->next; } return NULL; } gamgi_assembly *gamgi_engine_find_assembly_layer (unsigned int number, gamgi_layer *layer) { gamgi_assembly *assembly; gamgi_dlist *dlist; dlist = layer->assembly_start; while (dlist != NULL) { assembly = gamgi_engine_find_assembly_assembly (number, GAMGI_CAST_ASSEMBLY dlist->data); if (assembly != NULL) return assembly; dlist = dlist->next; } return NULL; } gamgi_assembly *gamgi_engine_find_assembly_window (unsigned int number, gamgi_window *window) { gamgi_assembly *assembly; gamgi_dlist *dlist; dlist = window->layer_start; while (dlist != NULL) { assembly = gamgi_engine_find_assembly_layer (number, GAMGI_CAST_LAYER dlist->data); if (assembly != NULL) return assembly; dlist = dlist->next; } return NULL; } gamgi_assembly *gamgi_engine_find_assembly_gamgi (unsigned int number) { gamgi_window *window; gamgi_assembly *assembly; window = gamgi->window_start; while (window != NULL) { assembly = gamgi_engine_find_assembly_window (number, window); if (assembly != NULL) return assembly; window = window->next; } return NULL; } gamgi_light *gamgi_engine_find_light_light (unsigned int number, gamgi_light *light) { if (light->object.number == number) return light; return NULL; } gamgi_light *gamgi_engine_find_light_layer (unsigned int number, gamgi_layer *layer) { gamgi_light *light; gamgi_dlist *dlist; dlist = layer->light_start; while (dlist != NULL) { light = gamgi_engine_find_light_light (number, GAMGI_CAST_LIGHT dlist->data); if (light != NULL) return light; dlist = dlist->next; } return NULL; } gamgi_light *gamgi_engine_find_light_window (unsigned int number, gamgi_window *window) { gamgi_light *light; gamgi_dlist *dlist; dlist = window->layer_start; while (dlist != NULL) { light = gamgi_engine_find_light_layer (number, GAMGI_CAST_LAYER dlist->data); if (light != NULL) return light; dlist = dlist->next; } return NULL; } gamgi_light *gamgi_engine_find_light_gamgi (unsigned int number) { gamgi_window *window; gamgi_light *light; window = gamgi->window_start; while (window != NULL) { light = gamgi_engine_find_light_window (number, window); if (light != NULL) return light; window = window->next; } return NULL; } gamgi_layer *gamgi_engine_find_layer_layer (unsigned int number, gamgi_layer *layer) { if (layer->object.number == number) return layer; return NULL; } gamgi_layer *gamgi_engine_find_layer_window (unsigned int number, gamgi_window *window) { gamgi_layer *layer; gamgi_dlist *dlist; dlist = window->layer_start; while (dlist != NULL) { layer = gamgi_engine_find_layer_layer (number, GAMGI_CAST_LAYER dlist->data); if (layer != NULL) return layer; dlist = dlist->next; } return NULL; } gamgi_layer *gamgi_engine_find_layer_gamgi (unsigned int number) { gamgi_window *window; gamgi_layer *layer; window = gamgi->window_start; while (window != NULL) { layer = gamgi_engine_find_layer_window (number, window); if (layer != NULL) return layer; window = window->next; } return NULL; } gamgi_window *gamgi_engine_find_window_window (unsigned int number, gamgi_window *window) { if (window->object.number == number) return window; return NULL; } gamgi_window *gamgi_engine_find_window_gamgi (unsigned int number) { gamgi_window *window, *new_window; window = gamgi->window_start; while (window != NULL) { new_window = gamgi_engine_find_window_window (number, window); if (new_window != NULL) return new_window; window = window->next; } return NULL; } gamgi0.17.1g/src/engine/gamgi_engine_list.h0000644000175000017500000000337211434311242020157 0ustar carloscarlos/******************************************* * * $GAMGI/src/engine/gamgi_engine_list.h * * Copyright (C) 2001, 2004 Carlos Pereira * * Distributed under the terms of the GNU * General Public License: $GAMGI/LICENSE * */ /********************** * external functions * **********************/ gamgi_slist *gamgi_engine_slist_add_start (gamgi_slist *slist_start); gamgi_slist *gamgi_engine_slist_add_end (gamgi_slist *slist_start); gamgi_slist *gamgi_engine_slist_remove_start (gamgi_slist *slist_start); void gamgi_engine_slist_remove_all (gamgi_slist *slist_start); gamgi_dlist *gamgi_engine_dlist_add_start (gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_add_end (gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_remove_start (gamgi_dlist *dlist_start); void gamgi_engine_dlist_remove_all (gamgi_dlist *dlist_start); gamgi_slist *gamgi_engine_slist_merge (gamgi_slist *slist_a, gamgi_slist *slist_b, int (* function) (const void *, const void *)); gamgi_dlist *gamgi_engine_dlist_merge (gamgi_dlist *dlist_a, gamgi_dlist *dlist_b, int (* function) (const void *, const void *)); gamgi_slist *gamgi_engine_slist_msort (gamgi_slist *slist_c, int (* function) (const void *, const void *)); gamgi_dlist *gamgi_engine_dlist_msort (gamgi_dlist *dlist_c, int (* function) (const void *, const void *)); gamgi_slist *gamgi_engine_slist_invert (gamgi_slist *start); gamgi_dlist *gamgi_engine_dlist_invert (gamgi_dlist *start); gamgi_slist *gamgi_engine_slist_copy (gamgi_slist *start); gamgi_dlist *gamgi_engine_dlist_copy (gamgi_dlist *start); int gamgi_engine_slist_nodes (gamgi_slist *start); int gamgi_engine_dlist_nodes (gamgi_dlist *start); /************* * Rationale * ************* ************* * Rationale * *************/ gamgi0.17.1g/src/engine/gamgi_engine_reparent.h0000644000175000017500000000303510637027664021040 0ustar carloscarlos/********************************************* * * $GAMGI/src/engine/gamgi_engine_reparent.h * * Copyright (C) 2004 Carlos Pereira * * Distributed under the terms of the GNU * General Public License: $GAMGI/LICENSE * */ /********************** * external functions * **********************/ void gamgi_engine_reparent_text (gamgi_dlist *dlist, gamgi_object *parent); void gamgi_engine_reparent_orbital (gamgi_dlist *dlist, gamgi_object *parent); void gamgi_engine_reparent_atom (gamgi_dlist *dlist, gamgi_object *parent); void gamgi_engine_reparent_direction (gamgi_dlist *dlist, gamgi_object *parent); void gamgi_engine_reparent_plane (gamgi_dlist *dlist, gamgi_object *parent); void gamgi_engine_reparent_group (gamgi_dlist *dlist, gamgi_object *parent); void gamgi_engine_reparent_molecule (gamgi_dlist *dlist, gamgi_object *parent); void gamgi_engine_reparent_cluster (gamgi_dlist *dlist, gamgi_object *parent); void gamgi_engine_reparent_cell (gamgi_dlist *dlist, gamgi_object *parent); void gamgi_engine_reparent_arrow (gamgi_dlist *dlist, gamgi_object *parent); void gamgi_engine_reparent_shape (gamgi_dlist *dlist, gamgi_object *parent); void gamgi_engine_reparent_graph (gamgi_dlist *dlist, gamgi_object *parent); void gamgi_engine_reparent_assembly (gamgi_dlist *dlist, gamgi_object *parent); void gamgi_engine_reparent_light (gamgi_dlist *dlist, gamgi_object *parent); void gamgi_engine_reparent_layer (gamgi_dlist *dlist, gamgi_object *parent); /************* * Rationale * ************* ************* * Rationale * *************/ gamgi0.17.1g/src/engine/gamgi_engine_dlist.c0000644000175000017500000024247411517101014020322 0ustar carloscarlos/******************************************* * * $GAMGI/src/engine/gamgi_engine_dlist.c * * Copyright (C) 2001, 2004 Carlos Pereira * * Distributed under the terms of the GNU * General Public License: $GAMGI/LICENSE * */ #include "gamgi_engine.h" #include "gamgi_global.h" #include "gamgi_engine_list.h" gamgi_dlist *gamgi_engine_dlist_text_text (gamgi_text *text, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = text->text_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_text (GAMGI_CAST_TEXT dlist->data, dlist_start); dlist = dlist->before; } dlist_start = gamgi_engine_dlist_add_start (dlist_start); dlist_start->data = GAMGI_CAST_OBJECT text; return dlist_start; } gamgi_dlist *gamgi_engine_dlist_text_orbital (gamgi_orbital *orbital, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = orbital->text_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_text (GAMGI_CAST_TEXT dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_text_bond (gamgi_bond *bond, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = bond->text_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_text (GAMGI_CAST_TEXT dlist->data, dlist_start); dlist = dlist->before; } dlist = bond->orbital_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_orbital (GAMGI_CAST_ORBITAL dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_text_atom (gamgi_atom *atom, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = atom->text_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_text (GAMGI_CAST_TEXT dlist->data, dlist_start); dlist = dlist->before; } dlist = atom->orbital_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_orbital (GAMGI_CAST_ORBITAL dlist->data, dlist_start); dlist = dlist->before; } dlist = atom->bond_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_bond (GAMGI_CAST_BOND dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_text_direction (gamgi_direction *direction, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = direction->text_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_text (GAMGI_CAST_TEXT dlist->data, dlist_start); dlist = dlist->before; } dlist = direction->orbital_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_orbital (GAMGI_CAST_ORBITAL dlist->data, dlist_start); dlist = dlist->before; } dlist = direction->atom_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_atom (GAMGI_CAST_ATOM dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_text_plane (gamgi_plane *plane, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = plane->text_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_text (GAMGI_CAST_TEXT dlist->data, dlist_start); dlist = dlist->before; } dlist = plane->orbital_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_orbital (GAMGI_CAST_ORBITAL dlist->data, dlist_start); dlist = dlist->before; } dlist = plane->atom_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_atom (GAMGI_CAST_ATOM dlist->data, dlist_start); dlist = dlist->before; } dlist = plane->direction_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_direction (GAMGI_CAST_DIRECTION dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_text_group (gamgi_group *group, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = group->text_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_text (GAMGI_CAST_TEXT dlist->data, dlist_start); dlist = dlist->before; } dlist = group->orbital_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_orbital (GAMGI_CAST_ORBITAL dlist->data, dlist_start); dlist = dlist->before; } dlist = group->atom_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_atom (GAMGI_CAST_ATOM dlist->data, dlist_start); dlist = dlist->before; } dlist = group->direction_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_direction (GAMGI_CAST_DIRECTION dlist->data, dlist_start); dlist = dlist->before; } dlist = group->plane_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_plane (GAMGI_CAST_PLANE dlist->data, dlist_start); dlist = dlist->before; } dlist = group->group_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_group (GAMGI_CAST_GROUP dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_text_molecule (gamgi_molecule *molecule, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = molecule->text_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_text (GAMGI_CAST_TEXT dlist->data, dlist_start); dlist = dlist->before; } dlist = molecule->orbital_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_orbital (GAMGI_CAST_ORBITAL dlist->data, dlist_start); dlist = dlist->before; } dlist = molecule->atom_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_atom (GAMGI_CAST_ATOM dlist->data, dlist_start); dlist = dlist->before; } dlist = molecule->direction_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_direction (GAMGI_CAST_DIRECTION dlist->data, dlist_start); dlist = dlist->before; } dlist = molecule->plane_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_plane (GAMGI_CAST_PLANE dlist->data, dlist_start); dlist = dlist->before; } dlist = molecule->group_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_group (GAMGI_CAST_GROUP dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_text_cluster (gamgi_cluster *cluster, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = cluster->text_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_text (GAMGI_CAST_TEXT dlist->data, dlist_start); dlist = dlist->before; } dlist = cluster->orbital_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_orbital (GAMGI_CAST_ORBITAL dlist->data, dlist_start); dlist = dlist->before; } dlist = cluster->atom_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_atom (GAMGI_CAST_ATOM dlist->data, dlist_start); dlist = dlist->before; } dlist = cluster->direction_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_direction (GAMGI_CAST_DIRECTION dlist->data, dlist_start); dlist = dlist->before; } dlist = cluster->plane_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_plane (GAMGI_CAST_PLANE dlist->data, dlist_start); dlist = dlist->before; } dlist = cluster->group_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_group (GAMGI_CAST_GROUP dlist->data, dlist_start); dlist = dlist->before; } dlist = cluster->molecule_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_molecule (GAMGI_CAST_MOLECULE dlist->data, dlist_start); dlist = dlist->before; } dlist = cluster->cluster_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_cluster (GAMGI_CAST_CLUSTER dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_text_cell (gamgi_cell *cell, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = cell->text_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_text (GAMGI_CAST_TEXT dlist->data, dlist_start); dlist = dlist->before; } dlist = cell->orbital_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_orbital (GAMGI_CAST_ORBITAL dlist->data, dlist_start); dlist = dlist->before; } dlist = cell->atom_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_atom (GAMGI_CAST_ATOM dlist->data, dlist_start); dlist = dlist->before; } dlist = cell->direction_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_direction (GAMGI_CAST_DIRECTION dlist->data, dlist_start); dlist = dlist->before; } dlist = cell->plane_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_plane (GAMGI_CAST_PLANE dlist->data, dlist_start); dlist = dlist->before; } dlist = cell->group_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_group (GAMGI_CAST_GROUP dlist->data, dlist_start); dlist = dlist->before; } dlist = cell->molecule_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_molecule (GAMGI_CAST_MOLECULE dlist->data, dlist_start); dlist = dlist->before; } dlist = cell->cluster_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_cluster (GAMGI_CAST_CLUSTER dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_text_arrow (gamgi_arrow *arrow, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = arrow->text_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_text (GAMGI_CAST_TEXT dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_text_shape (gamgi_shape *shape, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = shape->text_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_text (GAMGI_CAST_TEXT dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_text_graph (gamgi_graph *graph, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = graph->text_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_text (GAMGI_CAST_TEXT dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_text_assembly (gamgi_assembly *assembly, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = assembly->text_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_text (GAMGI_CAST_TEXT dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->orbital_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_orbital (GAMGI_CAST_ORBITAL dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->atom_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_atom (GAMGI_CAST_ATOM dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->direction_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_direction (GAMGI_CAST_DIRECTION dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->plane_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_plane (GAMGI_CAST_PLANE dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->group_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_group (GAMGI_CAST_GROUP dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->molecule_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_molecule (GAMGI_CAST_MOLECULE dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->cluster_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_cluster (GAMGI_CAST_CLUSTER dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->cell_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_cell (GAMGI_CAST_CELL dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->arrow_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_arrow (GAMGI_CAST_ARROW dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->shape_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_shape (GAMGI_CAST_SHAPE dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->graph_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_graph (GAMGI_CAST_GRAPH dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->assembly_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_assembly (GAMGI_CAST_ASSEMBLY dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_text_layer (gamgi_layer *layer, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = layer->text_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_text (GAMGI_CAST_TEXT dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->orbital_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_orbital (GAMGI_CAST_ORBITAL dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->atom_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_atom (GAMGI_CAST_ATOM dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->direction_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_direction (GAMGI_CAST_DIRECTION dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->plane_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_plane (GAMGI_CAST_PLANE dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->group_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_group (GAMGI_CAST_GROUP dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->molecule_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_molecule (GAMGI_CAST_MOLECULE dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->cluster_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_cluster (GAMGI_CAST_CLUSTER dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->cell_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_cell (GAMGI_CAST_CELL dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->arrow_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_arrow (GAMGI_CAST_ARROW dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->shape_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_shape (GAMGI_CAST_SHAPE dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->graph_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_graph (GAMGI_CAST_GRAPH dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->assembly_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_assembly (GAMGI_CAST_ASSEMBLY dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_text_window (gamgi_window *window, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = window->layer_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_text_layer (GAMGI_CAST_LAYER dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_text_gamgi (gamgi_dlist *dlist_start) { gamgi_window *window; window = gamgi->window_end; while (window != NULL) { dlist_start = gamgi_engine_dlist_text_window (window, dlist_start); window = window->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_orbital_orbital (gamgi_orbital *orbital, gamgi_dlist *dlist_start) { dlist_start = gamgi_engine_dlist_add_start (dlist_start); dlist_start->data = GAMGI_CAST_OBJECT orbital; return dlist_start; } gamgi_dlist *gamgi_engine_dlist_orbital_bond (gamgi_bond *bond, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = bond->orbital_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_orbital (GAMGI_CAST_ORBITAL dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_orbital_atom (gamgi_atom *atom, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = atom->orbital_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_orbital (GAMGI_CAST_ORBITAL dlist->data, dlist_start); dlist = dlist->before; } dlist = atom->bond_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_bond (GAMGI_CAST_BOND dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_orbital_direction (gamgi_direction *direction, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = direction->orbital_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_orbital (GAMGI_CAST_ORBITAL dlist->data, dlist_start); dlist = dlist->before; } dlist = direction->atom_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_atom (GAMGI_CAST_ATOM dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_orbital_plane (gamgi_plane *plane, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = plane->orbital_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_orbital (GAMGI_CAST_ORBITAL dlist->data, dlist_start); dlist = dlist->before; } dlist = plane->atom_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_atom (GAMGI_CAST_ATOM dlist->data, dlist_start); dlist = dlist->before; } dlist = plane->direction_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_direction (GAMGI_CAST_DIRECTION dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_orbital_group (gamgi_group *group, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = group->orbital_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_orbital (GAMGI_CAST_ORBITAL dlist->data, dlist_start); dlist = dlist->before; } dlist = group->atom_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_atom (GAMGI_CAST_ATOM dlist->data, dlist_start); dlist = dlist->before; } dlist = group->direction_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_direction (GAMGI_CAST_DIRECTION dlist->data, dlist_start); dlist = dlist->before; } dlist = group->plane_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_plane (GAMGI_CAST_PLANE dlist->data, dlist_start); dlist = dlist->before; } dlist = group->group_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_group (GAMGI_CAST_GROUP dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_orbital_molecule (gamgi_molecule *molecule, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = molecule->orbital_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_orbital (GAMGI_CAST_ORBITAL dlist->data, dlist_start); dlist = dlist->before; } dlist = molecule->atom_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_atom (GAMGI_CAST_ATOM dlist->data, dlist_start); dlist = dlist->before; } dlist = molecule->direction_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_direction (GAMGI_CAST_DIRECTION dlist->data, dlist_start); dlist = dlist->before; } dlist = molecule->plane_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_plane (GAMGI_CAST_PLANE dlist->data, dlist_start); dlist = dlist->before; } dlist = molecule->group_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_group (GAMGI_CAST_GROUP dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_orbital_cluster (gamgi_cluster *cluster, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = cluster->orbital_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_orbital (GAMGI_CAST_ORBITAL dlist->data, dlist_start); dlist = dlist->before; } dlist = cluster->atom_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_atom (GAMGI_CAST_ATOM dlist->data, dlist_start); dlist = dlist->before; } dlist = cluster->direction_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_direction (GAMGI_CAST_DIRECTION dlist->data, dlist_start); dlist = dlist->before; } dlist = cluster->plane_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_plane (GAMGI_CAST_PLANE dlist->data, dlist_start); dlist = dlist->before; } dlist = cluster->group_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_group (GAMGI_CAST_GROUP dlist->data, dlist_start); dlist = dlist->before; } dlist = cluster->molecule_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_molecule (GAMGI_CAST_MOLECULE dlist->data, dlist_start); dlist = dlist->before; } dlist = cluster->cluster_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_cluster (GAMGI_CAST_CLUSTER dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_orbital_cell (gamgi_cell *cell, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = cell->orbital_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_orbital (GAMGI_CAST_ORBITAL dlist->data, dlist_start); dlist = dlist->before; } dlist = cell->atom_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_atom (GAMGI_CAST_ATOM dlist->data, dlist_start); dlist = dlist->before; } dlist = cell->direction_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_direction (GAMGI_CAST_DIRECTION dlist->data, dlist_start); dlist = dlist->before; } dlist = cell->plane_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_plane (GAMGI_CAST_PLANE dlist->data, dlist_start); dlist = dlist->before; } dlist = cell->group_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_group (GAMGI_CAST_GROUP dlist->data, dlist_start); dlist = dlist->before; } dlist = cell->molecule_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_molecule (GAMGI_CAST_MOLECULE dlist->data, dlist_start); dlist = dlist->before; } dlist = cell->cluster_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_cluster (GAMGI_CAST_CLUSTER dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_orbital_assembly (gamgi_assembly *assembly, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = assembly->orbital_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_orbital (GAMGI_CAST_ORBITAL dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->atom_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_atom (GAMGI_CAST_ATOM dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->direction_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_direction (GAMGI_CAST_DIRECTION dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->plane_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_plane (GAMGI_CAST_PLANE dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->group_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_group (GAMGI_CAST_GROUP dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->molecule_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_molecule (GAMGI_CAST_MOLECULE dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->cluster_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_cluster (GAMGI_CAST_CLUSTER dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->cell_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_cell (GAMGI_CAST_CELL dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->assembly_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_assembly (GAMGI_CAST_ASSEMBLY dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_orbital_layer (gamgi_layer *layer, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = layer->orbital_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_orbital (GAMGI_CAST_ORBITAL dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->atom_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_atom (GAMGI_CAST_ATOM dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->direction_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_direction (GAMGI_CAST_DIRECTION dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->plane_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_plane (GAMGI_CAST_PLANE dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->group_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_group (GAMGI_CAST_GROUP dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->molecule_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_molecule (GAMGI_CAST_MOLECULE dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->cluster_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_cluster (GAMGI_CAST_CLUSTER dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->cell_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_cell (GAMGI_CAST_CELL dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->assembly_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_assembly (GAMGI_CAST_ASSEMBLY dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_orbital_window (gamgi_window *window, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = window->layer_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_orbital_layer (GAMGI_CAST_LAYER dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_orbital_gamgi (gamgi_dlist *dlist_start) { gamgi_window *window; window = gamgi->window_end; while (window != NULL) { dlist_start = gamgi_engine_dlist_orbital_window (window, dlist_start); window = window->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_bond_bond (gamgi_bond *bond, gamgi_dlist *dlist_start) { /*********************************************** * Bonds are owned by two parent atoms, so * * they should appear twice, when searching * * for atoms child. Bonds are stack listed * * immediately when an atom references them. * * As last bonds come first in the list and * * atoms are also generated from end to start, * * the overall results are: * * * * a bond appears in the list when the second * * atom appears (ordered from start to end). * * * * half bonds, that are be referenced only * * by one atom, will always be listed, making * * it easy to reset the bond->first flag, * * that would be corrupted otherwise. This * * is safe programming only: half bonds * * should not really exist in GAMGI. * ***********************************************/ if (bond->first == TRUE) { bond->first = FALSE; dlist_start = gamgi_engine_dlist_add_start (dlist_start); dlist_start->data = GAMGI_CAST_OBJECT bond; } else bond->first = TRUE; return dlist_start; } gamgi_dlist *gamgi_engine_dlist_bond_atom (gamgi_atom *atom, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = atom->bond_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_bond_bond (GAMGI_CAST_BOND dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_bond_direction (gamgi_direction *direction, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = direction->atom_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_bond_atom (GAMGI_CAST_ATOM dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_bond_plane (gamgi_plane *plane, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = plane->atom_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_bond_atom (GAMGI_CAST_ATOM dlist->data, dlist_start); dlist = dlist->before; } dlist = plane->direction_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_bond_direction (GAMGI_CAST_DIRECTION dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_bond_group (gamgi_group *group, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = group->atom_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_bond_atom (GAMGI_CAST_ATOM dlist->data, dlist_start); dlist = dlist->before; } dlist = group->direction_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_bond_direction (GAMGI_CAST_DIRECTION dlist->data, dlist_start); dlist = dlist->before; } dlist = group->plane_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_bond_plane (GAMGI_CAST_PLANE dlist->data, dlist_start); dlist = dlist->before; } dlist = group->group_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_bond_group (GAMGI_CAST_GROUP dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_bond_molecule (gamgi_molecule *molecule, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = molecule->atom_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_bond_atom (GAMGI_CAST_ATOM dlist->data, dlist_start); dlist = dlist->before; } dlist = molecule->direction_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_bond_direction (GAMGI_CAST_DIRECTION dlist->data, dlist_start); dlist = dlist->before; } dlist = molecule->plane_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_bond_plane (GAMGI_CAST_PLANE dlist->data, dlist_start); dlist = dlist->before; } dlist = molecule->group_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_bond_group (GAMGI_CAST_GROUP dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_bond_cluster (gamgi_cluster *cluster, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = cluster->atom_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_bond_atom (GAMGI_CAST_ATOM dlist->data, dlist_start); dlist = dlist->before; } dlist = cluster->direction_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_bond_direction (GAMGI_CAST_DIRECTION dlist->data, dlist_start); dlist = dlist->before; } dlist = cluster->plane_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_bond_plane (GAMGI_CAST_PLANE dlist->data, dlist_start); dlist = dlist->before; } dlist = cluster->group_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_bond_group (GAMGI_CAST_GROUP dlist->data, dlist_start); dlist = dlist->before; } dlist = cluster->molecule_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_bond_molecule (GAMGI_CAST_MOLECULE dlist->data, dlist_start); dlist = dlist->before; } dlist = cluster->cluster_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_bond_cluster (GAMGI_CAST_CLUSTER dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_bond_cell (gamgi_cell *cell, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = cell->atom_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_bond_atom (GAMGI_CAST_ATOM dlist->data, dlist_start); dlist = dlist->before; } dlist = cell->direction_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_bond_direction (GAMGI_CAST_DIRECTION dlist->data, dlist_start); dlist = dlist->before; } dlist = cell->plane_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_bond_plane (GAMGI_CAST_PLANE dlist->data, dlist_start); dlist = dlist->before; } dlist = cell->group_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_bond_group (GAMGI_CAST_GROUP dlist->data, dlist_start); dlist = dlist->before; } dlist = cell->molecule_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_bond_molecule (GAMGI_CAST_MOLECULE dlist->data, dlist_start); dlist = dlist->before; } dlist = cell->cluster_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_bond_cluster (GAMGI_CAST_CLUSTER dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_bond_assembly (gamgi_assembly *assembly, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = assembly->atom_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_bond_atom (GAMGI_CAST_ATOM dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->direction_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_bond_direction (GAMGI_CAST_DIRECTION dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->plane_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_bond_plane (GAMGI_CAST_PLANE dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->group_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_bond_group (GAMGI_CAST_GROUP dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->molecule_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_bond_molecule (GAMGI_CAST_MOLECULE dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->cluster_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_bond_cluster (GAMGI_CAST_CLUSTER dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->cell_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_bond_cell (GAMGI_CAST_CELL dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->assembly_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_bond_assembly (GAMGI_CAST_ASSEMBLY dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_bond_layer (gamgi_layer *layer, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = layer->atom_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_bond_atom (GAMGI_CAST_ATOM dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->direction_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_bond_direction (GAMGI_CAST_DIRECTION dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->plane_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_bond_plane (GAMGI_CAST_PLANE dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->group_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_bond_group (GAMGI_CAST_GROUP dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->molecule_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_bond_molecule (GAMGI_CAST_MOLECULE dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->cluster_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_bond_cluster (GAMGI_CAST_CLUSTER dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->cell_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_bond_cell (GAMGI_CAST_CELL dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->assembly_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_bond_assembly (GAMGI_CAST_ASSEMBLY dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_bond_window (gamgi_window *window, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = window->layer_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_bond_layer (GAMGI_CAST_LAYER dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_bond_gamgi (gamgi_dlist *dlist_start) { gamgi_window *window; window = gamgi->window_end; while (window != NULL) { dlist_start = gamgi_engine_dlist_bond_window (window, dlist_start); window = window->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_atom_atom (gamgi_atom *atom, gamgi_dlist *dlist_start) { dlist_start = gamgi_engine_dlist_add_start (dlist_start); dlist_start->data = GAMGI_CAST_OBJECT atom; return dlist_start; } gamgi_dlist *gamgi_engine_dlist_atom_direction (gamgi_direction *direction, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = direction->atom_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_atom_atom (GAMGI_CAST_ATOM dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_atom_plane (gamgi_plane *plane, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = plane->atom_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_atom_atom (GAMGI_CAST_ATOM dlist->data, dlist_start); dlist = dlist->before; } dlist = plane->direction_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_atom_direction (GAMGI_CAST_DIRECTION dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_atom_group (gamgi_group *group, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = group->atom_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_atom_atom (GAMGI_CAST_ATOM dlist->data, dlist_start); dlist = dlist->before; } dlist = group->direction_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_atom_direction (GAMGI_CAST_DIRECTION dlist->data, dlist_start); dlist = dlist->before; } dlist = group->plane_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_atom_plane (GAMGI_CAST_PLANE dlist->data, dlist_start); dlist = dlist->before; } dlist = group->group_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_atom_group (GAMGI_CAST_GROUP dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_atom_molecule (gamgi_molecule *molecule, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = molecule->atom_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_atom_atom (GAMGI_CAST_ATOM dlist->data, dlist_start); dlist = dlist->before; } dlist = molecule->direction_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_atom_direction (GAMGI_CAST_DIRECTION dlist->data, dlist_start); dlist = dlist->before; } dlist = molecule->plane_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_atom_plane (GAMGI_CAST_PLANE dlist->data, dlist_start); dlist = dlist->before; } dlist = molecule->group_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_atom_group (GAMGI_CAST_GROUP dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_atom_cluster (gamgi_cluster *cluster, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = cluster->atom_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_atom_atom (GAMGI_CAST_ATOM dlist->data, dlist_start); dlist = dlist->before; } dlist = cluster->direction_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_atom_direction (GAMGI_CAST_DIRECTION dlist->data, dlist_start); dlist = dlist->before; } dlist = cluster->plane_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_atom_plane (GAMGI_CAST_PLANE dlist->data, dlist_start); dlist = dlist->before; } dlist = cluster->group_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_atom_group (GAMGI_CAST_GROUP dlist->data, dlist_start); dlist = dlist->before; } dlist = cluster->molecule_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_atom_molecule (GAMGI_CAST_MOLECULE dlist->data, dlist_start); dlist = dlist->before; } dlist = cluster->cluster_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_atom_cluster (GAMGI_CAST_CLUSTER dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_atom_cell (gamgi_cell *cell, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = cell->atom_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_atom_atom (GAMGI_CAST_ATOM dlist->data, dlist_start); dlist = dlist->before; } dlist = cell->direction_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_atom_direction (GAMGI_CAST_DIRECTION dlist->data, dlist_start); dlist = dlist->before; } dlist = cell->plane_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_atom_plane (GAMGI_CAST_PLANE dlist->data, dlist_start); dlist = dlist->before; } dlist = cell->group_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_atom_group (GAMGI_CAST_GROUP dlist->data, dlist_start); dlist = dlist->before; } dlist = cell->molecule_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_atom_molecule (GAMGI_CAST_MOLECULE dlist->data, dlist_start); dlist = dlist->before; } dlist = cell->cluster_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_atom_cluster (GAMGI_CAST_CLUSTER dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_atom_assembly (gamgi_assembly *assembly, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = assembly->atom_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_atom_atom (GAMGI_CAST_ATOM dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->direction_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_atom_direction (GAMGI_CAST_DIRECTION dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->plane_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_atom_plane (GAMGI_CAST_PLANE dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->group_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_atom_group (GAMGI_CAST_GROUP dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->molecule_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_atom_molecule (GAMGI_CAST_MOLECULE dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->cluster_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_atom_cluster (GAMGI_CAST_CLUSTER dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->cell_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_atom_cell (GAMGI_CAST_CELL dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->assembly_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_atom_assembly (GAMGI_CAST_ASSEMBLY dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_atom_layer (gamgi_layer *layer, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = layer->atom_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_atom_atom (GAMGI_CAST_ATOM dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->direction_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_atom_direction (GAMGI_CAST_DIRECTION dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->plane_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_atom_plane (GAMGI_CAST_PLANE dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->group_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_atom_group (GAMGI_CAST_GROUP dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->molecule_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_atom_molecule (GAMGI_CAST_MOLECULE dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->cluster_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_atom_cluster (GAMGI_CAST_CLUSTER dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->cell_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_atom_cell (GAMGI_CAST_CELL dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->assembly_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_atom_assembly (GAMGI_CAST_ASSEMBLY dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_atom_window (gamgi_window *window, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = window->layer_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_atom_layer (GAMGI_CAST_LAYER dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_atom_gamgi (gamgi_dlist *dlist_start) { gamgi_window *window; window = gamgi->window_end; while (window != NULL) { dlist_start = gamgi_engine_dlist_atom_window (window, dlist_start); window = window->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_direction_direction (gamgi_direction *direction, gamgi_dlist *dlist_start) { dlist_start = gamgi_engine_dlist_add_start (dlist_start); dlist_start->data = GAMGI_CAST_OBJECT direction; return dlist_start; } gamgi_dlist *gamgi_engine_dlist_direction_plane (gamgi_plane *plane, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = plane->direction_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_direction_direction (GAMGI_CAST_DIRECTION dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_direction_group (gamgi_group *group, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = group->direction_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_direction_direction (GAMGI_CAST_DIRECTION dlist->data, dlist_start); dlist = dlist->before; } dlist = group->plane_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_direction_plane (GAMGI_CAST_PLANE dlist->data, dlist_start); dlist = dlist->before; } dlist = group->group_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_direction_group (GAMGI_CAST_GROUP dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_direction_molecule (gamgi_molecule *molecule, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = molecule->direction_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_direction_direction (GAMGI_CAST_DIRECTION dlist->data, dlist_start); dlist = dlist->before; } dlist = molecule->plane_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_direction_plane (GAMGI_CAST_PLANE dlist->data, dlist_start); dlist = dlist->before; } dlist = molecule->group_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_direction_group (GAMGI_CAST_GROUP dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_direction_cluster (gamgi_cluster *cluster, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = cluster->direction_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_direction_direction (GAMGI_CAST_DIRECTION dlist->data, dlist_start); dlist = dlist->before; } dlist = cluster->plane_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_direction_plane (GAMGI_CAST_PLANE dlist->data, dlist_start); dlist = dlist->before; } dlist = cluster->group_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_direction_group (GAMGI_CAST_GROUP dlist->data, dlist_start); dlist = dlist->before; } dlist = cluster->molecule_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_direction_molecule (GAMGI_CAST_MOLECULE dlist->data, dlist_start); dlist = dlist->before; } dlist = cluster->cluster_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_direction_cluster (GAMGI_CAST_CLUSTER dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_direction_cell (gamgi_cell *cell, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = cell->direction_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_direction_direction (GAMGI_CAST_DIRECTION dlist->data, dlist_start); dlist = dlist->before; } dlist = cell->plane_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_direction_plane (GAMGI_CAST_PLANE dlist->data, dlist_start); dlist = dlist->before; } dlist = cell->group_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_direction_group (GAMGI_CAST_GROUP dlist->data, dlist_start); dlist = dlist->before; } dlist = cell->molecule_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_direction_molecule (GAMGI_CAST_MOLECULE dlist->data, dlist_start); dlist = dlist->before; } dlist = cell->cluster_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_direction_cluster (GAMGI_CAST_CLUSTER dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_direction_assembly (gamgi_assembly *assembly, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = assembly->direction_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_direction_direction (GAMGI_CAST_DIRECTION dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->plane_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_direction_plane (GAMGI_CAST_PLANE dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->group_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_direction_group (GAMGI_CAST_GROUP dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->molecule_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_direction_molecule (GAMGI_CAST_MOLECULE dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->cluster_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_direction_cluster (GAMGI_CAST_CLUSTER dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->cell_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_direction_cell (GAMGI_CAST_CELL dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->assembly_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_direction_assembly (GAMGI_CAST_ASSEMBLY dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_direction_layer (gamgi_layer *layer, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = layer->direction_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_direction_direction (GAMGI_CAST_DIRECTION dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->plane_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_direction_plane (GAMGI_CAST_PLANE dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->group_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_direction_group (GAMGI_CAST_GROUP dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->molecule_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_direction_molecule (GAMGI_CAST_MOLECULE dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->cluster_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_direction_cluster (GAMGI_CAST_CLUSTER dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->cell_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_direction_cell (GAMGI_CAST_CELL dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->assembly_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_direction_assembly (GAMGI_CAST_ASSEMBLY dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_direction_window (gamgi_window *window, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = window->layer_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_direction_layer (GAMGI_CAST_LAYER dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_direction_gamgi (gamgi_dlist *dlist_start) { gamgi_window *window; window = gamgi->window_end; while (window != NULL) { dlist_start = gamgi_engine_dlist_direction_window (window, dlist_start); window = window->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_plane_plane (gamgi_plane *plane, gamgi_dlist *dlist_start) { dlist_start = gamgi_engine_dlist_add_start (dlist_start); dlist_start->data = GAMGI_CAST_OBJECT plane; return dlist_start; } gamgi_dlist *gamgi_engine_dlist_plane_group (gamgi_group *group, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = group->plane_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_plane_plane (GAMGI_CAST_PLANE dlist->data, dlist_start); dlist = dlist->before; } dlist = group->group_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_plane_group (GAMGI_CAST_GROUP dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_plane_molecule (gamgi_molecule *molecule, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = molecule->plane_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_plane_plane (GAMGI_CAST_PLANE dlist->data, dlist_start); dlist = dlist->before; } dlist = molecule->group_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_plane_group (GAMGI_CAST_GROUP dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_plane_cluster (gamgi_cluster *cluster, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = cluster->plane_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_plane_plane (GAMGI_CAST_PLANE dlist->data, dlist_start); dlist = dlist->before; } dlist = cluster->group_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_plane_group (GAMGI_CAST_GROUP dlist->data, dlist_start); dlist = dlist->before; } dlist = cluster->molecule_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_plane_molecule (GAMGI_CAST_MOLECULE dlist->data, dlist_start); dlist = dlist->before; } dlist = cluster->cluster_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_plane_cluster (GAMGI_CAST_CLUSTER dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_plane_cell (gamgi_cell *cell, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = cell->plane_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_plane_plane (GAMGI_CAST_PLANE dlist->data, dlist_start); dlist = dlist->before; } dlist = cell->group_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_plane_group (GAMGI_CAST_GROUP dlist->data, dlist_start); dlist = dlist->before; } dlist = cell->molecule_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_plane_molecule (GAMGI_CAST_MOLECULE dlist->data, dlist_start); dlist = dlist->before; } dlist = cell->cluster_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_plane_cluster (GAMGI_CAST_CLUSTER dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_plane_assembly (gamgi_assembly *assembly, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = assembly->plane_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_plane_plane (GAMGI_CAST_PLANE dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->group_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_plane_group (GAMGI_CAST_GROUP dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->molecule_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_plane_molecule (GAMGI_CAST_MOLECULE dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->cluster_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_plane_cluster (GAMGI_CAST_CLUSTER dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->cell_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_plane_cell (GAMGI_CAST_CELL dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->assembly_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_plane_assembly (GAMGI_CAST_ASSEMBLY dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_plane_layer (gamgi_layer *layer, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = layer->plane_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_plane_plane (GAMGI_CAST_PLANE dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->group_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_plane_group (GAMGI_CAST_GROUP dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->molecule_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_plane_molecule (GAMGI_CAST_MOLECULE dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->cluster_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_plane_cluster (GAMGI_CAST_CLUSTER dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->cell_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_plane_cell (GAMGI_CAST_CELL dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->assembly_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_plane_assembly (GAMGI_CAST_ASSEMBLY dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_plane_window (gamgi_window *window, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = window->layer_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_plane_layer (GAMGI_CAST_LAYER dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_plane_gamgi (gamgi_dlist *dlist_start) { gamgi_window *window; window = gamgi->window_end; while (window != NULL) { dlist_start = gamgi_engine_dlist_plane_window (window, dlist_start); window = window->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_group_group (gamgi_group *group, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = group->group_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_group_group (GAMGI_CAST_GROUP dlist->data, dlist_start); dlist = dlist->before; } dlist_start = gamgi_engine_dlist_add_start (dlist_start); dlist_start->data = GAMGI_CAST_OBJECT group; return dlist_start; } gamgi_dlist *gamgi_engine_dlist_group_molecule (gamgi_molecule *molecule, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = molecule->group_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_group_group (GAMGI_CAST_GROUP dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_group_cluster (gamgi_cluster *cluster, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = cluster->group_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_group_group (GAMGI_CAST_GROUP dlist->data, dlist_start); dlist = dlist->before; } dlist = cluster->molecule_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_group_molecule (GAMGI_CAST_MOLECULE dlist->data, dlist_start); dlist = dlist->before; } dlist = cluster->cluster_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_group_cluster (GAMGI_CAST_CLUSTER dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_group_cell (gamgi_cell *cell, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = cell->group_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_group_group (GAMGI_CAST_GROUP dlist->data, dlist_start); dlist = dlist->before; } dlist = cell->molecule_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_group_molecule (GAMGI_CAST_MOLECULE dlist->data, dlist_start); dlist = dlist->before; } dlist = cell->cluster_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_group_cluster (GAMGI_CAST_CLUSTER dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_group_assembly (gamgi_assembly *assembly, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = assembly->group_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_group_group (GAMGI_CAST_GROUP dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->molecule_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_group_molecule (GAMGI_CAST_MOLECULE dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->cluster_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_group_cluster (GAMGI_CAST_CLUSTER dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->cell_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_group_cell (GAMGI_CAST_CELL dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->assembly_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_group_assembly (GAMGI_CAST_ASSEMBLY dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_group_layer (gamgi_layer *layer, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = layer->group_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_group_group (GAMGI_CAST_GROUP dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->molecule_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_group_molecule (GAMGI_CAST_MOLECULE dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->cluster_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_group_cluster (GAMGI_CAST_CLUSTER dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->cell_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_group_cell (GAMGI_CAST_CELL dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->assembly_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_group_assembly (GAMGI_CAST_ASSEMBLY dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_group_window (gamgi_window *window, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = window->layer_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_group_layer (GAMGI_CAST_LAYER dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_group_gamgi (gamgi_dlist *dlist_start) { gamgi_window *window; window = gamgi->window_end; while (window != NULL) { dlist_start = gamgi_engine_dlist_group_window (window, dlist_start); window = window->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_molecule_molecule (gamgi_molecule *molecule, gamgi_dlist *dlist_start) { dlist_start = gamgi_engine_dlist_add_start (dlist_start); dlist_start->data = GAMGI_CAST_OBJECT molecule; return dlist_start; } gamgi_dlist *gamgi_engine_dlist_molecule_cluster (gamgi_cluster *cluster, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = cluster->molecule_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_molecule_molecule (GAMGI_CAST_MOLECULE dlist->data, dlist_start); dlist = dlist->before; } dlist = cluster->cluster_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_molecule_cluster (GAMGI_CAST_CLUSTER dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_molecule_cell (gamgi_cell *cell, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = cell->molecule_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_molecule_molecule (GAMGI_CAST_MOLECULE dlist->data, dlist_start); dlist = dlist->before; } dlist = cell->cluster_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_molecule_cluster (GAMGI_CAST_CLUSTER dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_molecule_assembly (gamgi_assembly *assembly, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = assembly->molecule_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_molecule_molecule (GAMGI_CAST_MOLECULE dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->cluster_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_molecule_cluster (GAMGI_CAST_CLUSTER dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->cell_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_molecule_cell (GAMGI_CAST_CELL dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->assembly_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_molecule_assembly (GAMGI_CAST_ASSEMBLY dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_molecule_layer (gamgi_layer *layer, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = layer->molecule_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_molecule_molecule (GAMGI_CAST_MOLECULE dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->cluster_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_molecule_cluster (GAMGI_CAST_CLUSTER dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->cell_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_molecule_cell (GAMGI_CAST_CELL dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->assembly_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_molecule_assembly (GAMGI_CAST_ASSEMBLY dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_molecule_window (gamgi_window *window, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = window->layer_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_molecule_layer (GAMGI_CAST_LAYER dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_molecule_gamgi (gamgi_dlist *dlist_start) { gamgi_window *window; window = gamgi->window_end; while (window != NULL) { dlist_start = gamgi_engine_dlist_molecule_window (window, dlist_start); window = window->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_cluster_cluster (gamgi_cluster *cluster, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = cluster->cluster_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_cluster_cluster (GAMGI_CAST_CLUSTER dlist->data, dlist_start); dlist = dlist->before; } dlist_start = gamgi_engine_dlist_add_start (dlist_start); dlist_start->data = GAMGI_CAST_OBJECT cluster; return dlist_start; } gamgi_dlist *gamgi_engine_dlist_cluster_cell (gamgi_cell *cell, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = cell->cluster_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_cluster_cluster (GAMGI_CAST_CLUSTER dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_cluster_assembly (gamgi_assembly *assembly, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = assembly->cluster_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_cluster_cluster (GAMGI_CAST_CLUSTER dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->cell_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_cluster_cell (GAMGI_CAST_CELL dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->assembly_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_cluster_assembly (GAMGI_CAST_ASSEMBLY dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_cluster_layer (gamgi_layer *layer, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = layer->cluster_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_cluster_cluster (GAMGI_CAST_CLUSTER dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->cell_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_cluster_cell (GAMGI_CAST_CELL dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->assembly_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_cluster_assembly (GAMGI_CAST_ASSEMBLY dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_cluster_window (gamgi_window *window, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = window->layer_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_cluster_layer (GAMGI_CAST_LAYER dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_cluster_gamgi (gamgi_dlist *dlist_start) { gamgi_window *window; window = gamgi->window_end; while (window != NULL) { dlist_start = gamgi_engine_dlist_cluster_window (window, dlist_start); window = window->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_cell_cell (gamgi_cell *cell, gamgi_dlist *dlist_start) { dlist_start = gamgi_engine_dlist_add_start (dlist_start); dlist_start->data = GAMGI_CAST_OBJECT cell; return dlist_start; } gamgi_dlist *gamgi_engine_dlist_cell_assembly (gamgi_assembly *assembly, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = assembly->cell_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_cell_cell (GAMGI_CAST_CELL dlist->data, dlist_start); dlist = dlist->before; } dlist = assembly->assembly_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_cell_assembly (GAMGI_CAST_ASSEMBLY dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_cell_layer (gamgi_layer *layer, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = layer->cell_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_cell_cell (GAMGI_CAST_CELL dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->assembly_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_cell_assembly (GAMGI_CAST_ASSEMBLY dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_cell_window (gamgi_window *window, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = window->layer_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_cell_layer (GAMGI_CAST_LAYER dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_cell_gamgi (gamgi_dlist *dlist_start) { gamgi_window *window; window = gamgi->window_end; while (window != NULL) { dlist_start = gamgi_engine_dlist_cell_window (window, dlist_start); window = window->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_arrow_arrow (gamgi_arrow *arrow, gamgi_dlist *dlist_start) { dlist_start = gamgi_engine_dlist_add_start (dlist_start); dlist_start->data = GAMGI_CAST_OBJECT arrow; return dlist_start; } gamgi_dlist *gamgi_engine_dlist_arrow_assembly (gamgi_assembly *assembly, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = assembly->arrow_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_arrow_arrow (GAMGI_CAST_ARROW dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_arrow_layer (gamgi_layer *layer, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = layer->arrow_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_arrow_arrow (GAMGI_CAST_ARROW dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->assembly_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_arrow_assembly (GAMGI_CAST_ASSEMBLY dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_arrow_window (gamgi_window *window, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = window->layer_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_arrow_layer (GAMGI_CAST_LAYER dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_arrow_gamgi (gamgi_dlist *dlist_start) { gamgi_window *window; window = gamgi->window_end; while (window != NULL) { dlist_start = gamgi_engine_dlist_arrow_window (window, dlist_start); window = window->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_shape_shape (gamgi_shape *shape, gamgi_dlist *dlist_start) { dlist_start = gamgi_engine_dlist_add_start (dlist_start); dlist_start->data = GAMGI_CAST_OBJECT shape; return dlist_start; } gamgi_dlist *gamgi_engine_dlist_shape_assembly (gamgi_assembly *assembly, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = assembly->shape_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_shape_shape (GAMGI_CAST_SHAPE dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_shape_layer (gamgi_layer *layer, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = layer->shape_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_shape_shape (GAMGI_CAST_SHAPE dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->assembly_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_shape_assembly (GAMGI_CAST_ASSEMBLY dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_shape_window (gamgi_window *window, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = window->layer_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_shape_layer (GAMGI_CAST_LAYER dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_shape_gamgi (gamgi_dlist *dlist_start) { gamgi_window *window; window = gamgi->window_end; while (window != NULL) { dlist_start = gamgi_engine_dlist_shape_window (window, dlist_start); window = window->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_graph_graph (gamgi_graph *graph, gamgi_dlist *dlist_start) { dlist_start = gamgi_engine_dlist_add_start (dlist_start); dlist_start->data = GAMGI_CAST_OBJECT graph; return dlist_start; } gamgi_dlist *gamgi_engine_dlist_graph_assembly (gamgi_assembly *assembly, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = assembly->graph_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_graph_graph (GAMGI_CAST_GRAPH dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_graph_layer (gamgi_layer *layer, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = layer->graph_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_graph_graph (GAMGI_CAST_GRAPH dlist->data, dlist_start); dlist = dlist->before; } dlist = layer->assembly_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_graph_assembly (GAMGI_CAST_ASSEMBLY dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_graph_window (gamgi_window *window, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = window->layer_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_graph_layer (GAMGI_CAST_LAYER dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_graph_gamgi (gamgi_dlist *dlist_start) { gamgi_window *window; window = gamgi->window_end; while (window != NULL) { dlist_start = gamgi_engine_dlist_graph_window (window, dlist_start); window = window->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_assembly_assembly (gamgi_assembly *assembly, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = assembly->assembly_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_assembly_assembly (GAMGI_CAST_ASSEMBLY dlist->data, dlist_start); dlist = dlist->before; } dlist_start = gamgi_engine_dlist_add_start (dlist_start); dlist_start->data = GAMGI_CAST_OBJECT assembly; return dlist_start; } gamgi_dlist *gamgi_engine_dlist_assembly_layer (gamgi_layer *layer, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = layer->assembly_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_assembly_assembly (GAMGI_CAST_ASSEMBLY dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_assembly_window (gamgi_window *window, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = window->layer_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_assembly_layer (GAMGI_CAST_LAYER dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_assembly_gamgi (gamgi_dlist *dlist_start) { gamgi_window *window; window = gamgi->window_end; while (window != NULL) { dlist_start = gamgi_engine_dlist_assembly_window (window, dlist_start); window = window->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_light_light (gamgi_light *light, gamgi_dlist *dlist_start) { dlist_start = gamgi_engine_dlist_add_start (dlist_start); dlist_start->data = GAMGI_CAST_OBJECT light; return dlist_start; } gamgi_dlist *gamgi_engine_dlist_light_layer (gamgi_layer *layer, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = layer->light_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_light_light (GAMGI_CAST_LIGHT dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_light_window (gamgi_window *window, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = window->layer_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_light_layer (GAMGI_CAST_LAYER dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_light_gamgi (gamgi_dlist *dlist_start) { gamgi_window *window; window = gamgi->window_end; while (window != NULL) { dlist_start = gamgi_engine_dlist_light_window (window, dlist_start); window = window->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_layer_layer (gamgi_layer *layer, gamgi_dlist *dlist_start) { dlist_start = gamgi_engine_dlist_add_start (dlist_start); dlist_start->data = GAMGI_CAST_OBJECT layer; return dlist_start; } gamgi_dlist *gamgi_engine_dlist_layer_window (gamgi_window *window, gamgi_dlist *dlist_start) { gamgi_dlist *dlist; dlist = window->layer_end; while (dlist != NULL) { dlist_start = gamgi_engine_dlist_layer_layer (GAMGI_CAST_LAYER dlist->data, dlist_start); dlist = dlist->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_layer_gamgi (gamgi_dlist *dlist_start) { gamgi_window *window; window = gamgi->window_end; while (window != NULL) { dlist_start = gamgi_engine_dlist_layer_window (window, dlist_start); window = window->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_window_window (gamgi_window *window, gamgi_dlist *dlist_start) { dlist_start = gamgi_engine_dlist_add_start (dlist_start); dlist_start->data = GAMGI_CAST_OBJECT window; return dlist_start; } gamgi_dlist *gamgi_engine_dlist_window_gamgi (gamgi_dlist *dlist_start) { gamgi_window *window; window = gamgi->window_end; while (window != NULL) { dlist_start = gamgi_engine_dlist_window_window (window, dlist_start); window = window->before; } return dlist_start; } gamgi_dlist *gamgi_engine_dlist_atom_object (gamgi_object *object, gamgi_dlist *dlist_start) { switch (object->class) { case GAMGI_ENGINE_ATOM: dlist_start = gamgi_engine_dlist_atom_atom (GAMGI_CAST_ATOM object, dlist_start); break; case GAMGI_ENGINE_DIRECTION: dlist_start = gamgi_engine_dlist_atom_direction (GAMGI_CAST_DIRECTION object, dlist_start); break; case GAMGI_ENGINE_PLANE: dlist_start = gamgi_engine_dlist_atom_plane (GAMGI_CAST_PLANE object, dlist_start); break; case GAMGI_ENGINE_GROUP: dlist_start = gamgi_engine_dlist_atom_group (GAMGI_CAST_GROUP object, dlist_start); break; case GAMGI_ENGINE_MOLECULE: dlist_start = gamgi_engine_dlist_atom_molecule (GAMGI_CAST_MOLECULE object, dlist_start); break; case GAMGI_ENGINE_CLUSTER: dlist_start = gamgi_engine_dlist_atom_cluster (GAMGI_CAST_CLUSTER object, dlist_start); break; case GAMGI_ENGINE_CELL: dlist_start = gamgi_engine_dlist_atom_cell (GAMGI_CAST_CELL object, dlist_start); break; case GAMGI_ENGINE_ASSEMBLY: dlist_start = gamgi_engine_dlist_atom_assembly (GAMGI_CAST_ASSEMBLY object, dlist_start); break; case GAMGI_ENGINE_LAYER: dlist_start = gamgi_engine_dlist_atom_layer (GAMGI_CAST_LAYER object, dlist_start); break; case GAMGI_ENGINE_WINDOW: dlist_start = gamgi_engine_dlist_atom_window (GAMGI_CAST_WINDOW object, dlist_start); break; case GAMGI_ENGINE_GAMGI: dlist_start = gamgi_engine_dlist_atom_gamgi (dlist_start); break; default: break; } return dlist_start; } gamgi0.17.1g/src/engine/gamgi_engine_reparent.c0000644000175000017500000006776110637050021021032 0ustar carloscarlos/********************************************* * * $GAMGI/src/engine/gamgi_engine_reparent.c * * Copyright (C) 2001, 2004 Carlos Pereira * * Distributed under the terms of the GNU * General Public License: $GAMGI/LICENSE * */ #include "gamgi_engine.h" #include "gamgi_global.h" #include "gamgi_engine_link.h" #include "gamgi_engine_unlink.h" #include "gamgi_engine_list.h" #include "gamgi_engine_number.h" /*********************** external function ************************** * * * GAMGI_ENGINE_REPARENT_TEXT * * * ********************************************************************/ void gamgi_engine_reparent_text (gamgi_dlist *dlist, gamgi_object *parent) { gamgi_text *child; gamgi_text *text; gamgi_orbital *orbital; gamgi_atom *atom; gamgi_direction *direction; gamgi_plane *plane; gamgi_group *group; gamgi_molecule *molecule; gamgi_cluster *cluster; gamgi_cell *cell; gamgi_assembly *assembly; gamgi_layer *layer; /*********************************** * link text objects to new parent * ***********************************/ switch (parent->class) { case GAMGI_ENGINE_TEXT: text = GAMGI_CAST_TEXT parent; while (dlist != NULL) { child = GAMGI_CAST_TEXT dlist->data; dlist = dlist->next; gamgi_engine_unlink_text (child); gamgi_engine_link_text_text (child, text); } break; case GAMGI_ENGINE_ORBITAL: orbital = GAMGI_CAST_ORBITAL parent; while (dlist != NULL) { child = GAMGI_CAST_TEXT dlist->data; dlist = dlist->next; gamgi_engine_unlink_text (child); gamgi_engine_link_text_orbital (child, orbital); } break; case GAMGI_ENGINE_ATOM: atom = GAMGI_CAST_ATOM parent; while (dlist != NULL) { child = GAMGI_CAST_TEXT dlist->data; dlist = dlist->next; gamgi_engine_unlink_text (child); gamgi_engine_link_text_atom (child, atom); } break; case GAMGI_ENGINE_DIRECTION: direction = GAMGI_CAST_DIRECTION parent; while (dlist != NULL) { child = GAMGI_CAST_TEXT dlist->data; dlist = dlist->next; gamgi_engine_unlink_text (child); gamgi_engine_link_text_direction (child, direction); } break; case GAMGI_ENGINE_PLANE: plane = GAMGI_CAST_PLANE parent; while (dlist != NULL) { child = GAMGI_CAST_TEXT dlist->data; dlist = dlist->next; gamgi_engine_unlink_text (child); gamgi_engine_link_text_plane (child, plane); } break; case GAMGI_ENGINE_GROUP: group = GAMGI_CAST_GROUP parent; while (dlist != NULL) { child = GAMGI_CAST_TEXT dlist->data; dlist = dlist->next; gamgi_engine_unlink_text (child); gamgi_engine_link_text_group (child, group); } break; case GAMGI_ENGINE_MOLECULE: molecule = GAMGI_CAST_MOLECULE parent; while (dlist != NULL) { child = GAMGI_CAST_TEXT dlist->data; dlist = dlist->next; gamgi_engine_unlink_text (child); gamgi_engine_link_text_molecule (child, molecule); } break; case GAMGI_ENGINE_CLUSTER: cluster = GAMGI_CAST_CLUSTER parent; while (dlist != NULL) { child = GAMGI_CAST_TEXT dlist->data; dlist = dlist->next; gamgi_engine_unlink_text (child); gamgi_engine_link_text_cluster (child, cluster); } break; case GAMGI_ENGINE_CELL: cell = GAMGI_CAST_CELL parent; while (dlist != NULL) { child = GAMGI_CAST_TEXT dlist->data; dlist = dlist->next; gamgi_engine_unlink_text (child); gamgi_engine_link_text_cell (child, cell); } break; case GAMGI_ENGINE_ASSEMBLY: assembly = GAMGI_CAST_ASSEMBLY parent; while (dlist != NULL) { child = GAMGI_CAST_TEXT dlist->data; dlist = dlist->next; gamgi_engine_unlink_text (child); gamgi_engine_link_text_assembly (child, assembly); } break; case GAMGI_ENGINE_LAYER: layer = GAMGI_CAST_LAYER parent; while (dlist != NULL) { child = GAMGI_CAST_TEXT dlist->data; dlist = dlist->next; gamgi_engine_unlink_text (child); gamgi_engine_link_text_layer (child, layer); } break; } } /*********************** external function ************************** * * * GAMGI_ENGINE_REPARENT_ORBITAL * * * ********************************************************************/ void gamgi_engine_reparent_orbital (gamgi_dlist *dlist, gamgi_object *parent) { gamgi_orbital *child; gamgi_atom *atom; gamgi_direction *direction; gamgi_plane *plane; gamgi_group *group; gamgi_molecule *molecule; gamgi_cluster *cluster; gamgi_cell *cell; gamgi_assembly *assembly; gamgi_layer *layer; /************************************** * link orbital objects to new parent * **************************************/ switch (parent->class) { case GAMGI_ENGINE_ATOM: atom = GAMGI_CAST_ATOM parent; while (dlist != NULL) { child = GAMGI_CAST_ORBITAL dlist->data; dlist = dlist->next; gamgi_engine_unlink_orbital (child); gamgi_engine_link_orbital_atom (child, atom); } break; case GAMGI_ENGINE_DIRECTION: direction = GAMGI_CAST_DIRECTION parent; while (dlist != NULL) { child = GAMGI_CAST_ORBITAL dlist->data; dlist = dlist->next; gamgi_engine_unlink_orbital (child); gamgi_engine_link_orbital_direction (child, direction); } break; case GAMGI_ENGINE_PLANE: plane = GAMGI_CAST_PLANE parent; while (dlist != NULL) { child = GAMGI_CAST_ORBITAL dlist->data; dlist = dlist->next; gamgi_engine_unlink_orbital (child); gamgi_engine_link_orbital_plane (child, plane); } break; case GAMGI_ENGINE_GROUP: group = GAMGI_CAST_GROUP parent; while (dlist != NULL) { child = GAMGI_CAST_ORBITAL dlist->data; dlist = dlist->next; gamgi_engine_unlink_orbital (child); gamgi_engine_link_orbital_group (child, group); } break; case GAMGI_ENGINE_MOLECULE: molecule = GAMGI_CAST_MOLECULE parent; while (dlist != NULL) { child = GAMGI_CAST_ORBITAL dlist->data; dlist = dlist->next; gamgi_engine_unlink_orbital (child); gamgi_engine_link_orbital_molecule (child, molecule); } break; case GAMGI_ENGINE_CLUSTER: cluster = GAMGI_CAST_CLUSTER parent; while (dlist != NULL) { child = GAMGI_CAST_ORBITAL dlist->data; dlist = dlist->next; gamgi_engine_unlink_orbital (child); gamgi_engine_link_orbital_cluster (child, cluster); } break; case GAMGI_ENGINE_CELL: cell = GAMGI_CAST_CELL parent; while (dlist != NULL) { child = GAMGI_CAST_ORBITAL dlist->data; dlist = dlist->next; gamgi_engine_unlink_orbital (child); gamgi_engine_link_orbital_cell (child, cell); } break; case GAMGI_ENGINE_ASSEMBLY: assembly = GAMGI_CAST_ASSEMBLY parent; while (dlist != NULL) { child = GAMGI_CAST_ORBITAL dlist->data; dlist = dlist->next; gamgi_engine_unlink_orbital (child); gamgi_engine_link_orbital_assembly (child, assembly); } break; case GAMGI_ENGINE_LAYER: layer = GAMGI_CAST_LAYER parent; while (dlist != NULL) { child = GAMGI_CAST_ORBITAL dlist->data; dlist = dlist->next; gamgi_engine_unlink_orbital (child); gamgi_engine_link_orbital_layer (child, layer); } break; } } /************************* external function ************************* * * * GAMGI_ENGINE_REPARENT_ATOM * * * *********************************************************************/ void gamgi_engine_reparent_atom (gamgi_dlist *dlist, gamgi_object *parent) { gamgi_atom *child; gamgi_direction *direction; gamgi_plane *plane; gamgi_group *group; gamgi_molecule *molecule; gamgi_cluster *cluster; gamgi_cell *cell; gamgi_assembly *assembly; gamgi_layer *layer; /************************************ * link atoms objects to new parent * ************************************/ switch (parent->class) { case GAMGI_ENGINE_DIRECTION: direction = GAMGI_CAST_DIRECTION parent; while (dlist != NULL) { child = GAMGI_CAST_ATOM dlist->data; dlist = dlist->next; gamgi_engine_unlink_atom (child); gamgi_engine_link_atom_direction (child, direction); } break; case GAMGI_ENGINE_PLANE: plane = GAMGI_CAST_PLANE parent; while (dlist != NULL) { child = GAMGI_CAST_ATOM dlist->data; dlist = dlist->next; gamgi_engine_unlink_atom (child); gamgi_engine_link_atom_plane (child, plane); } break; case GAMGI_ENGINE_GROUP: group = GAMGI_CAST_GROUP parent; while (dlist != NULL) { child = GAMGI_CAST_ATOM dlist->data; dlist = dlist->next; gamgi_engine_unlink_atom (child); gamgi_engine_link_atom_group (child, group); } break; case GAMGI_ENGINE_MOLECULE: molecule = GAMGI_CAST_MOLECULE parent; while (dlist != NULL) { child = GAMGI_CAST_ATOM dlist->data; dlist = dlist->next; gamgi_engine_unlink_atom (child); gamgi_engine_link_atom_molecule (child, molecule); } break; case GAMGI_ENGINE_CLUSTER: cluster = GAMGI_CAST_CLUSTER parent; while (dlist != NULL) { child = GAMGI_CAST_ATOM dlist->data; dlist = dlist->next; gamgi_engine_unlink_atom (child); gamgi_engine_link_atom_cluster (child, cluster); } break; case GAMGI_ENGINE_CELL: cell = GAMGI_CAST_CELL parent; while (dlist != NULL) { child = GAMGI_CAST_ATOM dlist->data; dlist = dlist->next; gamgi_engine_unlink_atom (child); gamgi_engine_link_atom_cell (child, cell); } break; case GAMGI_ENGINE_ASSEMBLY: assembly = GAMGI_CAST_ASSEMBLY parent; while (dlist != NULL) { child = GAMGI_CAST_ATOM dlist->data; dlist = dlist->next; gamgi_engine_unlink_atom (child); gamgi_engine_link_atom_assembly (child, assembly); } break; case GAMGI_ENGINE_LAYER: layer = GAMGI_CAST_LAYER parent; while (dlist != NULL) { child = GAMGI_CAST_ATOM dlist->data; dlist = dlist->next; gamgi_engine_unlink_atom (child); gamgi_engine_link_atom_layer (child, layer); } break; } } /* ************************ external function ************************ * * * GAMGI_ENGINE_REPARENT_DIRECTION * * * *********************************************************************/ void gamgi_engine_reparent_direction (gamgi_dlist *dlist, gamgi_object *parent) { gamgi_direction *child; gamgi_plane *plane; gamgi_group *group; gamgi_molecule *molecule; gamgi_cluster *cluster; gamgi_cell *cell; gamgi_assembly *assembly; gamgi_layer *layer; /**************************************** * link direction objects to new parent * ****************************************/ switch (parent->class) { case GAMGI_ENGINE_PLANE: plane = GAMGI_CAST_PLANE parent; while (dlist != NULL) { child = GAMGI_CAST_DIRECTION dlist->data; dlist = dlist->next; gamgi_engine_unlink_direction (child); gamgi_engine_link_direction_plane (child, plane); } break; case GAMGI_ENGINE_GROUP: group = GAMGI_CAST_GROUP parent; while (dlist != NULL) { child = GAMGI_CAST_DIRECTION dlist->data; dlist = dlist->next; gamgi_engine_unlink_direction (child); gamgi_engine_link_direction_group (child, group); } break; case GAMGI_ENGINE_MOLECULE: molecule = GAMGI_CAST_MOLECULE parent; while (dlist != NULL) { child = GAMGI_CAST_DIRECTION dlist->data; dlist = dlist->next; gamgi_engine_unlink_direction (child); gamgi_engine_link_direction_molecule (child, molecule); } break; case GAMGI_ENGINE_CLUSTER: cluster = GAMGI_CAST_CLUSTER parent; while (dlist != NULL) { child = GAMGI_CAST_DIRECTION dlist->data; dlist = dlist->next; gamgi_engine_unlink_direction (child); gamgi_engine_link_direction_cluster (child, cluster); } break; case GAMGI_ENGINE_CELL: cell = GAMGI_CAST_CELL parent; while (dlist != NULL) { child = GAMGI_CAST_DIRECTION dlist->data; dlist = dlist->next; gamgi_engine_unlink_direction (child); gamgi_engine_link_direction_cell (child, cell); } break; case GAMGI_ENGINE_ASSEMBLY: assembly = GAMGI_CAST_ASSEMBLY parent; while (dlist != NULL) { child = GAMGI_CAST_DIRECTION dlist->data; dlist = dlist->next; gamgi_engine_unlink_direction (child); gamgi_engine_link_direction_assembly (child, assembly); } break; case GAMGI_ENGINE_LAYER: layer = GAMGI_CAST_LAYER parent; while (dlist != NULL) { child = GAMGI_CAST_DIRECTION dlist->data; dlist = dlist->next; gamgi_engine_unlink_direction (child); gamgi_engine_link_direction_layer (child, layer); } break; } } /************************* external function ************************** * * * GAMGI_ENGINE_REPARENT_PLANE * * * **********************************************************************/ void gamgi_engine_reparent_plane (gamgi_dlist *dlist, gamgi_object *parent) { gamgi_plane *child; gamgi_group *group; gamgi_molecule *molecule; gamgi_cluster *cluster; gamgi_cell *cell; gamgi_assembly *assembly; gamgi_layer *layer; /************************************ * link plane objects to new parent * ************************************/ switch (parent->class) { case GAMGI_ENGINE_GROUP: group = GAMGI_CAST_GROUP parent; while (dlist != NULL) { child = GAMGI_CAST_PLANE dlist->data; dlist = dlist->next; gamgi_engine_unlink_plane (child); gamgi_engine_link_plane_group (child, group); } break; case GAMGI_ENGINE_MOLECULE: molecule = GAMGI_CAST_MOLECULE parent; while (dlist != NULL) { child = GAMGI_CAST_PLANE dlist->data; dlist = dlist->next; gamgi_engine_unlink_plane (child); gamgi_engine_link_plane_molecule (child, molecule); } break; case GAMGI_ENGINE_CLUSTER: cluster = GAMGI_CAST_CLUSTER parent; while (dlist != NULL) { child = GAMGI_CAST_PLANE dlist->data; dlist = dlist->next; gamgi_engine_unlink_plane (child); gamgi_engine_link_plane_cluster (child, cluster); } break; case GAMGI_ENGINE_CELL: cell = GAMGI_CAST_CELL parent; while (dlist != NULL) { child = GAMGI_CAST_PLANE dlist->data; dlist = dlist->next; gamgi_engine_unlink_plane (child); gamgi_engine_link_plane_cell (child, cell); } break; case GAMGI_ENGINE_ASSEMBLY: assembly = GAMGI_CAST_ASSEMBLY parent; while (dlist != NULL) { child = GAMGI_CAST_PLANE dlist->data; dlist = dlist->next; gamgi_engine_unlink_plane (child); gamgi_engine_link_plane_assembly (child, assembly); } break; case GAMGI_ENGINE_LAYER: layer = GAMGI_CAST_LAYER parent; while (dlist != NULL) { child = GAMGI_CAST_PLANE dlist->data; dlist = dlist->next; gamgi_engine_unlink_plane (child); gamgi_engine_link_plane_layer (child, layer); } break; } } /************************ external function ************************** * * * GAMGI_ENGINE_REPARENT_GROUP * * * *********************************************************************/ void gamgi_engine_reparent_group (gamgi_dlist *dlist, gamgi_object *parent) { gamgi_group *child; gamgi_group *group; gamgi_molecule *molecule; gamgi_cluster *cluster; gamgi_cell *cell; gamgi_assembly *assembly; gamgi_layer *layer; /************************************ * link group objects to new parent * ************************************/ switch (parent->class) { case GAMGI_ENGINE_GROUP: group = GAMGI_CAST_GROUP parent; while (dlist != NULL) { child = GAMGI_CAST_GROUP dlist->data; dlist = dlist->next; gamgi_engine_unlink_group (child); gamgi_engine_link_group_group (child, group); } break; case GAMGI_ENGINE_MOLECULE: molecule = GAMGI_CAST_MOLECULE parent; while (dlist != NULL) { child = GAMGI_CAST_GROUP dlist->data; dlist = dlist->next; gamgi_engine_unlink_group (child); gamgi_engine_link_group_molecule (child, molecule); } break; case GAMGI_ENGINE_CLUSTER: cluster = GAMGI_CAST_CLUSTER parent; while (dlist != NULL) { child = GAMGI_CAST_GROUP dlist->data; dlist = dlist->next; gamgi_engine_unlink_group (child); gamgi_engine_link_group_cluster (child, cluster); } break; case GAMGI_ENGINE_CELL: cell = GAMGI_CAST_CELL parent; while (dlist != NULL) { child = GAMGI_CAST_GROUP dlist->data; dlist = dlist->next; gamgi_engine_unlink_group (child); gamgi_engine_link_group_cell (child, cell); } break; case GAMGI_ENGINE_ASSEMBLY: assembly = GAMGI_CAST_ASSEMBLY parent; while (dlist != NULL) { child = GAMGI_CAST_GROUP dlist->data; dlist = dlist->next; gamgi_engine_unlink_group (child); gamgi_engine_link_group_assembly (child, assembly); } break; case GAMGI_ENGINE_LAYER: layer = GAMGI_CAST_LAYER parent; while (dlist != NULL) { child = GAMGI_CAST_GROUP dlist->data; dlist = dlist->next; gamgi_engine_unlink_group (child); gamgi_engine_link_group_layer (child, layer); } break; } } /************************* external function ********************** * * * GAMGI_ENGINE_REPARENT_MOLECULE * * * ******************************************************************/ void gamgi_engine_reparent_molecule (gamgi_dlist *dlist, gamgi_object *parent) { gamgi_molecule *child; gamgi_cluster *cluster; gamgi_cell *cell; gamgi_assembly *assembly; gamgi_layer *layer; /*************************************** * link molecule objects to new parent * ***************************************/ switch (parent->class) { case GAMGI_ENGINE_CLUSTER: cluster = GAMGI_CAST_CLUSTER parent; while (dlist != NULL) { child = GAMGI_CAST_MOLECULE dlist->data; dlist = dlist->next; gamgi_engine_unlink_molecule (child); gamgi_engine_link_molecule_cluster (child, cluster); } break; case GAMGI_ENGINE_CELL: cell = GAMGI_CAST_CELL parent; while (dlist != NULL) { child = GAMGI_CAST_MOLECULE dlist->data; dlist = dlist->next; gamgi_engine_unlink_molecule (child); gamgi_engine_link_molecule_cell (child, cell); } break; case GAMGI_ENGINE_ASSEMBLY: assembly = GAMGI_CAST_ASSEMBLY parent; while (dlist != NULL) { child = GAMGI_CAST_MOLECULE dlist->data; dlist = dlist->next; gamgi_engine_unlink_molecule (child); gamgi_engine_link_molecule_assembly (child, assembly); } break; case GAMGI_ENGINE_LAYER: layer = GAMGI_CAST_LAYER parent; while (dlist != NULL) { child = GAMGI_CAST_MOLECULE dlist->data; dlist = dlist->next; gamgi_engine_unlink_molecule (child); gamgi_engine_link_molecule_layer (child, layer); } break; } } /************************* external function ******************************* * * * GAMGI_ENGINE_REPARENT_CLUSTER * * * ***************************************************************************/ void gamgi_engine_reparent_cluster (gamgi_dlist *dlist, gamgi_object *parent) { gamgi_cluster *child; gamgi_cluster *cluster; gamgi_cell *cell; gamgi_assembly *assembly; gamgi_layer *layer; /************************************** * link cluster objects to new parent * **************************************/ switch (parent->class) { case GAMGI_ENGINE_CLUSTER: cluster = GAMGI_CAST_CLUSTER parent; while (dlist != NULL) { child = GAMGI_CAST_CLUSTER dlist->data; dlist = dlist->next; gamgi_engine_unlink_cluster (child); gamgi_engine_link_cluster_cluster (child, cluster); } break; case GAMGI_ENGINE_CELL: cell = GAMGI_CAST_CELL parent; while (dlist != NULL) { child = GAMGI_CAST_CLUSTER dlist->data; dlist = dlist->next; gamgi_engine_unlink_cluster (child); gamgi_engine_link_cluster_cell (child, cell); } break; case GAMGI_ENGINE_ASSEMBLY: assembly = GAMGI_CAST_ASSEMBLY parent; while (dlist != NULL) { child = GAMGI_CAST_CLUSTER dlist->data; dlist = dlist->next; gamgi_engine_unlink_cluster (child); gamgi_engine_link_cluster_assembly (child, assembly); } break; case GAMGI_ENGINE_LAYER: layer = GAMGI_CAST_LAYER parent; while (dlist != NULL) { child = GAMGI_CAST_CLUSTER dlist->data; dlist = dlist->next; gamgi_engine_unlink_cluster (child); gamgi_engine_link_cluster_layer (child, layer); } break; } } /************************ external function ************************ * * * GAMGI_ENGINE_REPARENT_CELL * * * *******************************************************************/ void gamgi_engine_reparent_cell (gamgi_dlist *dlist, gamgi_object *parent) { gamgi_cell *child; gamgi_assembly *assembly; gamgi_layer *layer; /*********************************** * link cell objects to new parent * ***********************************/ switch (parent->class) { case GAMGI_ENGINE_ASSEMBLY: assembly = GAMGI_CAST_ASSEMBLY parent; while (dlist != NULL) { child = GAMGI_CAST_CELL dlist->data; dlist = dlist->next; gamgi_engine_unlink_cell (child); gamgi_engine_link_cell_assembly (child, assembly); } break; case GAMGI_ENGINE_LAYER: layer = GAMGI_CAST_LAYER parent; while (dlist != NULL) { child = GAMGI_CAST_CELL dlist->data; dlist = dlist->next; gamgi_engine_unlink_cell (child); gamgi_engine_link_cell_layer (child, layer); } break; } } /************************** external function ******************* * * * GAMGI_ENGINE_REPARENT_ARROW * * * ****************************************************************/ void gamgi_engine_reparent_arrow (gamgi_dlist *dlist, gamgi_object *parent) { gamgi_arrow *child; gamgi_assembly *assembly; gamgi_layer *layer; /************************************ * link arrow objects to new parent * ************************************/ switch (parent->class) { case GAMGI_ENGINE_ASSEMBLY: assembly = GAMGI_CAST_ASSEMBLY parent; while (dlist != NULL) { child = GAMGI_CAST_ARROW dlist->data; dlist = dlist->next; gamgi_engine_unlink_arrow (child); gamgi_engine_link_arrow_assembly (child, assembly); } break; case GAMGI_ENGINE_LAYER: layer = GAMGI_CAST_LAYER parent; while (dlist != NULL) { child = GAMGI_CAST_ARROW dlist->data; dlist = dlist->next; gamgi_engine_unlink_arrow (child); gamgi_engine_link_arrow_layer (child, layer); } break; } } /************************** external function ******************** * * * GAMGI_ENGINE_REPARENT_SHAPE * * * *****************************************************************/ void gamgi_engine_reparent_shape (gamgi_dlist *dlist, gamgi_object *parent) { gamgi_shape *child; gamgi_assembly *assembly; gamgi_layer *layer; /************************************ * link shape objects to new parent * ************************************/ switch (parent->class) { case GAMGI_ENGINE_ASSEMBLY: assembly = GAMGI_CAST_ASSEMBLY parent; while (dlist != NULL) { child = GAMGI_CAST_SHAPE dlist->data; dlist = dlist->next; gamgi_engine_unlink_shape (child); gamgi_engine_link_shape_assembly (child, assembly); } break; case GAMGI_ENGINE_LAYER: layer = GAMGI_CAST_LAYER parent; while (dlist != NULL) { child = GAMGI_CAST_SHAPE dlist->data; dlist = dlist->next; gamgi_engine_unlink_shape (child); gamgi_engine_link_shape_layer (child, layer); } break; } } /************************** external function ******************** * * * GAMGI_ENGINE_REPARENT_GRAPH * * * *****************************************************************/ void gamgi_engine_reparent_graph (gamgi_dlist *dlist, gamgi_object *parent) { gamgi_graph *child; gamgi_assembly *assembly; gamgi_layer *layer; /************************************ * link graph objects to new parent * ************************************/ switch (parent->class) { case GAMGI_ENGINE_ASSEMBLY: assembly = GAMGI_CAST_ASSEMBLY parent; while (dlist != NULL) { child = GAMGI_CAST_GRAPH dlist->data; dlist = dlist->next; gamgi_engine_unlink_graph (child); gamgi_engine_link_graph_assembly (child, assembly); } break; case GAMGI_ENGINE_LAYER: layer = GAMGI_CAST_LAYER parent; while (dlist != NULL) { child = GAMGI_CAST_GRAPH dlist->data; dlist = dlist->next; gamgi_engine_unlink_graph (child); gamgi_engine_link_graph_layer (child, layer); } break; } } /************************** external function ******************** * * * GAMGI_ENGINE_REPARENT_ASSEMBLY * * * *****************************************************************/ void gamgi_engine_reparent_assembly (gamgi_dlist *dlist, gamgi_object *parent) { gamgi_assembly *child; gamgi_assembly *assembly; gamgi_layer *layer; /*************************************** * link assembly objects to new parent * ***************************************/ switch (parent->class) { case GAMGI_ENGINE_ASSEMBLY: assembly = GAMGI_CAST_ASSEMBLY parent; while (dlist != NULL) { child = GAMGI_CAST_ASSEMBLY dlist->data; dlist = dlist->next; gamgi_engine_unlink_assembly (child); gamgi_engine_link_assembly_assembly (child, assembly); } break; case GAMGI_ENGINE_LAYER: layer = GAMGI_CAST_LAYER parent; while (dlist != NULL) { child = GAMGI_CAST_ASSEMBLY dlist->data; dlist = dlist->next; gamgi_engine_unlink_assembly (child); gamgi_engine_link_assembly_layer (child, layer); } break; } } /************************** external function ******************** * * * GAMGI_ENGINE_REPARENT_LIGHT * * * *****************************************************************/ void gamgi_engine_reparent_light (gamgi_dlist *dlist, gamgi_object *parent) { gamgi_light *child; gamgi_layer *layer; /*************************************** * link assembly objects to new parent * ***************************************/ switch (parent->class) { case GAMGI_ENGINE_LAYER: layer = GAMGI_CAST_LAYER parent; while (dlist != NULL) { child = GAMGI_CAST_LIGHT dlist->data; dlist = dlist->next; gamgi_engine_unlink_light (child); gamgi_engine_link_light_layer (child, layer); } break; } } /************************** external function ******************** * * * GAMGI_ENGINE_REPARENT_LAYER * * * *****************************************************************/ void gamgi_engine_reparent_layer (gamgi_dlist *dlist, gamgi_object *parent) { gamgi_layer *child; gamgi_window *window; /*************************************** * link assembly objects to new parent * ***************************************/ switch (parent->class) { case GAMGI_ENGINE_WINDOW: window = GAMGI_CAST_WINDOW parent; while (dlist != NULL) { child = GAMGI_CAST_LAYER dlist->data; dlist = dlist->next; gamgi_engine_unlink_layer (child); gamgi_engine_link_layer_window (child, window); } break; } } gamgi0.17.1g/src/engine/makefile0000644000175000017500000000270211561566163016055 0ustar carloscarlos########################################### # # $GAMGI/src/engine/makefile # # Copyright (C) 2001, 2004 Carlos Pereira # # Distributed under the terms of the GNU # General Public License: $GAMGI/LICENSE # #======================== Engine files =============================== GAMGI_ENGINE_h = gamgi_engine.h GAMGI_ENGINE_o = gamgi_engine_array.o gamgi_engine_copy.o \ gamgi_engine_copy_out.o gamgi_engine_count.o \ gamgi_engine_create.o gamgi_engine_dlist.o \ gamgi_engine_empty.o gamgi_engine_filter.o \ gamgi_engine_find.o gamgi_engine_link.o \ gamgi_engine_list.o gamgi_engine_number.o \ gamgi_engine_remove.o gamgi_engine_remove_out.o \ gamgi_engine_reparent.o gamgi_engine_start.o \ gamgi_engine_task.o gamgi_engine_unlink.o #========================= Gamgi paths =============================== ifndef FLAG FLAG = 1 SRC = ../ include $(SRC)make_paths #========================= Gamgi files =============================== GAMGI_o = $(GAMGI_ENGINE_o) $(GAMGI_GTK_o) $(GAMGI_MESA_o) \ $(GAMGI_MATH_o) $(GAMGI_CHEM_o) $(GAMGI_PHYS_o) \ $(GAMGI_IO_o) $(GAMGI_EXPAT_o) $(GAMGI_GLOBAL_o) GAMGI_h = $(GAMGI_ENGINE_h) $(GAMGI_GTK_h) $(GAMGI_MESA_h) \ $(GAMGI_MATH_h) $(GAMGI_CHEM_h) $(GAMGI_PHYS_h) \ $(GAMGI_IO_h) $(GAMGI_EXPAT_h) $(GAMGI_GLOBAL_h) #========================= Gamgi local =============================== include $(SRC)make_local #========================= Gamgi rules =============================== include $(SRC)make_rules endif gamgi0.17.1g/src/engine/gamgi_engine_number.c0000644000175000017500000003412111502225605020466 0ustar carloscarlos/******************************************* * * $GAMGI/src/engine/gamgi_engine_number.c * * Copyright (C) 2001, 2004 Carlos Pereira * * Distributed under the terms of the GNU * General Public License: $GAMGI/LICENSE * */ #include "gamgi_engine.h" #include "gamgi_engine_list.h" /****************************************** * Initialise numbers for all objects. * * These numbers are static, so they are * * kept in memory untill GAMGI is closed. * ******************************************/ static unsigned int text_number = 1; static unsigned int orbital_number = 1; static unsigned int bond_number = 1; static unsigned int atom_number = 1; static unsigned int direction_number = 1; static unsigned int plane_number = 1; static unsigned int group_number = 1; static unsigned int molecule_number = 1; static unsigned int cluster_number = 1; static unsigned int cell_number = 1; static unsigned int arrow_number = 1; static unsigned int shape_number = 1; static unsigned int graph_number = 1; static unsigned int assembly_number = 1; static unsigned int light_number = 1; static unsigned int layer_number = 1; static unsigned int window_number = 1; /*************************************************** * Initialise recycling lists for all objects. * * Everytime an object is removed, its number is * * added to the corresponding list. When an object * * is created, its number will be taken from the * * recycled list, unless the list is empty. * ***************************************************/ static gamgi_slist *text_start = NULL, *text_end = NULL; static gamgi_slist *orbital_start = NULL, *orbital_end = NULL; static gamgi_slist *bond_start = NULL, *bond_end = NULL; static gamgi_slist *atom_start = NULL, *atom_end = NULL; static gamgi_slist *direction_start = NULL, *direction_end = NULL; static gamgi_slist *plane_start = NULL, *plane_end = NULL; static gamgi_slist *group_start = NULL, *group_end = NULL; static gamgi_slist *molecule_start = NULL, *molecule_end = NULL; static gamgi_slist *cluster_start = NULL, *cluster_end = NULL; static gamgi_slist *cell_start = NULL, *cell_end = NULL; static gamgi_slist *arrow_start = NULL, *arrow_end = NULL; static gamgi_slist *shape_start = NULL, *shape_end = NULL; static gamgi_slist *graph_start = NULL, *graph_end = NULL; static gamgi_slist *assembly_start = NULL, *assembly_end = NULL; static gamgi_slist *light_start = NULL, *light_end = NULL; static gamgi_slist *layer_start = NULL, *layer_end = NULL; static gamgi_slist *window_start = NULL, *window_end = NULL; unsigned int gamgi_engine_number_text_get (void) { unsigned int number; if (text_start == NULL) return text_number++; else { number = GAMGI_POINTER_TO_INT (text_start->data); text_start = gamgi_engine_slist_remove_start (text_start); if (text_start == NULL) text_end = NULL; return number; } } void gamgi_engine_number_text_recycle (unsigned int number) { text_end = gamgi_engine_slist_add_end (text_end); if (text_start == NULL) text_start = text_end; text_end->data = GAMGI_INT_TO_POINTER (number); } void gamgi_engine_number_text_reset (void) { gamgi_engine_slist_remove_all (text_start); text_start = NULL; text_end = NULL; text_number = 1; } unsigned int gamgi_engine_number_orbital_get (void) { unsigned int number; if (orbital_start == NULL) return orbital_number++; else { number = GAMGI_POINTER_TO_INT (orbital_start->data); orbital_start = gamgi_engine_slist_remove_start (orbital_start); if (orbital_start == NULL) orbital_end = NULL; return number; } } void gamgi_engine_number_orbital_recycle (unsigned int number) { orbital_end = gamgi_engine_slist_add_end (orbital_end); if (orbital_start == NULL) orbital_start = orbital_end; orbital_end->data = GAMGI_INT_TO_POINTER (number); } void gamgi_engine_number_orbital_reset (void) { gamgi_engine_slist_remove_all (orbital_start); orbital_start = NULL; orbital_end = NULL; orbital_number = 1; } unsigned int gamgi_engine_number_bond_get (void) { unsigned int number; if (bond_start == NULL) return bond_number++; else { number = GAMGI_POINTER_TO_INT (bond_start->data); bond_start = gamgi_engine_slist_remove_start (bond_start); if (bond_start == NULL) bond_end = NULL; return number; } } void gamgi_engine_number_bond_recycle (unsigned int number) { bond_end = gamgi_engine_slist_add_end (bond_end); if (bond_start == NULL) bond_start = bond_end; bond_end->data = GAMGI_INT_TO_POINTER (number); } void gamgi_engine_number_bond_reset (void) { gamgi_engine_slist_remove_all (bond_start); bond_start = NULL; bond_end = NULL; bond_number = 1; } unsigned int gamgi_engine_number_atom_get (void) { unsigned int number; if (atom_start == NULL) return atom_number++; else { number = GAMGI_POINTER_TO_INT (atom_start->data); atom_start = gamgi_engine_slist_remove_start (atom_start); if (atom_start == NULL) atom_end = NULL; return number; } } void gamgi_engine_number_atom_recycle (unsigned int number) { atom_end = gamgi_engine_slist_add_end (atom_end); if (atom_start == NULL) atom_start = atom_end; atom_end->data = GAMGI_INT_TO_POINTER (number); } void gamgi_engine_number_atom_reset (void) { gamgi_engine_slist_remove_all (atom_start); atom_start = NULL; atom_end = NULL; atom_number = 1; } unsigned int gamgi_engine_number_direction_get (void) { unsigned int number; if (direction_start == NULL) return direction_number++; else { number = GAMGI_POINTER_TO_INT (direction_start->data); direction_start = gamgi_engine_slist_remove_start (direction_start); if (direction_start == NULL) direction_end = NULL; return number; } } void gamgi_engine_number_direction_recycle (unsigned int number) { direction_end = gamgi_engine_slist_add_end (direction_end); if (direction_start == NULL) direction_start = direction_end; direction_end->data = GAMGI_INT_TO_POINTER (number); } void gamgi_engine_number_direction_reset (void) { gamgi_engine_slist_remove_all (direction_start); direction_start = NULL; direction_end = NULL; direction_number = 1; } unsigned int gamgi_engine_number_plane_get (void) { unsigned int number; if (plane_start == NULL) return plane_number++; else { number = GAMGI_POINTER_TO_INT (plane_start->data); plane_start = gamgi_engine_slist_remove_start (plane_start); if (plane_start == NULL) plane_end = NULL; return number; } } void gamgi_engine_number_plane_recycle (unsigned int number) { plane_end = gamgi_engine_slist_add_end (plane_end); if (plane_start == NULL) plane_start = plane_end; plane_end->data = GAMGI_INT_TO_POINTER (number); } void gamgi_engine_number_plane_reset (void) { gamgi_engine_slist_remove_all (plane_start); plane_start = NULL; plane_end = NULL; plane_number = 1; } unsigned int gamgi_engine_number_group_get (void) { unsigned int number; if (group_start == NULL) return group_number++; else { number = GAMGI_POINTER_TO_INT (group_start->data); group_start = gamgi_engine_slist_remove_start (group_start); if (group_start == NULL) group_end = NULL; return number; } } void gamgi_engine_number_group_recycle (unsigned int number) { group_end = gamgi_engine_slist_add_end (group_end); if (group_start == NULL) group_start = group_end; group_end->data = GAMGI_INT_TO_POINTER (number); } void gamgi_engine_number_group_reset (void) { gamgi_engine_slist_remove_all (group_start); group_start = NULL; group_end = NULL; group_number = 1; } unsigned int gamgi_engine_number_molecule_get (void) { unsigned int number; if (molecule_start == NULL) return molecule_number++; else { number = GAMGI_POINTER_TO_INT (molecule_start->data); molecule_start = gamgi_engine_slist_remove_start (molecule_start); if (molecule_start == NULL) molecule_end = NULL; return number; } } void gamgi_engine_number_molecule_recycle (unsigned int number) { molecule_end = gamgi_engine_slist_add_end (molecule_end); if (molecule_start == NULL) molecule_start = molecule_end; molecule_end->data = GAMGI_INT_TO_POINTER (number); } void gamgi_engine_number_molecule_reset (void) { gamgi_engine_slist_remove_all (molecule_start); molecule_start = NULL; molecule_end = NULL; molecule_number = 1; } unsigned int gamgi_engine_number_cluster_get (void) { unsigned int number; if (cluster_start == NULL) return cluster_number++; else { number = GAMGI_POINTER_TO_INT (cluster_start->data); cluster_start = gamgi_engine_slist_remove_start (cluster_start); if (cluster_start == NULL) cluster_end = NULL; return number; } } void gamgi_engine_number_cluster_recycle (unsigned int number) { cluster_end = gamgi_engine_slist_add_end (cluster_end); if (cluster_start == NULL) cluster_start = cluster_end; cluster_end->data = GAMGI_INT_TO_POINTER (number); } void gamgi_engine_number_cluster_reset (void) { gamgi_engine_slist_remove_all (cluster_start); cluster_start = NULL; cluster_end = NULL; cluster_number = 1; } unsigned int gamgi_engine_number_cell_get (void) { unsigned int number; if (cell_start == NULL) return cell_number++; else { number = GAMGI_POINTER_TO_INT (cell_start->data); cell_start = gamgi_engine_slist_remove_start (cell_start); if (cell_start == NULL) cell_end = NULL; return number; } } void gamgi_engine_number_cell_recycle (unsigned int number) { cell_end = gamgi_engine_slist_add_end (cell_end); if (cell_start == NULL) cell_start = cell_end; cell_end->data = GAMGI_INT_TO_POINTER (number); } void gamgi_engine_number_cell_reset (void) { gamgi_engine_slist_remove_all (cell_start); cell_start = NULL; cell_end = NULL; cell_number = 1; } unsigned int gamgi_engine_number_arrow_get (void) { unsigned int number; if (arrow_start == NULL) return arrow_number++; else { number = GAMGI_POINTER_TO_INT (arrow_start->data); arrow_start = gamgi_engine_slist_remove_start (arrow_start); if (arrow_start == NULL) arrow_end = NULL; return number; } } void gamgi_engine_number_arrow_recycle (unsigned int number) { arrow_end = gamgi_engine_slist_add_end (arrow_end); if (arrow_start == NULL) arrow_start = arrow_end; arrow_end->data = GAMGI_INT_TO_POINTER (number); } void gamgi_engine_number_arrow_reset (void) { gamgi_engine_slist_remove_all (arrow_start); arrow_start = NULL; arrow_end = NULL; arrow_number = 1; } unsigned int gamgi_engine_number_shape_get (void) { unsigned int number; if (shape_start == NULL) return shape_number++; else { number = GAMGI_POINTER_TO_INT (shape_start->data); shape_start = gamgi_engine_slist_remove_start (shape_start); if (shape_start == NULL) shape_end = NULL; return number; } } void gamgi_engine_number_shape_recycle (unsigned int number) { shape_end = gamgi_engine_slist_add_end (shape_end); if (shape_start == NULL) shape_start = shape_end; shape_end->data = GAMGI_INT_TO_POINTER (number); } void gamgi_engine_number_shape_reset (void) { gamgi_engine_slist_remove_all (shape_start); shape_start = NULL; shape_end = NULL; shape_number = 1; } unsigned int gamgi_engine_number_graph_get (void) { unsigned int number; if (graph_start == NULL) return graph_number++; else { number = GAMGI_POINTER_TO_INT (graph_start->data); graph_start = gamgi_engine_slist_remove_start (graph_start); if (graph_start == NULL) graph_end = NULL; return number; } } void gamgi_engine_number_graph_recycle (unsigned int number) { graph_end = gamgi_engine_slist_add_end (graph_end); if (graph_start == NULL) graph_start = graph_end; graph_end->data = GAMGI_INT_TO_POINTER (number); } void gamgi_engine_number_graph_reset (void) { gamgi_engine_slist_remove_all (graph_start); graph_start = NULL; graph_end = NULL; graph_number = 1; } unsigned int gamgi_engine_number_assembly_get (void) { unsigned int number; if (assembly_start == NULL) return assembly_number++; else { number = GAMGI_POINTER_TO_INT (assembly_start->data); assembly_start = gamgi_engine_slist_remove_start (assembly_start); if (assembly_start == NULL) assembly_end = NULL; return number; } } void gamgi_engine_number_assembly_recycle (unsigned int number) { assembly_end = gamgi_engine_slist_add_end (assembly_end); if (assembly_start == NULL) assembly_start = assembly_end; assembly_end->data = GAMGI_INT_TO_POINTER (number); } void gamgi_engine_number_assembly_reset (void) { gamgi_engine_slist_remove_all (assembly_start); assembly_start = NULL; assembly_end = NULL; assembly_number = 1; } unsigned int gamgi_engine_number_light_get (void) { unsigned int number; if (light_start == NULL) return light_number++; else { number = GAMGI_POINTER_TO_INT (light_start->data); light_start = gamgi_engine_slist_remove_start (light_start); if (light_start == NULL) light_end = NULL; return number; } } void gamgi_engine_number_light_recycle (unsigned int number) { light_end = gamgi_engine_slist_add_end (light_end); if (light_start == NULL) light_start = light_end; light_end->data = GAMGI_INT_TO_POINTER (number); } void gamgi_engine_number_light_reset (void) { gamgi_engine_slist_remove_all (light_start); light_start = NULL; light_end = NULL; light_number = 1; } unsigned int gamgi_engine_number_layer_get (void) { unsigned int number; if (layer_start == NULL) return layer_number++; else { number = GAMGI_POINTER_TO_INT (layer_start->data); layer_start = gamgi_engine_slist_remove_start (layer_start); if (layer_start == NULL) layer_end = NULL; return number; } } void gamgi_engine_number_layer_recycle (unsigned int number) { layer_end = gamgi_engine_slist_add_end (layer_end); if (layer_start == NULL) layer_start = layer_end; layer_end->data = GAMGI_INT_TO_POINTER (number); } void gamgi_engine_number_layer_reset (void) { gamgi_engine_slist_remove_all (layer_start); layer_start = NULL; layer_end = NULL; layer_number = 1; } unsigned int gamgi_engine_number_window_get (void) { unsigned int number; if (window_start == NULL) return window_number++; else { number = GAMGI_POINTER_TO_INT (window_start->data); window_start = gamgi_engine_slist_remove_start (window_start); if (window_start == NULL) window_end = NULL; return number; } } void gamgi_engine_number_window_recycle (unsigned int number) { window_end = gamgi_engine_slist_add_end (window_end); if (window_start == NULL) window_start = window_end; window_end->data = GAMGI_INT_TO_POINTER (number); } void gamgi_engine_number_window_reset (void) { gamgi_engine_slist_remove_all (window_start); window_start = NULL; window_end = NULL; window_number = 1; } gamgi0.17.1g/src/engine/gamgi_engine.h0000644000175000017500000004346412267607213017145 0ustar carloscarlos/******************************************* * * $GAMGI/src/engine/gamgi_engine.h * * Copyright (C) 2001, 2004 Carlos Pereira * * Distributed under the terms of the GNU * General Public License: $GAMGI/LICENSE * */ #ifndef GAMGI_ENGINE #define GAMGI_ENGINE /******** libraries ******* **************************/ #include #include #include #include #include #include #include #include #include #include #include /************* macros ************ *********************************/ #define GAMGI_ENGINE_TOKEN 20 #define GAMGI_ENGINE_STRING 50 #define GAMGI_ENGINE_LINE 200 /********************************************** * arrays of bits * * source: http://c-faq.com/misc/bitsets.html * **********************************************/ #define GAMGI_ENGINE_BITMASK(b) (1 << ((b) % CHAR_BIT)) #define GAMGI_ENGINE_BITSLOT(b) ((b) / CHAR_BIT) #define GAMGI_ENGINE_BITSET(a, b) ((a)[GAMGI_ENGINE_BITSLOT(b)] |= GAMGI_ENGINE_BITMASK(b)) #define GAMGI_ENGINE_BITCLEAR(a, b) ((a)[GAMGI_ENGINE_BITSLOT(b)] &= ~GAMGI_ENGINE_BITMASK(b)) #define GAMGI_ENGINE_BITTEST(a, b) ((a)[GAMGI_ENGINE_BITSLOT(b)] & GAMGI_ENGINE_BITMASK(b)) #define GAMGI_ENGINE_BITNSLOTS(nb) ((nb + CHAR_BIT - 1) / CHAR_BIT) /********** types ********* **************************/ /*************************************** * for the sake of simplicity, the * * folowing GTK and OpenGL types are * * NOT used in GAMGI, the built-in * * C types are applied instead. * * * * defined in glib/include/glib.h: * * typedef char gchar; * * typedef short gshort; * * typedef long glong; * * typedef int gint; * * typedef gint gboolean; * * typedef void* gpointer; * * typedef unsigned char guchar; * * typedef unsigned short gushort; * * typedef unsigned long gulong; * * typedef unsigned int guint; * * typedef float gfloat; * * typedef double gdouble; * * * * defined in mesa/include/GL/gl.h: * * typedef unsigned int GLenum; * * typedef unsigned char GLboolean; * * typedef unsigned int GLbitfield; * * typedef void GLvoid; * * typedef signed char GLbyte; * * typedef short GLshort; * * typedef int GLint; * * typedef unsigned char GLubyte; * * typedef unsigned short GLushort; * * typedef unsigned int GLuint; * * typedef float GLfloat; * * typedef double GLdouble; * ***************************************/ /**************************************** * these types improve code readability * ****************************************/ typedef int gamgi_enum; typedef int gamgi_bool; /********* * lists * *********/ typedef struct _gamgi_slist { void *data; struct _gamgi_slist *next; } gamgi_slist; typedef struct _gamgi_dlist { void *data; struct _gamgi_dlist *next, *before; } gamgi_dlist; /****************** * dynamic arrays * ******************/ typedef struct _gamgi_iarray { int *array, *last; int size, increment, dimension, offset; } gamgi_iarray; typedef struct _gamgi_darray { double *array, *last; int size, increment, dimension, offset; } gamgi_darray; /********** * object * **********/ typedef struct _gamgi_object { char name[GAMGI_ENGINE_TOKEN]; char label[GAMGI_ENGINE_TOKEN]; unsigned int number; int class; double scale; unsigned int task; struct _gamgi_object *object; gamgi_dlist *dlist; gamgi_dlist *selection; } gamgi_object; /******** * text * ********/ typedef struct _gamgi_text { gamgi_object object; void (*draw) (struct _gamgi_text *); int mark; char *string; int length; gamgi_enum style; gamgi_enum font; double origin[3]; double center[3]; double quaternion[4]; float red, green, blue; gamgi_dlist *text_start; gamgi_dlist *text_end; struct _gamgi_text *next, *before; } gamgi_text; /*********** * orbital * ***********/ typedef struct _gamgi_orbital { gamgi_object object; void (*draw) (struct _gamgi_orbital *); /**************** * quantum data * ****************/ int n, l, m; double charge; /************** * model data * **************/ gamgi_enum style; double radius, density; int sampling, seed; /*************** * volume data * ***************/ gamgi_bool phase, frame; int octants[8]; gamgi_enum axes; /************** * array data * **************/ int dots[3]; double *points; int *lines; int n_points, n_lines; /************ * position * ************/ double origin[3]; double center[3]; double quaternion[4]; /********** * colors * **********/ float base_r, base_g, base_b; float phase_r, phase_g, phase_b; float frame_r, frame_g, frame_b; gamgi_dlist *text_start; gamgi_dlist *text_end; struct _gamgi_orbital *next, *before; } gamgi_orbital; /******** * atom * ********/ typedef struct _gamgi_atom { gamgi_object object; void (*draw) (struct _gamgi_atom *); int element; double position[3]; double mass, radius, charge; double temperature, occupancy; float variancy, size; float red, green, blue; int mark; gamgi_dlist *text_start; gamgi_dlist *text_end; gamgi_dlist *orbital_start; gamgi_dlist *orbital_end; gamgi_dlist *bond_start; gamgi_dlist *bond_end; struct _gamgi_atom *next, *before; } gamgi_atom; /******** * bond * ********/ typedef struct _gamgi_bond { gamgi_object object; void (*draw) (struct _gamgi_bond *); gamgi_atom *atom1, *atom2; gamgi_dlist *dlist1, *dlist2; unsigned char color1[3], color2[3]; int first; gamgi_atom *copy; float order; float covalency; float size; gamgi_bool color; float red, green, blue; gamgi_dlist *text_start; gamgi_dlist *text_end; gamgi_dlist *orbital_start; gamgi_dlist *orbital_end; struct _gamgi_bond *next, *before; } gamgi_bond; /************* * direction * *************/ typedef struct _gamgi_direction { gamgi_object object; void (*draw) (struct _gamgi_direction *); void (*net) (double *, double *); gamgi_enum reference; gamgi_enum model; int uvw[3]; gamgi_enum vectors; int node[4]; double origin[3], center[3]; double quaternion[4]; double *points; int *loops; int n_points, n_loops; float red, green, blue; gamgi_dlist *text_start; gamgi_dlist *text_end; gamgi_dlist *orbital_start; gamgi_dlist *orbital_end; gamgi_dlist *bond_start; gamgi_dlist *bond_end; gamgi_dlist *atom_start; gamgi_dlist *atom_end; struct _gamgi_direction *next, *before; } gamgi_direction; /********* * plane * *********/ typedef struct _gamgi_plane { gamgi_object object; void (*draw) (struct _gamgi_plane *); void (*net) (double *, double *); gamgi_enum reference; gamgi_enum model; int hkl[3]; gamgi_enum vectors; int order; double origin[3], center[3]; double quaternion[4]; double *points; int *loops; int n_points, n_loops; float red, green, blue; gamgi_dlist *text_start; gamgi_dlist *text_end; gamgi_dlist *orbital_start; gamgi_dlist *orbital_end; gamgi_dlist *bond_start; gamgi_dlist *bond_end; gamgi_dlist *atom_start; gamgi_dlist *atom_end; gamgi_dlist *direction_start; gamgi_dlist *direction_end; struct _gamgi_plane *next, *before; } gamgi_plane; /********* * group * *********/ typedef struct _gamgi_group { gamgi_object object; void (*draw) (struct _gamgi_group *); int mark; gamgi_enum reference; double origin[3], center[3]; double quaternion[4]; gamgi_bool faces; double *points; int *loops; int n_points, n_loops; float red, green, blue; gamgi_dlist *text_start; gamgi_dlist *text_end; gamgi_dlist *orbital_start; gamgi_dlist *orbital_end; gamgi_dlist *bond_start; gamgi_dlist *bond_end; gamgi_dlist *atom_start; gamgi_dlist *atom_end; gamgi_dlist *direction_start; gamgi_dlist *direction_end; gamgi_dlist *plane_start; gamgi_dlist *plane_end; gamgi_dlist *group_start; gamgi_dlist *group_end; struct _gamgi_group *next, *before; } gamgi_group; /************ * molecule * ************/ typedef struct _gamgi_molecule { gamgi_object object; void (*draw) (struct _gamgi_molecule *); double origin[3], center[3]; double quaternion[4]; gamgi_dlist *text_start; gamgi_dlist *text_end; gamgi_dlist *orbital_start; gamgi_dlist *orbital_end; gamgi_dlist *bond_start; gamgi_dlist *bond_end; gamgi_dlist *atom_start; gamgi_dlist *atom_end; gamgi_dlist *direction_start; gamgi_dlist *direction_end; gamgi_dlist *plane_start; gamgi_dlist *plane_end; gamgi_dlist *group_start; gamgi_dlist *group_end; struct _gamgi_molecule *next, *before; } gamgi_molecule; /*********** * cluster * ***********/ typedef struct _gamgi_cluster { gamgi_object object; int mark; gamgi_enum reference; double origin[3], center[3]; double quaternion[4]; gamgi_bool faces; double *points; int *loops; float *colors; int *paints; int n_points, n_loops; int n_colors, n_paints; int atoms; gamgi_dlist *text_start; gamgi_dlist *text_end; gamgi_dlist *orbital_start; gamgi_dlist *orbital_end; gamgi_dlist *bond_start; gamgi_dlist *bond_end; gamgi_dlist *atom_start; gamgi_dlist *atom_end; gamgi_dlist *direction_start; gamgi_dlist *direction_end; gamgi_dlist *plane_start; gamgi_dlist *plane_end; gamgi_dlist *group_start; gamgi_dlist *group_end; gamgi_dlist *molecule_start; gamgi_dlist *molecule_end; gamgi_dlist *cluster_start; gamgi_dlist *cluster_end; struct _gamgi_cluster *next, *before; } gamgi_cluster; /******** * cell * ********/ typedef struct _gamgi_cell { gamgi_object object; double a, b, c, ab, ac, bc; double a1[3], a2[3], a3[3]; double p1[3], p2[3], p3[3]; double v1, v2, v3, v12, v13, v23; double reciprocal; gamgi_enum lattice, model, borders; gamgi_bool faces, nodes; int group, n1, n2, n3; double origin[3], center[3]; double quaternion[4]; /************** * origin node * * origin axes * **************/ int o1, o2, o3; gamgi_enum origin_vectors; gamgi_bool axes; gamgi_enum axes_vectors; double *points; int *loops, *lines; int n_points, n_loops, n_lines, n_nodes; float red, green, blue; gamgi_dlist *text_start; gamgi_dlist *text_end; gamgi_dlist *orbital_start; gamgi_dlist *orbital_end; gamgi_dlist *bond_start; gamgi_dlist *bond_end; gamgi_dlist *atom_start; gamgi_dlist *atom_end; gamgi_dlist *direction_start; gamgi_dlist *direction_end; gamgi_dlist *plane_start; gamgi_dlist *plane_end; gamgi_dlist *group_start; gamgi_dlist *group_end; gamgi_dlist *molecule_start; gamgi_dlist *molecule_end; gamgi_dlist *cluster_start; gamgi_dlist *cluster_end; struct _gamgi_cell *next, *before; } gamgi_cell; /********* * arrow * *********/ typedef struct _gamgi_arrow { gamgi_object object; void (*draw) (struct _gamgi_arrow *); gamgi_dlist *text_start; gamgi_dlist *text_end; struct _gamgi_arrow *next, *before; } gamgi_arrow; /********* * shape * *********/ typedef struct _gamgi_shape { gamgi_object object; void (*draw) (struct _gamgi_shape *); gamgi_dlist *text_start; gamgi_dlist *text_end; struct _gamgi_shape *next, *before; } gamgi_shape; /********* * graph * *********/ typedef struct _gamgi_graph { gamgi_object object; void (*draw) (struct _gamgi_graph *); gamgi_dlist *text_start; gamgi_dlist *text_end; struct _gamgi_graph *next, *before; } gamgi_graph; /************ * assembly * ************/ typedef struct _gamgi_assembly { gamgi_object object; void (*draw) (struct _gamgi_assembly *); int mark; double origin[3], center[3]; double quaternion[4]; gamgi_dlist *text_start; gamgi_dlist *text_end; gamgi_dlist *orbital_start; gamgi_dlist *orbital_end; gamgi_dlist *bond_start; gamgi_dlist *bond_end; gamgi_dlist *atom_start; gamgi_dlist *atom_end; gamgi_dlist *direction_start; gamgi_dlist *direction_end; gamgi_dlist *plane_start; gamgi_dlist *plane_end; gamgi_dlist *group_start; gamgi_dlist *group_end; gamgi_dlist *molecule_start; gamgi_dlist *molecule_end; gamgi_dlist *cluster_start; gamgi_dlist *cluster_end; gamgi_dlist *cell_start; gamgi_dlist *cell_end; gamgi_dlist *arrow_start; gamgi_dlist *arrow_end; gamgi_dlist *shape_start; gamgi_dlist *shape_end; gamgi_dlist *graph_start; gamgi_dlist *graph_end; gamgi_dlist *assembly_start; gamgi_dlist *assembly_end; struct _gamgi_assembly *next, *before; } gamgi_assembly; /********* * light * *********/ typedef struct _gamgi_light { gamgi_object object; void (*draw) (struct _gamgi_light *); /****************** * rgb color data * ******************/ float ambient[4]; float diffuse[4]; float specular[4]; /***************** * geometry data * *****************/ float position[4]; float direction[3]; float angle; /******************** * attenuation data * ********************/ float constant; float linear; float quadratic; float radial; struct _gamgi_light *next, *before; } gamgi_light; /********* * layer * *********/ typedef struct _gamgi_layer { gamgi_object object; void (*draw) (struct _gamgi_layer *); /************************* * modelview matrix data * *************************/ double eye[3]; double center[3]; double up[3]; double referential[9]; /************************** * projection matrix data * **************************/ int perspective; double top, near, far; /******************** * visibility data * * * * referential axes * * * * background color * ********************/ gamgi_enum visibility_in; gamgi_enum visibility_out; gamgi_bool axes; float color[4]; /******************** * number of lights * ********************/ int light; /**************** * history data * ****************/ gamgi_dlist *undo; gamgi_dlist *save; /*************** * child links * ***************/ gamgi_dlist *text_start; gamgi_dlist *text_end; gamgi_dlist *orbital_start; gamgi_dlist *orbital_end; gamgi_dlist *bond_start; gamgi_dlist *bond_end; gamgi_dlist *atom_start; gamgi_dlist *atom_end; gamgi_dlist *direction_start; gamgi_dlist *direction_end; gamgi_dlist *plane_start; gamgi_dlist *plane_end; gamgi_dlist *group_start; gamgi_dlist *group_end; gamgi_dlist *molecule_start; gamgi_dlist *molecule_end; gamgi_dlist *cluster_start; gamgi_dlist *cluster_end; gamgi_dlist *cell_start; gamgi_dlist *cell_end; gamgi_dlist *arrow_start; gamgi_dlist *arrow_end; gamgi_dlist *shape_start; gamgi_dlist *shape_end; gamgi_dlist *graph_start; gamgi_dlist *graph_end; gamgi_dlist *assembly_start; gamgi_dlist *assembly_end; gamgi_dlist *light_start; gamgi_dlist *light_end; struct _gamgi_layer *next, *before; } gamgi_layer; /********** * window * **********/ typedef struct _gamgi_window { gamgi_object object; void (*draw) (struct _gamgi_window *); /************* * resources * *************/ GtkWidget *window; GtkWidget *dialog0; GtkWidget *dialog1; GtkWidget *help; gamgi_dlist *history; gamgi_layer *layer; gamgi_object *focus; gamgi_enum action; gamgi_enum mode; gamgi_enum class; gamgi_bool axes; /********************* * window dimensions * *********************/ int origin_x, origin_y; int width, height; /**************** * menu section * ****************/ GtkWidget *top; GtkWidget *medium; GtkWidget *bottom; gamgi_bool top_flag; gamgi_bool medium_flag; gamgi_bool bottom_flag; /******************* * graphic section * *******************/ GtkWidget *area; float begin_x; float begin_y; /**************** * tool section * ****************/ GtkWidget *entry; GtkWidget *ruler; gamgi_enum axis; double total; /****************** * status section * ******************/ GtkWidget *statusbar_focus, *statusbar_layer; GtkWidget *statusbar_message, *statusbar_time; int context_focus, context_layer; int context_message, context_time; int timer_focus; int timer_layer; int timer_message; int timer_progress; GtkWidget *progress_bar; gamgi_bool demo_flag; /*************** * child links * ***************/ gamgi_dlist *layer_start; gamgi_dlist *layer_end; struct _gamgi_window *next, *before; } gamgi_window; /******************************************* * general functions: * * 1) called to show a selected Help topic * * 2) called after an object is selected * *******************************************/ typedef void (* gamgi_function1) (void *data); typedef void (* gamgi_function2) (gamgi_object *object, void *data); /************* macros ************ *********************************/ #define GAMGI_ENGINE_UNDO 5 #define GAMGI_ENGINE_SAVE 5 #define GAMGI_CAST_SLIST (gamgi_slist *) #define GAMGI_CAST_DLIST (gamgi_dlist *) #define GAMGI_CAST_OBJECT (gamgi_object *) #define GAMGI_CAST_TEXT (gamgi_text *) #define GAMGI_CAST_ORBITAL (gamgi_orbital *) #define GAMGI_CAST_BOND (gamgi_bond *) #define GAMGI_CAST_ATOM (gamgi_atom *) #define GAMGI_CAST_DIRECTION (gamgi_direction *) #define GAMGI_CAST_PLANE (gamgi_plane *) #define GAMGI_CAST_GROUP (gamgi_group *) #define GAMGI_CAST_MOLECULE (gamgi_molecule *) #define GAMGI_CAST_CLUSTER (gamgi_cluster *) #define GAMGI_CAST_CELL (gamgi_cell *) #define GAMGI_CAST_ARROW (gamgi_arrow *) #define GAMGI_CAST_SHAPE (gamgi_shape *) #define GAMGI_CAST_GRAPH (gamgi_graph *) #define GAMGI_CAST_ASSEMBLY (gamgi_assembly *) #define GAMGI_CAST_LIGHT (gamgi_light *) #define GAMGI_CAST_LAYER (gamgi_layer *) #define GAMGI_CAST_WINDOW (gamgi_window *) #define GAMGI_CAST_GAMGI (gamgi_gamgi *) #define GAMGI_INT_TO_POINTER(integer) ((void *)((char *) 0 + (integer))) #define GAMGI_POINTER_TO_INT(pointer) ((unsigned int)((char *)(pointer) - (char *) 0)) /********** enumerations ********** **********************************/ /************************************************************** * All external enumerations start at 1 and share FALSE for 0 * **************************************************************/ enum {GAMGI_ENGINE_HELP = 1, GAMGI_ENGINE_TEXT, GAMGI_ENGINE_ORBITAL, GAMGI_ENGINE_BOND, GAMGI_ENGINE_ATOM, GAMGI_ENGINE_DIRECTION, GAMGI_ENGINE_PLANE, GAMGI_ENGINE_GROUP, GAMGI_ENGINE_MOLECULE, GAMGI_ENGINE_CLUSTER, GAMGI_ENGINE_CELL, GAMGI_ENGINE_ARROW, GAMGI_ENGINE_SHAPE, GAMGI_ENGINE_GRAPH, GAMGI_ENGINE_ASSEMBLY, GAMGI_ENGINE_LIGHT, GAMGI_ENGINE_LAYER, GAMGI_ENGINE_WINDOW, GAMGI_ENGINE_GAMGI}; enum {GAMGI_ENGINE_SELECT_ELEMENT = 1, GAMGI_ENGINE_SELECT_LENGTH}; #endif gamgi0.17.1g/src/engine/gamgi_engine_task.h0000644000175000017500000000057411566263510020161 0ustar carloscarlos/******************************************* * * $GAMGI/src/engine/gamgi_engine_task.h * * Copyright (C) 2011 Carlos Pereira * * Distributed under the terms of the GNU * General Public License: $GAMGI/LICENSE * */ #include "gamgi_engine.h" unsigned int gamgi_engine_task_current (void); void gamgi_engine_task_start (void); unsigned int gamgi_engine_task_new (void); gamgi0.17.1g/src/engine/gamgi_engine_unlink.h0000644000175000017500000000250710363030176020507 0ustar carloscarlos/******************************************* * * $GAMGI/src/engine/gamgi_engine_unlink.h * * Copyright (C) 2001, 2004 Carlos Pereira * * Distributed under the terms of the GNU * General Public License: $GAMGI/LICENSE * */ /********************** * external functions * **********************/ void gamgi_engine_unlink_text (gamgi_text *text); void gamgi_engine_unlink_orbital (gamgi_orbital *orbital); void gamgi_engine_unlink_bond (gamgi_bond *bond); void gamgi_engine_unlink_atom (gamgi_atom *atom); void gamgi_engine_unlink_direction (gamgi_direction *direction); void gamgi_engine_unlink_plane (gamgi_plane *plane); void gamgi_engine_unlink_group (gamgi_group *group); void gamgi_engine_unlink_molecule (gamgi_molecule *molecule); void gamgi_engine_unlink_cluster (gamgi_cluster *cluster); void gamgi_engine_unlink_cell (gamgi_cell *cell); void gamgi_engine_unlink_arrow (gamgi_arrow *arrow); void gamgi_engine_unlink_shape (gamgi_shape *shape); void gamgi_engine_unlink_graph (gamgi_graph *graph); void gamgi_engine_unlink_assembly (gamgi_assembly *assembly); void gamgi_engine_unlink_light (gamgi_light *light); void gamgi_engine_unlink_layer (gamgi_layer *layer); void gamgi_engine_unlink_object (gamgi_object *object); /************* * Rationale * ************* ************* * Rationale * *************/ gamgi0.17.1g/src/engine/gamgi_engine_create.h0000644000175000017500000000237610067027714020463 0ustar carloscarlos/******************************************* * * $GAMGI/src/engine/gamgi_engine_create.h * * Copyright (C) 2001, 2004 Carlos Pereira * * Distributed under the terms of the GNU * General Public License: $GAMGI/LICENSE * */ /********************** * external functions * **********************/ gamgi_text *gamgi_engine_create_text (void); gamgi_orbital *gamgi_engine_create_orbital (void); gamgi_bond *gamgi_engine_create_bond (void); gamgi_atom *gamgi_engine_create_atom (void); gamgi_direction *gamgi_engine_create_direction (void); gamgi_plane *gamgi_engine_create_plane (void); gamgi_group *gamgi_engine_create_group (void); gamgi_molecule *gamgi_engine_create_molecule (void); gamgi_cluster *gamgi_engine_create_cluster (void); gamgi_cell *gamgi_engine_create_cell (void); gamgi_arrow *gamgi_engine_create_arrow (void); gamgi_shape *gamgi_engine_create_shape (void); gamgi_graph *gamgi_engine_create_graph (void); gamgi_assembly *gamgi_engine_create_assembly (void); gamgi_light *gamgi_engine_create_light (void); gamgi_layer *gamgi_engine_create_layer (void); gamgi_window *gamgi_engine_create_window (void); void gamgi_engine_create_gamgi (void); /************* * Rationale * ************* ************* * Rationale * *************/ gamgi0.17.1g/src/engine/gamgi_engine_start.c0000644000175000017500000004401612267607304020350 0ustar carloscarlos/******************************************* * * $GAMGI/src/engine/gamgi_engine_start.c * * Copyright (C) 2001, 2004 Carlos Pereira * * Distributed under the terms of the GNU * General Public License: $GAMGI/LICENSE * */ #include "gamgi_engine.h" #include "gamgi_mesa.h" #include "gamgi_chem.h" #include "gamgi_global.h" #include "gamgi_engine_number.h" #include "gamgi_global_start.h" /**** internal function ****** * * * STATIC_START * * * * Initialise GAMGI objects. * * * *****************************/ void gamgi_engine_start_object (gamgi_object *object, int class) { strcpy (object->name, ""); strcpy (object->label, ""); object->class = class; object->scale = GAMGI_MESA_SCALE; object->task = 0; object->selection = NULL; object->dlist = NULL; object->object = NULL; } /**** external function ***** * * * GAMGI_ENGINE_START_TEXT * * * * Initialise text objects. * * * ****************************/ void gamgi_engine_start_text (gamgi_text *text) { /********************* * initialise object * *********************/ gamgi_engine_start_object (GAMGI_CAST_OBJECT text, GAMGI_ENGINE_TEXT); text->object.number = gamgi_engine_number_text_get (); /******************* * initialise text * *******************/ text->draw = NULL; text->mark = 0; text->origin[0] = 0.0; text->origin[1] = 0.0; text->origin[2] = 0.0; text->center[0] = 0.0; text->center[1] = 0.0; text->center[2] = 0.0; text->quaternion[0] = 0.0; text->quaternion[1] = 0.0; text->quaternion[2] = 0.0; text->quaternion[3] = 1.0; text->string = NULL; text->length = 0; text->style = FALSE; text->font = FALSE; } /******* external function ***** * * * GAMGI_ENGINE_START_ORBITAL * * * * Initialise orbital objects. * * * *******************************/ void gamgi_engine_start_orbital (gamgi_orbital *orbital) { int i; /********************* * initialise object * *********************/ gamgi_engine_start_object (GAMGI_CAST_OBJECT orbital, GAMGI_ENGINE_ORBITAL); orbital->object.number = gamgi_engine_number_orbital_get (); /********************** * initialise orbital * **********************/ orbital->draw = NULL; orbital->n = 0; orbital->l = 0; orbital->m = 0; orbital->charge = 0.0; orbital->style = FALSE; orbital->radius = 0.0; orbital->density = 0.0; orbital->sampling = 0; orbital->seed = 0; orbital->phase = FALSE; orbital->frame = FALSE; for (i = 0; i < 8; i++) orbital->octants[i] = 0; orbital->axes = FALSE; orbital->dots[0] = 0; orbital->dots[1] = 0; orbital->dots[2] = 0; orbital->points = NULL; orbital->lines= NULL; orbital->n_points = 0; orbital->n_lines = 0; orbital->origin[0] = 0.0; orbital->origin[1] = 0.0; orbital->origin[2] = 0.0; orbital->center[0] = 0.0; orbital->center[1] = 0.0; orbital->center[2] = 0.0; orbital->quaternion[0] = 0.0; orbital->quaternion[1] = 0.0; orbital->quaternion[2] = 0.0; orbital->quaternion[3] = 1.0; } /**** external function ***** * * * GAMGI_ENGINE_START_BOND * * * * Initialise bond objects. * * * ****************************/ void gamgi_engine_start_bond (gamgi_bond *bond) { /********************* * initialise object * *********************/ gamgi_engine_start_object (GAMGI_CAST_OBJECT bond, GAMGI_ENGINE_BOND); bond->object.number = gamgi_engine_number_bond_get (); /******************* * initialise bond * *******************/ bond->draw = NULL; bond->covalency = -1.0; bond->order = 1.0; bond->size = 1.0; bond->color = FALSE; bond->first = TRUE; bond->copy = NULL; bond->atom1 = NULL; bond->atom2 = NULL; bond->dlist1 = NULL; bond->dlist2 = NULL; } /**** external function ***** * * * GAMGI_ENGINE_START_ATOM * * * * Initialise atom objects. * * * ****************************/ void gamgi_engine_start_atom (gamgi_atom *atom) { /********************* * initialise object * *********************/ gamgi_engine_start_object (GAMGI_CAST_OBJECT atom, GAMGI_ENGINE_ATOM); atom->object.number = gamgi_engine_number_atom_get (); /******************* * initialise atom * *******************/ atom->draw = NULL; atom->mark = 0; atom->size = 1.0; atom->variancy = 0.0; atom->mass = 0.0; atom->radius = 0.0; atom->charge = 0.0; atom->temperature = 0.0; atom->occupancy = 1.0; } /******** external function ****** * * * GAMGI_ENGINE_START_DIRECTION * * * * Initialise direction objects. * * * *********************************/ void gamgi_engine_start_direction (gamgi_direction *direction) { /********************* * initialise object * *********************/ gamgi_engine_start_object (GAMGI_CAST_OBJECT direction, GAMGI_ENGINE_DIRECTION); direction->object.number = gamgi_engine_number_direction_get (); /************************ * initialise direction * ************************/ direction->reference = FALSE; direction->uvw[0] = 0; direction->uvw[1] = 0; direction->uvw[2] = 0; direction->vectors = FALSE; direction->node[0] = 0; direction->node[1] = 0; direction->node[2] = 0; direction->node[3] = 0; direction->origin[0] = 0.0; direction->origin[1] = 0.0; direction->origin[2] = 0.0; direction->center[0] = 0.0; direction->center[1] = 0.0; direction->center[2] = 0.0; direction->quaternion[0] = 0.0; direction->quaternion[1] = 0.0; direction->quaternion[2] = 0.0; direction->quaternion[3] = 1.0; direction->draw = NULL; direction->net = NULL; direction->model = FALSE; direction->points = NULL; direction->loops = NULL; direction->n_points = 0; direction->n_loops = 0; } /***** external function ***** * * * GAMGI_ENGINE_START_PLANE * * * * Initialise plane objects. * * * *****************************/ void gamgi_engine_start_plane (gamgi_plane *plane) { /********************* * initialise object * *********************/ gamgi_engine_start_object (GAMGI_CAST_OBJECT plane, GAMGI_ENGINE_PLANE); plane->object.number = gamgi_engine_number_plane_get (); /******************** * initialise plane * ********************/ plane->reference = FALSE; plane->hkl[0] = 0; plane->hkl[1] = 0; plane->hkl[2] = 0; plane->vectors = FALSE; plane->order = 1; plane->origin[0] = 0.0; plane->origin[1] = 0.0; plane->origin[2] = 0.0; plane->center[0] = 0.0; plane->center[1] = 0.0; plane->center[2] = 0.0; plane->quaternion[0] = 0.0; plane->quaternion[1] = 0.0; plane->quaternion[2] = 0.0; plane->quaternion[3] = 1.0; plane->draw = NULL; plane->net = NULL; plane->model = FALSE; plane->points = NULL; plane->loops = NULL; plane->n_points = 0; plane->n_loops = 0; } /***** external function ***** * * * GAMGI_ENGINE_START_GROUP * * * * Initialise group objects. * * * *****************************/ void gamgi_engine_start_group (gamgi_group *group) { /********************* * initialise object * *********************/ gamgi_engine_start_object (GAMGI_CAST_OBJECT group, GAMGI_ENGINE_GROUP); group->object.number = gamgi_engine_number_group_get (); /******************** * initialise group * ********************/ group->draw = NULL; group->reference = FALSE; group->mark = 0; group->origin[0] = 0.0; group->origin[1] = 0.0; group->origin[2] = 0.0; group->center[0] = 0.0; group->center[1] = 0.0; group->center[2] = 0.0; group->quaternion[0] = 0.0; group->quaternion[1] = 0.0; group->quaternion[2] = 0.0; group->quaternion[3] = 1.0; group->points = NULL; group->loops = NULL; group->n_points = 0; group->n_loops = 0; group->faces = FALSE; } /******* external function ****** * * * GAMGI_ENGINE_START_MOLECULE * * * * Initialise molecule objects. * * * ********************************/ void gamgi_engine_start_molecule (gamgi_molecule *molecule) { /********************* * initialise object * *********************/ gamgi_engine_start_object (GAMGI_CAST_OBJECT molecule, GAMGI_ENGINE_MOLECULE); molecule->object.number = gamgi_engine_number_molecule_get (); /*********************** * initialise molecule * ***********************/ molecule->origin[0] = 0.0; molecule->origin[1] = 0.0; molecule->origin[2] = 0.0; molecule->center[0] = 0.0; molecule->center[1] = 0.0; molecule->center[2] = 0.0; molecule->quaternion[0] = 0.0; molecule->quaternion[1] = 0.0; molecule->quaternion[2] = 0.0; molecule->quaternion[3] = 1.0; molecule->draw = NULL; } /****** external function ****** * * * GAMGI_ENGINE_START_CLUSTER * * * * Initialise cluster objects. * * * *******************************/ void gamgi_engine_start_cluster (gamgi_cluster *cluster) { /********************* * initialise object * *********************/ gamgi_engine_start_object (GAMGI_CAST_OBJECT cluster, GAMGI_ENGINE_CLUSTER); cluster->object.number = gamgi_engine_number_cluster_get (); /********************** * initialise cluster * **********************/ cluster->reference = FALSE; cluster->mark = 0; cluster->origin[0] = 0.0; cluster->origin[1] = 0.0; cluster->origin[2] = 0.0; cluster->center[0] = 0.0; cluster->center[1] = 0.0; cluster->center[2] = 0.0; cluster->quaternion[0] = 0.0; cluster->quaternion[1] = 0.0; cluster->quaternion[2] = 0.0; cluster->quaternion[3] = 1.0; cluster->points = NULL; cluster->loops = NULL; cluster->colors = NULL; cluster->paints = NULL; cluster->n_points = 0; cluster->n_loops = 0; cluster->n_colors = 0; cluster->n_paints = 0; cluster->atoms = 0; cluster->faces = FALSE; } /***** external function **** * * * GAMGI_ENGINE_START_CELL * * * * Initialise cell objects. * * * ****************************/ void gamgi_engine_start_cell (gamgi_cell *cell) { /********************* * initialise object * *********************/ gamgi_engine_start_object (GAMGI_CAST_OBJECT cell, GAMGI_ENGINE_CELL); cell->object.number = gamgi_engine_number_cell_get (); /******************** * initialise cell * ********************/ cell->lattice = FALSE; cell->group = 0; cell->reciprocal = 0.0; cell->a = 0.0; cell->b = 0.0; cell->c = 0.0; cell->ab = 0.0; cell->ac = 0.0; cell->bc = 0.0; cell->origin[0] = 0.0; cell->origin[1] = 0.0; cell->origin[2] = 0.0; cell->center[0] = 0.0; cell->center[1] = 0.0; cell->center[2] = 0.0; cell->quaternion[0] = 0.0; cell->quaternion[1] = 0.0; cell->quaternion[2] = 0.0; cell->quaternion[3] = 1.0; cell->model = FALSE; cell->n1 = 1; cell->n2 = 1; cell->n3 = 1; cell->v1 = 0.0; cell->v2 = 0.0; cell->v3 = 0.0; cell->v12 = 0.0; cell->v13 = 0.0; cell->v23 = 0.0; cell->points = NULL; cell->loops = NULL; cell->lines= NULL; cell->n_points = 0; cell->n_loops = 0; cell->n_lines = 0; cell->n_nodes = 0; cell->o1 = 0; cell->o2 = 0; cell->o3 = 0; cell->origin_vectors = FALSE; cell->axes = FALSE; cell->axes_vectors = FALSE; cell->faces = FALSE; cell->nodes = FALSE; cell->borders = FALSE; } /***** external function ***** * * * GAMGI_ENGINE_START_ARROW * * * * Initialise arrow objects. * * * *****************************/ void gamgi_engine_start_arrow (gamgi_arrow *arrow) { /********************* * initialise object * *********************/ gamgi_engine_start_object (GAMGI_CAST_OBJECT arrow, GAMGI_ENGINE_ARROW); arrow->object.number = gamgi_engine_number_arrow_get (); /******************** * initialise arrow * ********************/ arrow->draw = NULL; } /***** external function ***** * * * GAMGI_ENGINE_START_SHAPE * * * * Initialise shape objects. * * * *****************************/ void gamgi_engine_start_shape (gamgi_shape *shape) { /********************* * initialise object * *********************/ gamgi_engine_start_object (GAMGI_CAST_OBJECT shape, GAMGI_ENGINE_SHAPE); shape->object.number = gamgi_engine_number_shape_get (); /******************** * initialise shape * ********************/ shape->draw = NULL; } /***** external function ***** * * * GAMGI_ENGINE_START_GRAPH * * * * Initialise graph objects. * * * *****************************/ void gamgi_engine_start_graph (gamgi_graph *graph) { /********************* * initialise object * *********************/ gamgi_engine_start_object (GAMGI_CAST_OBJECT graph, GAMGI_ENGINE_GRAPH); graph->object.number = gamgi_engine_number_graph_get (); /******************** * initialise graph * ********************/ graph->draw = NULL; } /******* external function ****** * * * GAMGI_ENGINE_START_ASSEMBLY * * * * Initialise assembly objects. * * * ********************************/ void gamgi_engine_start_assembly (gamgi_assembly *assembly) { /********************* * initialise object * *********************/ gamgi_engine_start_object (GAMGI_CAST_OBJECT assembly, GAMGI_ENGINE_ASSEMBLY); assembly->object.number = gamgi_engine_number_assembly_get (); /*********************** * initialise assembly * ***********************/ assembly->draw = NULL; assembly->mark = 0; assembly->origin[0] = 0.0; assembly->origin[1] = 0.0; assembly->origin[2] = 0.0; assembly->center[0] = 0.0; assembly->center[1] = 0.0; assembly->center[2] = 0.0; assembly->quaternion[0] = 0.0; assembly->quaternion[1] = 0.0; assembly->quaternion[2] = 0.0; assembly->quaternion[3] = 1.0; } /***** external function ***** * * * GAMGI_ENGINE_START_LIGHT * * * * Initialise light objects. * * * *****************************/ void gamgi_engine_start_light (gamgi_light *light) { /********************* * initialise object * *********************/ gamgi_engine_start_object (GAMGI_CAST_OBJECT light, GAMGI_ENGINE_LIGHT); light->object.number = gamgi_engine_number_light_get (); /******************** * initialise light * ********************/ light->ambient[0] = 0.0; light->ambient[1] = 0.0; light->ambient[2] = 0.0; light->ambient[3] = 1.0; light->diffuse[0] = 0.0; light->diffuse[1] = 0.0; light->diffuse[2] = 0.0; light->diffuse[3] = 1.0; light->specular[0] = 0.0; light->specular[1] = 0.0; light->specular[2] = 0.0; light->specular[3] = 1.0; light->direction[0] = GAMGI_MESA_LIGHT_DIRECTION_X; light->direction[1] = GAMGI_MESA_LIGHT_DIRECTION_Y; light->direction[2] = GAMGI_MESA_LIGHT_DIRECTION_Z; light->angle = 180.0; light->constant = GAMGI_MESA_LIGHT_CONSTANT; light->linear = GAMGI_MESA_LIGHT_LINEAR; light->quadratic = GAMGI_MESA_LIGHT_QUADRATIC; light->radial = GAMGI_MESA_LIGHT_RADIAL; light->draw = NULL; } /***** external function ***** * * * GAMGI_ENGINE_START_LAYER * * * * Initialise layer objects. * * * *****************************/ void gamgi_engine_start_layer (gamgi_layer *layer) { /********************* * initialise object * *********************/ gamgi_engine_start_object (GAMGI_CAST_OBJECT layer, GAMGI_ENGINE_LAYER); layer->object.number = gamgi_engine_number_layer_get (); /******************** * initialise layer * ********************/ layer->draw = NULL; layer->undo = NULL; layer->save = NULL; /******** * axis * ********/ layer->axes = FALSE; /******************************* * initialise background color * *******************************/ layer->color[0] = 0.0; layer->color[1] = 0.0; layer->color[2] = 0.0; layer->color[3] = 1.0; } /**** external function ******* * * * GAMGI_ENGINE_START_WINDOW * * * * Initialise window objects. * * * ******************************/ void gamgi_engine_start_window (gamgi_window *window) { /********************* * initialise object * *********************/ gamgi_engine_start_object (GAMGI_CAST_OBJECT window, GAMGI_ENGINE_WINDOW); window->object.number = gamgi_engine_number_window_get (); /********************* * initialise window * *********************/ window->draw = NULL; window->window = NULL; window->dialog0 = NULL; window->dialog1 = NULL; window->help = NULL; window->area = NULL; window->history = NULL; window->layer = NULL; window->focus = NULL; window->action = FALSE; window->mode = FALSE; window->axes = FALSE; window->class = FALSE; window->top_flag = TRUE; window->medium_flag = TRUE; window->bottom_flag = TRUE; window->timer_focus = 0; window->timer_layer = 0; window->timer_message = 0; window->timer_progress = 0; window->axis = FALSE; window->total = 0.0; window->demo_flag = 0; } /**** external function ******* * * * GAMGI_ENGINE_START_GAMGI * * * * Initialise gamgi object. * * * ******************************/ void gamgi_engine_start_gamgi (void) { /*************************************** * Initialise GAMGI configuration data * ***************************************/ gamgi_global_start_gamgi (gamgi->gamgi); gamgi_global_start_window (gamgi->window); gamgi_global_start_layer (gamgi->layer); gamgi_global_start_light (gamgi->light); gamgi_global_start_assembly (gamgi->assembly); gamgi_global_start_graph (gamgi->graph); gamgi_global_start_shape (gamgi->shape); gamgi_global_start_arrow (gamgi->arrow); gamgi_global_start_cell (gamgi->cell); gamgi_global_start_cluster (gamgi->cluster); gamgi_global_start_molecule (gamgi->molecule); gamgi_global_start_group (gamgi->group); gamgi_global_start_plane (gamgi->plane); gamgi_global_start_direction (gamgi->direction); gamgi_global_start_atom (gamgi->atom); gamgi_global_start_bond (gamgi->bond); gamgi_global_start_orbital (gamgi->orbital); gamgi_global_start_text (gamgi->text); gamgi_global_start_help (gamgi->help); } gamgi0.17.1g/src/engine/gamgi_engine_dlist.h0000644000175000017500000003025311517100445020324 0ustar carloscarlos/******************************************* * * $GAMGI/src/engine/gamgi_engine_dlist.h * * Copyright (C) 2001, 2004 Carlos Pereira * * Distributed under the terms of the GNU * General Public License: $GAMGI/LICENSE * */ /********************** * external functions * **********************/ gamgi_dlist *gamgi_engine_dlist_text_text (gamgi_text *text, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_text_orbital (gamgi_orbital *orbital, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_text_bond (gamgi_bond *bond, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_text_atom (gamgi_atom *atom, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_text_direction (gamgi_direction *direction, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_text_plane (gamgi_plane *plane, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_text_group (gamgi_group *group, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_text_molecule (gamgi_molecule *molecule, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_text_cluster (gamgi_cluster *cluster, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_text_cell (gamgi_cell *cell, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_text_arrow (gamgi_arrow *arrow, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_text_shape (gamgi_shape *shape, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_text_graph (gamgi_graph *graph, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_text_assembly (gamgi_assembly *assembly, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_text_layer (gamgi_layer *layer, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_text_window (gamgi_window *window, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_text_gamgi (gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_orbital_orbital (gamgi_orbital *orbital, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_orbital_bond (gamgi_bond *bond, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_orbital_atom (gamgi_atom *atom, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_orbital_direction (gamgi_direction *direction, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_orbital_plane (gamgi_plane *plane, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_orbital_group (gamgi_group *group, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_orbital_molecule (gamgi_molecule *molecule, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_orbital_cluster (gamgi_cluster *cluster, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_orbital_cell (gamgi_cell *cell, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_orbital_assembly (gamgi_assembly *assembly, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_orbital_layer (gamgi_layer *layer, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_orbital_window (gamgi_window *window, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_orbital_gamgi (gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_bond_bond (gamgi_bond *bond, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_bond_atom (gamgi_atom *atom, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_bond_direction (gamgi_direction *direction, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_bond_plane (gamgi_plane *plane, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_bond_group (gamgi_group *group, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_bond_molecule (gamgi_molecule *molecule, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_bond_cluster (gamgi_cluster *cluster, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_bond_cell (gamgi_cell *cell, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_bond_assembly (gamgi_assembly *assembly, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_bond_layer (gamgi_layer *layer, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_bond_window (gamgi_window *window, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_bond_gamgi (gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_atom_atom (gamgi_atom *atom, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_atom_direction (gamgi_direction *direction, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_atom_plane (gamgi_plane *plane, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_atom_group (gamgi_group *group, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_atom_molecule (gamgi_molecule *molecule, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_atom_cluster (gamgi_cluster *cluster, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_atom_cell (gamgi_cell *cell, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_atom_assembly (gamgi_assembly *assembly, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_atom_layer (gamgi_layer *layer, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_atom_window (gamgi_window *window, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_atom_gamgi (gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_bond_gamgi (gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_direction_direction (gamgi_direction *direction, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_direction_plane (gamgi_plane *plane, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_direction_group (gamgi_group *group, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_direction_molecule (gamgi_molecule *molecule, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_direction_cluster (gamgi_cluster *cluster, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_direction_cell (gamgi_cell *cell, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_direction_assembly (gamgi_assembly *assembly, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_direction_layer (gamgi_layer *layer, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_direction_window (gamgi_window *window, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_direction_gamgi (gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_plane_plane (gamgi_plane *plane, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_plane_group (gamgi_group *group, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_plane_molecule (gamgi_molecule *molecule, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_plane_cluster (gamgi_cluster *cluster, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_plane_cell (gamgi_cell *cell, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_plane_assembly (gamgi_assembly *assembly, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_plane_layer (gamgi_layer *layer, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_plane_window (gamgi_window *window, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_plane_gamgi (gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_group_group (gamgi_group *group, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_group_molecule (gamgi_molecule *molecule, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_group_cluster (gamgi_cluster *cluster, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_group_cell (gamgi_cell *cell, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_group_assembly (gamgi_assembly *assembly, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_group_layer (gamgi_layer *layer, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_group_window (gamgi_window *window, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_group_gamgi (gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_molecule_molecule (gamgi_molecule *molecule, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_molecule_cluster (gamgi_cluster *cluster, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_molecule_cell (gamgi_cell *cell, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_molecule_assembly (gamgi_assembly *assembly, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_molecule_layer (gamgi_layer *layer, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_molecule_window (gamgi_window *window, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_molecule_gamgi (gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_cluster_cluster (gamgi_cluster *cluster, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_cluster_cell (gamgi_cell *cell, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_cluster_assembly (gamgi_assembly *assembly, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_cluster_layer (gamgi_layer *layer, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_cluster_window (gamgi_window *window, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_cluster_gamgi (gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_cell_cell (gamgi_cell *cell, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_cell_assembly (gamgi_assembly *assembly, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_cell_layer (gamgi_layer *layer, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_cell_window (gamgi_window *window, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_cell_gamgi (gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_arrow_arrow (gamgi_arrow *arrow, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_arrow_assembly (gamgi_assembly *assembly, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_arrow_layer (gamgi_layer *layer, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_arrow_window (gamgi_window *window, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_arrow_gamgi (gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_shape_shape (gamgi_shape *shape, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_shape_assembly (gamgi_assembly *assembly, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_shape_layer (gamgi_layer *layer, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_shape_window (gamgi_window *window, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_shape_gamgi (gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_graph_graph (gamgi_graph *graph, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_graph_assembly (gamgi_assembly *assembly, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_graph_layer (gamgi_layer *layer, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_graph_window (gamgi_window *window, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_graph_gamgi (gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_assembly_assembly (gamgi_assembly *assembly, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_assembly_layer (gamgi_layer *layer, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_assembly_window (gamgi_window *window, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_assembly_gamgi (gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_light_light (gamgi_light *light, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_light_layer (gamgi_layer *layer, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_light_window (gamgi_window *window, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_light_gamgi (gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_layer_layer (gamgi_layer *layer, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_layer_window (gamgi_window *window, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_layer_gamgi (gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_window_window (gamgi_window *window, gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_window_gamgi (gamgi_dlist *dlist_start); gamgi_dlist *gamgi_engine_dlist_atom_object (gamgi_object *object, gamgi_dlist *dlist_start); /************* * Rationale * ************* ************* * Rationale * *************/ gamgi0.17.1g/src/engine/gamgi_engine_link.c0000644000175000017500000015552510363776130020157 0ustar carloscarlos/******************************************* * * $GAMGI/src/engine/gamgi_engine_link.c * * Copyright (C) 2001, 2004 Carlos Pereira * * Distributed under the terms of the GNU * General Public License: $GAMGI/LICENSE * */ #include "gamgi_engine.h" #include "gamgi_engine_list.h" void gamgi_engine_link_text_text (gamgi_text *child, gamgi_text *parent) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (parent->text_end); parent->text_end = dlist; if (dlist->before == NULL) parent->text_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = child; child->object.dlist = dlist; child->object.object = GAMGI_CAST_OBJECT parent; } void gamgi_engine_link_text_orbital (gamgi_text *text, gamgi_orbital *orbital) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (orbital->text_end); orbital->text_end = dlist; if (dlist->before == NULL) orbital->text_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = text; text->object.dlist = dlist; text->object.object = GAMGI_CAST_OBJECT orbital; } void gamgi_engine_link_text_bond (gamgi_text *text, gamgi_bond *bond) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (bond->text_end); bond->text_end = dlist; if (dlist->before == NULL) bond->text_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = text; text->object.dlist = dlist; text->object.object = GAMGI_CAST_OBJECT bond; } void gamgi_engine_link_text_atom (gamgi_text *text, gamgi_atom *atom) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (atom->text_end); atom->text_end = dlist; if (dlist->before == NULL) atom->text_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = text; text->object.dlist = dlist; text->object.object = GAMGI_CAST_OBJECT atom; } void gamgi_engine_link_text_direction (gamgi_text *text, gamgi_direction *direction) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (direction->text_end); direction->text_end = dlist; if (dlist->before == NULL) direction->text_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = text; text->object.dlist = dlist; text->object.object = GAMGI_CAST_OBJECT direction; } void gamgi_engine_link_text_plane (gamgi_text *text, gamgi_plane *plane) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (plane->text_end); plane->text_end = dlist; if (dlist->before == NULL) plane->text_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = text; text->object.dlist = dlist; text->object.object = GAMGI_CAST_OBJECT plane; } void gamgi_engine_link_text_group (gamgi_text *text, gamgi_group *group) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (group->text_end); group->text_end = dlist; if (dlist->before == NULL) group->text_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = text; text->object.dlist = dlist; text->object.object = GAMGI_CAST_OBJECT group; } void gamgi_engine_link_text_molecule (gamgi_text *text, gamgi_molecule *molecule) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (molecule->text_end); molecule->text_end = dlist; if (dlist->before == NULL) molecule->text_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = text; text->object.dlist = dlist; text->object.object = GAMGI_CAST_OBJECT molecule; } void gamgi_engine_link_text_cluster (gamgi_text *text, gamgi_cluster *cluster) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (cluster->text_end); cluster->text_end = dlist; if (dlist->before == NULL) cluster->text_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = text; text->object.dlist = dlist; text->object.object = GAMGI_CAST_OBJECT cluster; } void gamgi_engine_link_text_cell (gamgi_text *text, gamgi_cell *cell) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (cell->text_end); cell->text_end = dlist; if (dlist->before == NULL) cell->text_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = text; text->object.dlist = dlist; text->object.object = GAMGI_CAST_OBJECT cell; } void gamgi_engine_link_text_arrow (gamgi_text *text, gamgi_arrow *arrow) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (arrow->text_end); arrow->text_end = dlist; if (dlist->before == NULL) arrow->text_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = text; text->object.dlist = dlist; text->object.object = GAMGI_CAST_OBJECT arrow; } void gamgi_engine_link_text_shape (gamgi_text *text, gamgi_shape *shape) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (shape->text_end); shape->text_end = dlist; if (dlist->before == NULL) shape->text_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = text; text->object.dlist = dlist; text->object.object = GAMGI_CAST_OBJECT shape; } void gamgi_engine_link_text_graph (gamgi_text *text, gamgi_graph *graph) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (graph->text_end); graph->text_end = dlist; if (dlist->before == NULL) graph->text_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = text; text->object.dlist = dlist; text->object.object = GAMGI_CAST_OBJECT graph; } void gamgi_engine_link_text_assembly (gamgi_text *text, gamgi_assembly *assembly) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (assembly->text_end); assembly->text_end = dlist; if (dlist->before == NULL) assembly->text_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = text; text->object.dlist = dlist; text->object.object = GAMGI_CAST_OBJECT assembly; } void gamgi_engine_link_text_layer (gamgi_text *text, gamgi_layer *layer) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (layer->text_end); layer->text_end = dlist; if (dlist->before == NULL) layer->text_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = text; text->object.dlist = dlist; text->object.object = GAMGI_CAST_OBJECT layer; } void gamgi_engine_link_orbital_bond (gamgi_orbital *orbital, gamgi_bond *bond) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (bond->orbital_end); bond->orbital_end = dlist; if (dlist->before == NULL) bond->orbital_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = orbital; orbital->object.dlist = dlist; orbital->object.object = GAMGI_CAST_OBJECT bond; } void gamgi_engine_link_orbital_atom (gamgi_orbital *orbital, gamgi_atom *atom) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (atom->orbital_end); atom->orbital_end = dlist; if (dlist->before == NULL) atom->orbital_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = orbital; orbital->object.dlist = dlist; orbital->object.object = GAMGI_CAST_OBJECT atom; } void gamgi_engine_link_orbital_direction (gamgi_orbital *orbital, gamgi_direction *direction) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (direction->orbital_end); direction->orbital_end = dlist; if (dlist->before == NULL) direction->orbital_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = orbital; orbital->object.dlist = dlist; orbital->object.object = GAMGI_CAST_OBJECT direction; } void gamgi_engine_link_orbital_plane (gamgi_orbital *orbital, gamgi_plane *plane) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (plane->orbital_end); plane->orbital_end = dlist; if (dlist->before == NULL) plane->orbital_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = orbital; orbital->object.dlist = dlist; orbital->object.object = GAMGI_CAST_OBJECT plane; } void gamgi_engine_link_orbital_group (gamgi_orbital *orbital, gamgi_group *group) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (group->orbital_end); group->orbital_end = dlist; if (dlist->before == NULL) group->orbital_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = orbital; orbital->object.dlist = dlist; orbital->object.object = GAMGI_CAST_OBJECT group; } void gamgi_engine_link_orbital_molecule (gamgi_orbital *orbital, gamgi_molecule *molecule) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (molecule->orbital_end); molecule->orbital_end = dlist; if (dlist->before == NULL) molecule->orbital_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = orbital; orbital->object.dlist = dlist; orbital->object.object = GAMGI_CAST_OBJECT molecule; } void gamgi_engine_link_orbital_cluster (gamgi_orbital *orbital, gamgi_cluster *cluster) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (cluster->orbital_end); cluster->orbital_end = dlist; if (dlist->before == NULL) cluster->orbital_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = orbital; orbital->object.dlist = dlist; orbital->object.object = GAMGI_CAST_OBJECT cluster; } void gamgi_engine_link_orbital_cell (gamgi_orbital *orbital, gamgi_cell *cell) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (cell->orbital_end); cell->orbital_end = dlist; if (dlist->before == NULL) cell->orbital_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = orbital; orbital->object.dlist = dlist; orbital->object.object = GAMGI_CAST_OBJECT cell; } void gamgi_engine_link_orbital_assembly (gamgi_orbital *orbital, gamgi_assembly *assembly) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (assembly->orbital_end); assembly->orbital_end = dlist; if (dlist->before == NULL) assembly->orbital_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = orbital; orbital->object.dlist = dlist; orbital->object.object = GAMGI_CAST_OBJECT assembly; } void gamgi_engine_link_orbital_layer (gamgi_orbital *orbital, gamgi_layer *layer) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (layer->orbital_end); layer->orbital_end = dlist; if (dlist->before == NULL) layer->orbital_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = orbital; orbital->object.dlist = dlist; orbital->object.object = GAMGI_CAST_OBJECT layer; } void gamgi_engine_link_bond_atom (gamgi_bond *bond, gamgi_atom *atom) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (atom->bond_end); atom->bond_end = dlist; if (dlist->before == NULL) atom->bond_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = bond; if (bond->atom1 == NULL) { bond->atom1 = atom; bond->dlist1 = dlist; } else { bond->atom2 = atom; bond->dlist2 = dlist; } } void gamgi_engine_link_atom_direction (gamgi_atom *atom, gamgi_direction *direction) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (direction->atom_end); direction->atom_end = dlist; if (dlist->before == NULL) direction->atom_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = atom; atom->object.dlist = dlist; atom->object.object = GAMGI_CAST_OBJECT direction; } void gamgi_engine_link_atom_plane (gamgi_atom *atom, gamgi_plane *plane) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (plane->atom_end); plane->atom_end = dlist; if (dlist->before == NULL) plane->atom_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = atom; atom->object.dlist = dlist; atom->object.object = GAMGI_CAST_OBJECT plane; } void gamgi_engine_link_atom_group (gamgi_atom *atom, gamgi_group *group) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (group->atom_end); group->atom_end = dlist; if (dlist->before == NULL) group->atom_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = atom; atom->object.dlist = dlist; atom->object.object = GAMGI_CAST_OBJECT group; } void gamgi_engine_link_atom_molecule (gamgi_atom *atom, gamgi_molecule *molecule) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (molecule->atom_end); molecule->atom_end = dlist; if (dlist->before == NULL) molecule->atom_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = atom; atom->object.dlist = dlist; atom->object.object = GAMGI_CAST_OBJECT molecule; } void gamgi_engine_link_atom_cluster (gamgi_atom *atom, gamgi_cluster *cluster) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (cluster->atom_end); cluster->atom_end = dlist; if (dlist->before == NULL) cluster->atom_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = atom; atom->object.dlist = dlist; atom->object.object = GAMGI_CAST_OBJECT cluster; } void gamgi_engine_link_atom_cell (gamgi_atom *atom, gamgi_cell *cell) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (cell->atom_end); cell->atom_end = dlist; if (dlist->before == NULL) cell->atom_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = atom; atom->object.dlist = dlist; atom->object.object = GAMGI_CAST_OBJECT cell; } void gamgi_engine_link_atom_assembly (gamgi_atom *atom, gamgi_assembly *assembly) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (assembly->atom_end); assembly->atom_end = dlist; if (dlist->before == NULL) assembly->atom_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = atom; atom->object.dlist = dlist; atom->object.object = GAMGI_CAST_OBJECT assembly; } void gamgi_engine_link_atom_layer (gamgi_atom *atom, gamgi_layer *layer) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (layer->atom_end); layer->atom_end = dlist; if (dlist->before == NULL) layer->atom_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = atom; atom->object.dlist = dlist; atom->object.object = GAMGI_CAST_OBJECT layer; } void gamgi_engine_link_direction_plane (gamgi_direction *direction, gamgi_plane *plane) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (plane->direction_end); plane->direction_end = dlist; if (dlist->before == NULL) plane->direction_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = direction; direction->object.dlist = dlist; direction->object.object = GAMGI_CAST_OBJECT plane; } void gamgi_engine_link_direction_group (gamgi_direction *direction, gamgi_group *group) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (group->direction_end); group->direction_end = dlist; if (dlist->before == NULL) group->direction_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = direction; direction->object.dlist = dlist; direction->object.object = GAMGI_CAST_OBJECT group; } void gamgi_engine_link_direction_molecule (gamgi_direction *direction, gamgi_molecule *molecule) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (molecule->direction_end); molecule->direction_end = dlist; if (dlist->before == NULL) molecule->direction_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = direction; direction->object.dlist = dlist; direction->object.object = GAMGI_CAST_OBJECT molecule; } void gamgi_engine_link_direction_cluster (gamgi_direction *direction, gamgi_cluster *cluster) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (cluster->direction_end); cluster->direction_end = dlist; if (dlist->before == NULL) cluster->direction_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = direction; direction->object.dlist = dlist; direction->object.object = GAMGI_CAST_OBJECT cluster; } void gamgi_engine_link_direction_cell (gamgi_direction *direction, gamgi_cell *cell) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (cell->direction_end); cell->direction_end = dlist; if (dlist->before == NULL) cell->direction_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = direction; direction->object.dlist = dlist; direction->object.object = GAMGI_CAST_OBJECT cell; } void gamgi_engine_link_direction_assembly (gamgi_direction *direction, gamgi_assembly *assembly) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (assembly->direction_end); assembly->direction_end = dlist; if (dlist->before == NULL) assembly->direction_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = direction; direction->object.dlist = dlist; direction->object.object = GAMGI_CAST_OBJECT assembly; } void gamgi_engine_link_direction_layer (gamgi_direction *direction, gamgi_layer *layer) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (layer->direction_end); layer->direction_end = dlist; if (dlist->before == NULL) layer->direction_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = direction; direction->object.dlist = dlist; direction->object.object = GAMGI_CAST_OBJECT layer; } void gamgi_engine_link_plane_group (gamgi_plane *plane, gamgi_group *group) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (group->plane_end); group->plane_end = dlist; if (dlist->before == NULL) group->plane_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = plane; plane->object.dlist = dlist; plane->object.object = GAMGI_CAST_OBJECT group; } void gamgi_engine_link_plane_molecule (gamgi_plane *plane, gamgi_molecule *molecule) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (molecule->plane_end); molecule->plane_end = dlist; if (dlist->before == NULL) molecule->plane_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = plane; plane->object.dlist = dlist; plane->object.object = GAMGI_CAST_OBJECT molecule; } void gamgi_engine_link_plane_cluster (gamgi_plane *plane, gamgi_cluster *cluster) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (cluster->plane_end); cluster->plane_end = dlist; if (dlist->before == NULL) cluster->plane_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = plane; plane->object.dlist = dlist; plane->object.object = GAMGI_CAST_OBJECT cluster; } void gamgi_engine_link_plane_cell (gamgi_plane *plane, gamgi_cell *cell) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (cell->plane_end); cell->plane_end = dlist; if (dlist->before == NULL) cell->plane_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = plane; plane->object.dlist = dlist; plane->object.object = GAMGI_CAST_OBJECT cell; } void gamgi_engine_link_plane_assembly (gamgi_plane *plane, gamgi_assembly *assembly) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (assembly->plane_end); assembly->plane_end = dlist; if (dlist->before == NULL) assembly->plane_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = plane; plane->object.dlist = dlist; plane->object.object = GAMGI_CAST_OBJECT assembly; } void gamgi_engine_link_plane_layer (gamgi_plane *plane, gamgi_layer *layer) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (layer->plane_end); layer->plane_end = dlist; if (dlist->before == NULL) layer->plane_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = plane; plane->object.dlist = dlist; plane->object.object = GAMGI_CAST_OBJECT layer; } void gamgi_engine_link_group_group (gamgi_group *child, gamgi_group *parent) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (parent->group_end); parent->group_end = dlist; if (dlist->before == NULL) parent->group_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = child; child->object.dlist = dlist; child->object.object = GAMGI_CAST_OBJECT parent; } void gamgi_engine_link_group_molecule (gamgi_group *group, gamgi_molecule *molecule) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (molecule->group_end); molecule->group_end = dlist; if (dlist->before == NULL) molecule->group_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = group; group->object.dlist = dlist; group->object.object = GAMGI_CAST_OBJECT molecule; } void gamgi_engine_link_group_cluster (gamgi_group *group, gamgi_cluster *cluster) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (cluster->group_end); cluster->group_end = dlist; if (dlist->before == NULL) cluster->group_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = group; group->object.dlist = dlist; group->object.object = GAMGI_CAST_OBJECT cluster; } void gamgi_engine_link_group_cell (gamgi_group *group, gamgi_cell *cell) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (cell->group_end); cell->group_end = dlist; if (dlist->before == NULL) cell->group_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = group; group->object.dlist = dlist; group->object.object = GAMGI_CAST_OBJECT cell; } void gamgi_engine_link_group_assembly (gamgi_group *group, gamgi_assembly *assembly) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (assembly->group_end); assembly->group_end = dlist; if (dlist->before == NULL) assembly->group_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = group; group->object.dlist = dlist; group->object.object = GAMGI_CAST_OBJECT assembly; } void gamgi_engine_link_group_layer (gamgi_group *group, gamgi_layer *layer) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (layer->group_end); layer->group_end = dlist; if (dlist->before == NULL) layer->group_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = group; group->object.dlist = dlist; group->object.object = GAMGI_CAST_OBJECT layer; } void gamgi_engine_link_molecule_cluster (gamgi_molecule *molecule, gamgi_cluster *cluster) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (cluster->molecule_end); cluster->molecule_end = dlist; if (dlist->before == NULL) cluster->molecule_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = molecule; molecule->object.dlist = dlist; molecule->object.object = GAMGI_CAST_OBJECT cluster; } void gamgi_engine_link_molecule_cell (gamgi_molecule *molecule, gamgi_cell *cell) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (cell->molecule_end); cell->molecule_end = dlist; if (dlist->before == NULL) cell->molecule_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = molecule; molecule->object.dlist = dlist; molecule->object.object = GAMGI_CAST_OBJECT cell; } void gamgi_engine_link_molecule_assembly (gamgi_molecule *molecule, gamgi_assembly *assembly) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (assembly->molecule_end); assembly->molecule_end = dlist; if (dlist->before == NULL) assembly->molecule_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = molecule; molecule->object.dlist = dlist; molecule->object.object = GAMGI_CAST_OBJECT assembly; } void gamgi_engine_link_molecule_layer (gamgi_molecule *molecule, gamgi_layer *layer) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (layer->molecule_end); layer->molecule_end = dlist; if (dlist->before == NULL) layer->molecule_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = molecule; molecule->object.dlist = dlist; molecule->object.object = GAMGI_CAST_OBJECT layer; } void gamgi_engine_link_cluster_cluster (gamgi_cluster *child, gamgi_cluster *parent) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (parent->cluster_end); parent->cluster_end = dlist; if (dlist->before == NULL) parent->cluster_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = child; child->object.dlist = dlist; child->object.object = GAMGI_CAST_OBJECT parent; } void gamgi_engine_link_cluster_cell (gamgi_cluster *cluster, gamgi_cell *cell) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (cell->cluster_end); cell->cluster_end = dlist; if (dlist->before == NULL) cell->cluster_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = cluster; cluster->object.dlist = dlist; cluster->object.object = GAMGI_CAST_OBJECT cell; } void gamgi_engine_link_cluster_assembly (gamgi_cluster *cluster, gamgi_assembly *assembly) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (assembly->cluster_end); assembly->cluster_end = dlist; if (dlist->before == NULL) assembly->cluster_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = cluster; cluster->object.dlist = dlist; cluster->object.object = GAMGI_CAST_OBJECT assembly; } void gamgi_engine_link_cluster_layer (gamgi_cluster *cluster, gamgi_layer *layer) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (layer->cluster_end); layer->cluster_end = dlist; if (dlist->before == NULL) layer->cluster_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = cluster; cluster->object.dlist = dlist; cluster->object.object = GAMGI_CAST_OBJECT layer; } void gamgi_engine_link_cell_assembly (gamgi_cell *cell, gamgi_assembly *assembly) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (assembly->cell_end); assembly->cell_end = dlist; if (dlist->before == NULL) assembly->cell_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = cell; cell->object.dlist = dlist; cell->object.object = GAMGI_CAST_OBJECT assembly; } void gamgi_engine_link_cell_layer (gamgi_cell *cell, gamgi_layer *layer) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (layer->cell_end); layer->cell_end = dlist; if (dlist->before == NULL) layer->cell_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = cell; cell->object.dlist = dlist; cell->object.object = GAMGI_CAST_OBJECT layer; } void gamgi_engine_link_arrow_assembly (gamgi_arrow *arrow, gamgi_assembly *assembly) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (assembly->arrow_end); assembly->arrow_end = dlist; if (dlist->before == NULL) assembly->arrow_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = arrow; arrow->object.dlist = dlist; arrow->object.object = GAMGI_CAST_OBJECT assembly; } void gamgi_engine_link_arrow_layer (gamgi_arrow *arrow, gamgi_layer *layer) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (layer->arrow_end); layer->arrow_end = dlist; if (dlist->before == NULL) layer->arrow_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = arrow; arrow->object.dlist = dlist; arrow->object.object = GAMGI_CAST_OBJECT layer; } void gamgi_engine_link_shape_assembly (gamgi_shape *shape, gamgi_assembly *assembly) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (assembly->shape_end); assembly->shape_end = dlist; if (dlist->before == NULL) assembly->shape_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = shape; shape->object.dlist = dlist; shape->object.object = GAMGI_CAST_OBJECT assembly; } void gamgi_engine_link_shape_layer (gamgi_shape *shape, gamgi_layer *layer) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (layer->shape_end); layer->shape_end = dlist; if (dlist->before == NULL) layer->shape_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = shape; shape->object.dlist = dlist; shape->object.object = GAMGI_CAST_OBJECT layer; } void gamgi_engine_link_graph_assembly (gamgi_graph *graph, gamgi_assembly *assembly) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (assembly->graph_end); assembly->graph_end = dlist; if (dlist->before == NULL) assembly->graph_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = graph; graph->object.dlist = dlist; graph->object.object = GAMGI_CAST_OBJECT assembly; } void gamgi_engine_link_graph_layer (gamgi_graph *graph, gamgi_layer *layer) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (layer->graph_end); layer->graph_end = dlist; if (dlist->before == NULL) layer->graph_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = graph; graph->object.dlist = dlist; graph->object.object = GAMGI_CAST_OBJECT layer; } void gamgi_engine_link_assembly_assembly (gamgi_assembly *child, gamgi_assembly *parent) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (parent->assembly_end); parent->assembly_end = dlist; if (dlist->before == NULL) parent->assembly_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = child; child->object.dlist = dlist; child->object.object = GAMGI_CAST_OBJECT parent; } void gamgi_engine_link_assembly_layer (gamgi_assembly *assembly, gamgi_layer *layer) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (layer->assembly_end); layer->assembly_end = dlist; if (dlist->before == NULL) layer->assembly_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = assembly; assembly->object.dlist = dlist; assembly->object.object = GAMGI_CAST_OBJECT layer; } void gamgi_engine_link_light_layer (gamgi_light *light, gamgi_layer *layer) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (layer->light_end); layer->light_end = dlist; if (dlist->before == NULL) layer->light_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = light; light->object.dlist = dlist; light->object.object = GAMGI_CAST_OBJECT layer; } void gamgi_engine_link_layer_window (gamgi_layer *layer, gamgi_window *window) { gamgi_dlist *dlist; /********************************* * add new member to parent list * *********************************/ dlist = gamgi_engine_dlist_add_end (window->layer_end); window->layer_end = dlist; if (dlist->before == NULL) window->layer_start = dlist; /********************************************** * cross information between parent and child * **********************************************/ dlist->data = layer; layer->object.dlist = dlist; layer->object.object = GAMGI_CAST_OBJECT window; } void gamgi_engine_link_object_bond (gamgi_object *object, gamgi_bond *bond) { switch (object->class) { case GAMGI_ENGINE_TEXT: gamgi_engine_link_text_bond (GAMGI_CAST_TEXT object, bond); break; case GAMGI_ENGINE_ORBITAL: gamgi_engine_link_orbital_bond (GAMGI_CAST_ORBITAL object, bond); break; default: break; } } void gamgi_engine_link_object_atom (gamgi_object *object, gamgi_atom *atom) { switch (object->class) { case GAMGI_ENGINE_TEXT: gamgi_engine_link_text_atom (GAMGI_CAST_TEXT object, atom); break; case GAMGI_ENGINE_ORBITAL: gamgi_engine_link_orbital_atom (GAMGI_CAST_ORBITAL object, atom); break; case GAMGI_ENGINE_BOND: gamgi_engine_link_bond_atom (GAMGI_CAST_BOND object, atom); break; default: break; } } void gamgi_engine_link_object_direction (gamgi_object *object, gamgi_direction *direction) { /*********************************** * bonds have no direction parents * ***********************************/ switch (object->class) { case GAMGI_ENGINE_TEXT: gamgi_engine_link_text_direction (GAMGI_CAST_TEXT object, direction); break; case GAMGI_ENGINE_ORBITAL: gamgi_engine_link_orbital_direction (GAMGI_CAST_ORBITAL object, direction); break; case GAMGI_ENGINE_ATOM: gamgi_engine_link_atom_direction (GAMGI_CAST_ATOM object, direction); break; default: break; } } void gamgi_engine_link_object_plane (gamgi_object *object, gamgi_plane *plane) { /******************************* * bonds have no plane parents * *******************************/ switch (object->class) { case GAMGI_ENGINE_TEXT: gamgi_engine_link_text_plane (GAMGI_CAST_TEXT object, plane); break; case GAMGI_ENGINE_ORBITAL: gamgi_engine_link_orbital_plane (GAMGI_CAST_ORBITAL object, plane); break; case GAMGI_ENGINE_ATOM: gamgi_engine_link_atom_plane (GAMGI_CAST_ATOM object, plane); break; case GAMGI_ENGINE_DIRECTION: gamgi_engine_link_direction_plane (GAMGI_CAST_DIRECTION object, plane); break; default: break; } } void gamgi_engine_link_object_group (gamgi_object *object, gamgi_group *group) { /******************************* * bonds have no group parents * *******************************/ switch (object->class) { case GAMGI_ENGINE_TEXT: gamgi_engine_link_text_group (GAMGI_CAST_TEXT object, group); break; case GAMGI_ENGINE_ORBITAL: gamgi_engine_link_orbital_group (GAMGI_CAST_ORBITAL object, group); break; case GAMGI_ENGINE_ATOM: gamgi_engine_link_atom_group (GAMGI_CAST_ATOM object, group); break; case GAMGI_ENGINE_DIRECTION: gamgi_engine_link_direction_group (GAMGI_CAST_DIRECTION object, group); break; case GAMGI_ENGINE_PLANE: gamgi_engine_link_plane_group (GAMGI_CAST_PLANE object, group); break; case GAMGI_ENGINE_GROUP: gamgi_engine_link_group_group (GAMGI_CAST_GROUP object, group); break; default: break; } } void gamgi_engine_link_object_molecule (gamgi_object *object, gamgi_molecule *molecule) { /********************************** * bonds have no molecule parents * **********************************/ switch (object->class) { case GAMGI_ENGINE_TEXT: gamgi_engine_link_text_molecule (GAMGI_CAST_TEXT object, molecule); break; case GAMGI_ENGINE_ORBITAL: gamgi_engine_link_orbital_molecule (GAMGI_CAST_ORBITAL object, molecule); break; case GAMGI_ENGINE_ATOM: gamgi_engine_link_atom_molecule (GAMGI_CAST_ATOM object, molecule); break; case GAMGI_ENGINE_DIRECTION: gamgi_engine_link_direction_molecule (GAMGI_CAST_DIRECTION object, molecule); break; case GAMGI_ENGINE_PLANE: gamgi_engine_link_plane_molecule (GAMGI_CAST_PLANE object, molecule); break; case GAMGI_ENGINE_GROUP: gamgi_engine_link_group_molecule (GAMGI_CAST_GROUP object, molecule); break; default: break; } } void gamgi_engine_link_object_cluster (gamgi_object *object, gamgi_cluster *cluster) { /********************************* * bonds have no cluster parents * *********************************/ switch (object->class) { case GAMGI_ENGINE_TEXT: gamgi_engine_link_text_cluster (GAMGI_CAST_TEXT object, cluster); break; case GAMGI_ENGINE_ORBITAL: gamgi_engine_link_orbital_cluster (GAMGI_CAST_ORBITAL object, cluster); break; case GAMGI_ENGINE_ATOM: gamgi_engine_link_atom_cluster (GAMGI_CAST_ATOM object, cluster); break; case GAMGI_ENGINE_DIRECTION: gamgi_engine_link_direction_cluster (GAMGI_CAST_DIRECTION object, cluster); break; case GAMGI_ENGINE_PLANE: gamgi_engine_link_plane_cluster (GAMGI_CAST_PLANE object, cluster); break; case GAMGI_ENGINE_GROUP: gamgi_engine_link_group_cluster (GAMGI_CAST_GROUP object, cluster); break; case GAMGI_ENGINE_MOLECULE: gamgi_engine_link_molecule_cluster (GAMGI_CAST_MOLECULE object, cluster); break; case GAMGI_ENGINE_CLUSTER: gamgi_engine_link_cluster_cluster (GAMGI_CAST_CLUSTER object, cluster); break; default: break; } } void gamgi_engine_link_object_cell (gamgi_object *object, gamgi_cell *cell) { /****************************** * bonds have no cell parents * ******************************/ switch (object->class) { case GAMGI_ENGINE_TEXT: gamgi_engine_link_text_cell (GAMGI_CAST_TEXT object, cell); break; case GAMGI_ENGINE_ORBITAL: gamgi_engine_link_orbital_cell (GAMGI_CAST_ORBITAL object, cell); break; case GAMGI_ENGINE_ATOM: gamgi_engine_link_atom_cell (GAMGI_CAST_ATOM object, cell); break; case GAMGI_ENGINE_DIRECTION: gamgi_engine_link_direction_cell (GAMGI_CAST_DIRECTION object, cell); break; case GAMGI_ENGINE_PLANE: gamgi_engine_link_plane_cell (GAMGI_CAST_PLANE object, cell); break; case GAMGI_ENGINE_GROUP: gamgi_engine_link_group_cell (GAMGI_CAST_GROUP object, cell); break; case GAMGI_ENGINE_MOLECULE: gamgi_engine_link_molecule_cell (GAMGI_CAST_MOLECULE object, cell); break; case GAMGI_ENGINE_CLUSTER: gamgi_engine_link_cluster_cell (GAMGI_CAST_CLUSTER object, cell); break; default: break; } } void gamgi_engine_link_object_assembly (gamgi_object *object, gamgi_assembly *assembly) { /********************************** * bonds have no assembly parents * **********************************/ switch (object->class) { case GAMGI_ENGINE_TEXT: gamgi_engine_link_text_assembly (GAMGI_CAST_TEXT object, assembly); break; case GAMGI_ENGINE_ORBITAL: gamgi_engine_link_orbital_assembly (GAMGI_CAST_ORBITAL object, assembly); break; case GAMGI_ENGINE_ATOM: gamgi_engine_link_atom_assembly (GAMGI_CAST_ATOM object, assembly); break; case GAMGI_ENGINE_DIRECTION: gamgi_engine_link_direction_assembly (GAMGI_CAST_DIRECTION object, assembly); break; case GAMGI_ENGINE_PLANE: gamgi_engine_link_plane_assembly (GAMGI_CAST_PLANE object, assembly); break; case GAMGI_ENGINE_GROUP: gamgi_engine_link_group_assembly (GAMGI_CAST_GROUP object, assembly); break; case GAMGI_ENGINE_MOLECULE: gamgi_engine_link_molecule_assembly (GAMGI_CAST_MOLECULE object, assembly); break; case GAMGI_ENGINE_CLUSTER: gamgi_engine_link_cluster_assembly (GAMGI_CAST_CLUSTER object, assembly); break; case GAMGI_ENGINE_CELL: gamgi_engine_link_cell_assembly (GAMGI_CAST_CELL object, assembly); break; case GAMGI_ENGINE_ARROW: gamgi_engine_link_arrow_assembly (GAMGI_CAST_ARROW object, assembly); break; case GAMGI_ENGINE_SHAPE: gamgi_engine_link_shape_assembly (GAMGI_CAST_SHAPE object, assembly); break; case GAMGI_ENGINE_GRAPH: gamgi_engine_link_graph_assembly (GAMGI_CAST_GRAPH object, assembly); break; case GAMGI_ENGINE_ASSEMBLY: gamgi_engine_link_assembly_assembly (GAMGI_CAST_ASSEMBLY object, assembly); break; default: break; } } void gamgi_engine_link_object_layer (gamgi_object *object, gamgi_layer *layer) { /******************************* * bonds have no layer parents * *******************************/ switch (object->class) { case GAMGI_ENGINE_TEXT: gamgi_engine_link_text_layer (GAMGI_CAST_TEXT object, layer); break; case GAMGI_ENGINE_ORBITAL: gamgi_engine_link_orbital_layer (GAMGI_CAST_ORBITAL object, layer); break; case GAMGI_ENGINE_ATOM: gamgi_engine_link_atom_layer (GAMGI_CAST_ATOM object, layer); break; case GAMGI_ENGINE_DIRECTION: gamgi_engine_link_direction_layer (GAMGI_CAST_DIRECTION object, layer); break; case GAMGI_ENGINE_PLANE: gamgi_engine_link_plane_layer (GAMGI_CAST_PLANE object, layer); break; case GAMGI_ENGINE_GROUP: gamgi_engine_link_group_layer (GAMGI_CAST_GROUP object, layer); break; case GAMGI_ENGINE_MOLECULE: gamgi_engine_link_molecule_layer (GAMGI_CAST_MOLECULE object, layer); break; case GAMGI_ENGINE_CLUSTER: gamgi_engine_link_cluster_layer (GAMGI_CAST_CLUSTER object, layer); break; case GAMGI_ENGINE_CELL: gamgi_engine_link_cell_layer (GAMGI_CAST_CELL object, layer); break; case GAMGI_ENGINE_ARROW: gamgi_engine_link_arrow_layer (GAMGI_CAST_ARROW object, layer); break; case GAMGI_ENGINE_SHAPE: gamgi_engine_link_shape_layer (GAMGI_CAST_SHAPE object, layer); break; case GAMGI_ENGINE_GRAPH: gamgi_engine_link_graph_layer (GAMGI_CAST_GRAPH object, layer); break; case GAMGI_ENGINE_ASSEMBLY: gamgi_engine_link_assembly_layer (GAMGI_CAST_ASSEMBLY object, layer); break; case GAMGI_ENGINE_LIGHT: gamgi_engine_link_light_layer (GAMGI_CAST_LIGHT object, layer); break; default: break; } } void gamgi_engine_link_object_object (gamgi_object *child, gamgi_object *parent) { /********************************************************** * only text objects can have text parents * * only text objects can have orbital parents * * only text objects can have arrow, shape, graph parents * * no objects can have light parents * **********************************************************/ switch (parent->class) { case GAMGI_ENGINE_TEXT: gamgi_engine_link_text_text (GAMGI_CAST_TEXT child, GAMGI_CAST_TEXT parent); break; case GAMGI_ENGINE_ORBITAL: gamgi_engine_link_text_orbital (GAMGI_CAST_TEXT child, GAMGI_CAST_ORBITAL parent); break; case GAMGI_ENGINE_BOND: gamgi_engine_link_object_bond (child, GAMGI_CAST_BOND parent); break; case GAMGI_ENGINE_ATOM: gamgi_engine_link_object_atom (child, GAMGI_CAST_ATOM parent); break; case GAMGI_ENGINE_DIRECTION: gamgi_engine_link_object_direction (child, GAMGI_CAST_DIRECTION parent); break; case GAMGI_ENGINE_PLANE: gamgi_engine_link_object_plane (child, GAMGI_CAST_PLANE parent); break; case GAMGI_ENGINE_GROUP: gamgi_engine_link_object_group (child, GAMGI_CAST_GROUP parent); break; case GAMGI_ENGINE_MOLECULE: gamgi_engine_link_object_molecule (child, GAMGI_CAST_MOLECULE parent); break; case GAMGI_ENGINE_CLUSTER: gamgi_engine_link_object_cluster (child, GAMGI_CAST_CLUSTER parent); break; case GAMGI_ENGINE_CELL: gamgi_engine_link_object_cell (child, GAMGI_CAST_CELL parent); break; case GAMGI_ENGINE_ARROW: gamgi_engine_link_text_arrow (GAMGI_CAST_TEXT child, GAMGI_CAST_ARROW parent); break; case GAMGI_ENGINE_SHAPE: gamgi_engine_link_text_shape (GAMGI_CAST_TEXT child, GAMGI_CAST_SHAPE parent); break; case GAMGI_ENGINE_GRAPH: gamgi_engine_link_text_graph (GAMGI_CAST_TEXT child, GAMGI_CAST_GRAPH parent); break; case GAMGI_ENGINE_ASSEMBLY: gamgi_engine_link_object_assembly (child, GAMGI_CAST_ASSEMBLY parent); break; case GAMGI_ENGINE_LAYER: gamgi_engine_link_object_layer (child, GAMGI_CAST_LAYER parent); break; case GAMGI_ENGINE_WINDOW: gamgi_engine_link_layer_window (GAMGI_CAST_LAYER child, GAMGI_CAST_WINDOW parent); break; default: break; } } gamgi0.17.1g/src/engine/gamgi_engine_copy.c0000644000175000017500000006405111645404545020167 0ustar carloscarlos/******************************************* * * $GAMGI/src/engine/gamgi_engine_copy.c * * Copyright (C) 2001, 2004 Carlos Pereira * * Distributed under the terms of the GNU * General Public License: $GAMGI/LICENSE * */ #include "gamgi_engine.h" #include "gamgi_engine_create.h" #include "gamgi_engine_copy_out.h" #include "gamgi_engine_link.h" #include "gamgi_engine_number.h" static void static_start (gamgi_object *object) { object->task = 0; object->selection = NULL; object->object = NULL; object->dlist = NULL; } gamgi_text *gamgi_engine_copy_text (gamgi_text *text) { gamgi_dlist *dlist; gamgi_text *text_new, *text_child; text_new = gamgi_engine_create_text (); static_start (GAMGI_CAST_OBJECT text_new); gamgi_engine_copy_out_text (text, text_new); text_new->object.number = gamgi_engine_number_text_get (); dlist = text->text_start; while (dlist != NULL) { text_child = gamgi_engine_copy_text (GAMGI_CAST_TEXT dlist->data); gamgi_engine_link_text_text (text_child, text_new); dlist = dlist->next; } return text_new; } gamgi_orbital *gamgi_engine_copy_orbital (gamgi_orbital *orbital) { gamgi_dlist *dlist; gamgi_text *text_new; gamgi_orbital *orbital_new; orbital_new = gamgi_engine_create_orbital (); static_start (GAMGI_CAST_OBJECT orbital_new); gamgi_engine_copy_out_orbital (orbital, orbital_new); orbital_new->object.number = gamgi_engine_number_orbital_get (); dlist = orbital->text_start; while (dlist != NULL) { text_new = gamgi_engine_copy_text (GAMGI_CAST_TEXT dlist->data); gamgi_engine_link_text_orbital (text_new, orbital_new); dlist = dlist->next; } return orbital_new; } gamgi_bond *gamgi_engine_copy_bond (gamgi_bond *bond) { gamgi_dlist *dlist; gamgi_text *text_new; gamgi_orbital *orbital_new; gamgi_bond *bond_new; bond_new = gamgi_engine_create_bond (); static_start (GAMGI_CAST_OBJECT bond_new); gamgi_engine_copy_out_bond (bond, bond_new); bond_new->object.number = gamgi_engine_number_bond_get (); dlist = bond->orbital_start; while (dlist != NULL) { orbital_new = gamgi_engine_copy_orbital (GAMGI_CAST_ORBITAL dlist->data); gamgi_engine_link_orbital_bond (orbital_new, bond_new); dlist = dlist->next; } dlist = bond->text_start; while (dlist != NULL) { text_new = gamgi_engine_copy_text (GAMGI_CAST_TEXT dlist->data); gamgi_engine_link_text_bond (text_new, bond_new); dlist = dlist->next; } return bond_new; } gamgi_atom *gamgi_engine_copy_atom (gamgi_atom *atom) { gamgi_dlist *dlist; gamgi_text *text_new; gamgi_orbital *orbital_new; gamgi_bond *bond, *bond_new; gamgi_atom *atom_new; atom_new = gamgi_engine_create_atom (); static_start (GAMGI_CAST_OBJECT atom_new); gamgi_engine_copy_out_atom (atom, atom_new); atom_new->object.number = gamgi_engine_number_atom_get (); dlist = atom->bond_start; while (dlist != NULL) { bond = GAMGI_CAST_BOND dlist->data; dlist = dlist->next; /************************************** * in case second link does not exist * * this case should never occur! * **************************************/ if (bond->atom2 == NULL) continue; if (bond->copy == NULL) bond->copy = atom_new; else { bond_new = gamgi_engine_copy_bond (bond); gamgi_engine_link_bond_atom (bond_new, bond->copy); gamgi_engine_link_bond_atom (bond_new, atom_new); bond->copy = NULL; } } dlist = atom->orbital_start; while (dlist != NULL) { orbital_new = gamgi_engine_copy_orbital (GAMGI_CAST_ORBITAL dlist->data); gamgi_engine_link_orbital_atom (orbital_new, atom_new); dlist = dlist->next; } dlist = atom->text_start; while (dlist != NULL) { text_new = gamgi_engine_copy_text (GAMGI_CAST_TEXT dlist->data); gamgi_engine_link_text_atom (text_new, atom_new); dlist = dlist->next; } return atom_new; } gamgi_direction *gamgi_engine_copy_direction (gamgi_direction *direction) { gamgi_dlist *dlist; gamgi_text *text_new; gamgi_orbital *orbital_new; gamgi_atom *atom_new; gamgi_direction *direction_new; direction_new = gamgi_engine_create_direction (); static_start (GAMGI_CAST_OBJECT direction_new); gamgi_engine_copy_out_direction (direction, direction_new); direction_new->object.number = gamgi_engine_number_direction_get (); dlist = direction->atom_start; while (dlist != NULL) { atom_new = gamgi_engine_copy_atom (GAMGI_CAST_ATOM dlist->data); gamgi_engine_link_atom_direction (atom_new, direction_new); dlist = dlist->next; } dlist = direction->orbital_start; while (dlist != NULL) { orbital_new = gamgi_engine_copy_orbital (GAMGI_CAST_ORBITAL dlist->data); gamgi_engine_link_orbital_direction (orbital_new, direction_new); dlist = dlist->next; } dlist = direction->text_start; while (dlist != NULL) { text_new = gamgi_engine_copy_text (GAMGI_CAST_TEXT dlist->data); gamgi_engine_link_text_direction (text_new, direction_new); dlist = dlist->next; } return direction_new; } gamgi_plane *gamgi_engine_copy_plane (gamgi_plane *plane) { gamgi_dlist *dlist; gamgi_text *text_new; gamgi_orbital *orbital_new; gamgi_atom *atom_new; gamgi_direction *direction_new; gamgi_plane *plane_new; plane_new = gamgi_engine_create_plane (); static_start (GAMGI_CAST_OBJECT plane_new); gamgi_engine_copy_out_plane (plane, plane_new); plane_new->object.number = gamgi_engine_number_plane_get (); dlist = plane->direction_start; while (dlist != NULL) { direction_new = gamgi_engine_copy_direction (GAMGI_CAST_DIRECTION dlist->data); gamgi_engine_link_direction_plane (direction_new, plane_new); dlist = dlist->next; } dlist = plane->atom_start; while (dlist != NULL) { atom_new = gamgi_engine_copy_atom (GAMGI_CAST_ATOM dlist->data); gamgi_engine_link_atom_plane (atom_new, plane_new); dlist = dlist->next; } dlist = plane->orbital_start; while (dlist != NULL) { orbital_new = gamgi_engine_copy_orbital (GAMGI_CAST_ORBITAL dlist->data); gamgi_engine_link_orbital_plane (orbital_new, plane_new); dlist = dlist->next; } dlist = plane->text_start; while (dlist != NULL) { text_new = gamgi_engine_copy_text (GAMGI_CAST_TEXT dlist->data); gamgi_engine_link_text_plane (text_new, plane_new); dlist = dlist->next; } return plane_new; } gamgi_group *gamgi_engine_copy_group (gamgi_group *group) { gamgi_dlist *dlist; gamgi_text *text_new; gamgi_orbital *orbital_new; gamgi_atom *atom_new; gamgi_direction *direction_new; gamgi_plane *plane_new; gamgi_group *group_new, *group_child; group_new = gamgi_engine_create_group (); static_start (GAMGI_CAST_OBJECT group_new); gamgi_engine_copy_out_group (group, group_new); group_new->object.number = gamgi_engine_number_group_get (); dlist = group->group_start; while (dlist != NULL) { group_child = gamgi_engine_copy_group (GAMGI_CAST_GROUP dlist->data); gamgi_engine_link_group_group (group_child, group_new); dlist = dlist->next; } dlist = group->plane_start; while (dlist != NULL) { plane_new = gamgi_engine_copy_plane (GAMGI_CAST_PLANE dlist->data); gamgi_engine_link_plane_group (plane_new, group_new); dlist = dlist->next; } dlist = group->direction_start; while (dlist != NULL) { direction_new = gamgi_engine_copy_direction (GAMGI_CAST_DIRECTION dlist->data); gamgi_engine_link_direction_group (direction_new, group_new); dlist = dlist->next; } dlist = group->atom_start; while (dlist != NULL) { atom_new = gamgi_engine_copy_atom (GAMGI_CAST_ATOM dlist->data); gamgi_engine_link_atom_group (atom_new, group_new); dlist = dlist->next; } dlist = group->orbital_start; while (dlist != NULL) { orbital_new = gamgi_engine_copy_orbital (GAMGI_CAST_ORBITAL dlist->data); gamgi_engine_link_orbital_group (orbital_new, group_new); dlist = dlist->next; } dlist = group->text_start; while (dlist != NULL) { text_new = gamgi_engine_copy_text (GAMGI_CAST_TEXT dlist->data); gamgi_engine_link_text_group (text_new, group_new); dlist = dlist->next; } return group_new; } gamgi_molecule *gamgi_engine_copy_molecule (gamgi_molecule *molecule) { gamgi_dlist *dlist; gamgi_text *text_new; gamgi_orbital *orbital_new; gamgi_atom *atom_new; gamgi_direction *direction_new; gamgi_plane *plane_new; gamgi_group *group_new; gamgi_molecule *molecule_new; molecule_new = gamgi_engine_create_molecule (); static_start (GAMGI_CAST_OBJECT molecule_new); gamgi_engine_copy_out_molecule (molecule, molecule_new); molecule_new->object.number = gamgi_engine_number_molecule_get (); dlist = molecule->group_start; while (dlist != NULL) { group_new = gamgi_engine_copy_group (GAMGI_CAST_GROUP dlist->data); gamgi_engine_link_group_molecule (group_new, molecule_new); dlist = dlist->next; } dlist = molecule->plane_start; while (dlist != NULL) { plane_new = gamgi_engine_copy_plane (GAMGI_CAST_PLANE dlist->data); gamgi_engine_link_plane_molecule (plane_new, molecule_new); dlist = dlist->next; } dlist = molecule->direction_start; while (dlist != NULL) { direction_new = gamgi_engine_copy_direction (GAMGI_CAST_DIRECTION dlist->data); gamgi_engine_link_direction_molecule (direction_new, molecule_new); dlist = dlist->next; } dlist = molecule->atom_start; while (dlist != NULL) { atom_new = gamgi_engine_copy_atom (GAMGI_CAST_ATOM dlist->data); gamgi_engine_link_atom_molecule (atom_new, molecule_new); dlist = dlist->next; } dlist = molecule->orbital_start; while (dlist != NULL) { orbital_new = gamgi_engine_copy_orbital (GAMGI_CAST_ORBITAL dlist->data); gamgi_engine_link_orbital_molecule (orbital_new, molecule_new); dlist = dlist->next; } dlist = molecule->text_start; while (dlist != NULL) { text_new = gamgi_engine_copy_text (GAMGI_CAST_TEXT dlist->data); gamgi_engine_link_text_molecule (text_new, molecule_new); dlist = dlist->next; } return molecule_new; } gamgi_cluster *gamgi_engine_copy_cluster (gamgi_cluster *cluster) { gamgi_dlist *dlist; gamgi_text *text_new; gamgi_orbital *orbital_new; gamgi_atom *atom_new; gamgi_direction *direction_new; gamgi_plane *plane_new; gamgi_group *group_new; gamgi_molecule *molecule_new; gamgi_cluster *cluster_new, *cluster_child; cluster_new = gamgi_engine_create_cluster (); static_start (GAMGI_CAST_OBJECT cluster_new); gamgi_engine_copy_out_cluster (cluster, cluster_new); cluster_new->object.number = gamgi_engine_number_cluster_get (); dlist = cluster->cluster_start; while (dlist != NULL) { cluster_child = gamgi_engine_copy_cluster (GAMGI_CAST_CLUSTER dlist->data); gamgi_engine_link_cluster_cluster (cluster_child, cluster_new); dlist = dlist->next; } dlist = cluster->molecule_start; while (dlist != NULL) { molecule_new = gamgi_engine_copy_molecule (GAMGI_CAST_MOLECULE dlist->data); gamgi_engine_link_molecule_cluster (molecule_new, cluster_new); dlist = dlist->next; } dlist = cluster->group_start; while (dlist != NULL) { group_new = gamgi_engine_copy_group (GAMGI_CAST_GROUP dlist->data); gamgi_engine_link_group_cluster (group_new, cluster_new); dlist = dlist->next; } dlist = cluster->plane_start; while (dlist != NULL) { plane_new = gamgi_engine_copy_plane (GAMGI_CAST_PLANE dlist->data); gamgi_engine_link_plane_cluster (plane_new, cluster_new); dlist = dlist->next; } dlist = cluster->direction_start; while (dlist != NULL) { direction_new = gamgi_engine_copy_direction (GAMGI_CAST_DIRECTION dlist->data); gamgi_engine_link_direction_cluster (direction_new, cluster_new); dlist = dlist->next; } dlist = cluster->atom_start; while (dlist != NULL) { atom_new = gamgi_engine_copy_atom (GAMGI_CAST_ATOM dlist->data); gamgi_engine_link_atom_cluster (atom_new, cluster_new); dlist = dlist->next; } dlist = cluster->orbital_start; while (dlist != NULL) { orbital_new = gamgi_engine_copy_orbital (GAMGI_CAST_ORBITAL dlist->data); gamgi_engine_link_orbital_cluster (orbital_new, cluster_new); dlist = dlist->next; } dlist = cluster->text_start; while (dlist != NULL) { text_new = gamgi_engine_copy_text (GAMGI_CAST_TEXT dlist->data); gamgi_engine_link_text_cluster (text_new, cluster_new); dlist = dlist->next; } return cluster_new; } gamgi_cell *gamgi_engine_copy_cell (gamgi_cell *cell) { gamgi_dlist *dlist; gamgi_text *text_new; gamgi_orbital *orbital_new; gamgi_atom *atom_new; gamgi_direction *direction_new; gamgi_plane *plane_new; gamgi_group *group_new; gamgi_molecule *molecule_new; gamgi_cluster *cluster_new; gamgi_cell *cell_new; cell_new = gamgi_engine_create_cell (); static_start (GAMGI_CAST_OBJECT cell_new); gamgi_engine_copy_out_cell (cell, cell_new); cell_new->object.number = gamgi_engine_number_cell_get (); dlist = cell->cluster_start; while (dlist != NULL) { cluster_new = gamgi_engine_copy_cluster (GAMGI_CAST_CLUSTER dlist->data); gamgi_engine_link_cluster_cell (cluster_new, cell_new); dlist = dlist->next; } dlist = cell->molecule_start; while (dlist != NULL) { molecule_new = gamgi_engine_copy_molecule (GAMGI_CAST_MOLECULE dlist->data); gamgi_engine_link_molecule_cell (molecule_new, cell_new); dlist = dlist->next; } dlist = cell->group_start; while (dlist != NULL) { group_new = gamgi_engine_copy_group (GAMGI_CAST_GROUP dlist->data); gamgi_engine_link_group_cell (group_new, cell_new); dlist = dlist->next; } dlist = cell->plane_start; while (dlist != NULL) { plane_new = gamgi_engine_copy_plane (GAMGI_CAST_PLANE dlist->data); gamgi_engine_link_plane_cell (plane_new, cell_new); dlist = dlist->next; } dlist = cell->direction_start; while (dlist != NULL) { direction_new = gamgi_engine_copy_direction (GAMGI_CAST_DIRECTION dlist->data); gamgi_engine_link_direction_cell (direction_new, cell_new); dlist = dlist->next; } dlist = cell->atom_start; while (dlist != NULL) { atom_new = gamgi_engine_copy_atom (GAMGI_CAST_ATOM dlist->data); gamgi_engine_link_atom_cell (atom_new, cell_new); dlist = dlist->next; } dlist = cell->orbital_start; while (dlist != NULL) { orbital_new = gamgi_engine_copy_orbital (GAMGI_CAST_ORBITAL dlist->data); gamgi_engine_link_orbital_cell (orbital_new, cell_new); dlist = dlist->next; } dlist = cell->text_start; while (dlist != NULL) { text_new = gamgi_engine_copy_text (GAMGI_CAST_TEXT dlist->data); gamgi_engine_link_text_cell (text_new, cell_new); dlist = dlist->next; } return cell_new; } gamgi_arrow *gamgi_engine_copy_arrow (gamgi_arrow *arrow) { gamgi_dlist *dlist; gamgi_text *text_new; gamgi_arrow *arrow_new; arrow_new = gamgi_engine_create_arrow (); static_start (GAMGI_CAST_OBJECT arrow_new); gamgi_engine_copy_out_arrow (arrow, arrow_new); arrow_new->object.number = gamgi_engine_number_arrow_get (); dlist = arrow->text_start; while (dlist != NULL) { text_new = gamgi_engine_copy_text (GAMGI_CAST_TEXT dlist->data); gamgi_engine_link_text_arrow (text_new, arrow_new); dlist = dlist->next; } return arrow_new; } gamgi_shape *gamgi_engine_copy_shape (gamgi_shape *shape) { gamgi_dlist *dlist; gamgi_text *text_new; gamgi_shape *shape_new; shape_new = gamgi_engine_create_shape (); static_start (GAMGI_CAST_OBJECT shape_new); gamgi_engine_copy_out_shape (shape, shape_new); shape_new->object.number = gamgi_engine_number_shape_get (); dlist = shape->text_start; while (dlist != NULL) { text_new = gamgi_engine_copy_text (GAMGI_CAST_TEXT dlist->data); gamgi_engine_link_text_shape (text_new, shape_new); dlist = dlist->next; } return shape_new; } gamgi_graph *gamgi_engine_copy_graph (gamgi_graph *graph) { gamgi_dlist *dlist; gamgi_text *text_new; gamgi_graph *graph_new; graph_new = gamgi_engine_create_graph (); static_start (GAMGI_CAST_OBJECT graph_new); gamgi_engine_copy_out_graph (graph, graph_new); graph_new->object.number = gamgi_engine_number_graph_get (); dlist = graph->text_start; while (dlist != NULL) { text_new = gamgi_engine_copy_text (GAMGI_CAST_TEXT dlist->data); gamgi_engine_link_text_graph (text_new, graph_new); dlist = dlist->next; } return graph_new; } gamgi_assembly *gamgi_engine_copy_assembly (gamgi_assembly *assembly) { gamgi_dlist *dlist; gamgi_text *text_new; gamgi_orbital *orbital_new; gamgi_atom *atom_new; gamgi_direction *direction_new; gamgi_plane *plane_new; gamgi_group *group_new; gamgi_molecule *molecule_new; gamgi_cluster *cluster_new; gamgi_cell *cell_new; gamgi_arrow *arrow_new; gamgi_shape *shape_new; gamgi_graph *graph_new; gamgi_assembly *assembly_new, *assembly_child; assembly_new = gamgi_engine_create_assembly (); static_start (GAMGI_CAST_OBJECT assembly_new); gamgi_engine_copy_out_assembly (assembly, assembly_new); assembly_new->object.number = gamgi_engine_number_assembly_get (); dlist = assembly->assembly_start; while (dlist != NULL) { assembly_child = gamgi_engine_copy_assembly (GAMGI_CAST_ASSEMBLY dlist->data); gamgi_engine_link_assembly_assembly (assembly_child, assembly_new); dlist = dlist->next; } dlist = assembly->graph_start; while (dlist != NULL) { graph_new = gamgi_engine_copy_graph (GAMGI_CAST_GRAPH dlist->data); gamgi_engine_link_graph_assembly (graph_new, assembly_new); dlist = dlist->next; } dlist = assembly->shape_start; while (dlist != NULL) { shape_new = gamgi_engine_copy_shape (GAMGI_CAST_SHAPE dlist->data); gamgi_engine_link_shape_assembly (shape_new, assembly_new); dlist = dlist->next; } dlist = assembly->arrow_start; while (dlist != NULL) { arrow_new = gamgi_engine_copy_arrow (GAMGI_CAST_ARROW dlist->data); gamgi_engine_link_arrow_assembly (arrow_new, assembly_new); dlist = dlist->next; } dlist = assembly->cell_start; while (dlist != NULL) { cell_new = gamgi_engine_copy_cell (GAMGI_CAST_CELL dlist->data); gamgi_engine_link_cell_assembly (cell_new, assembly_new); dlist = dlist->next; } dlist = assembly->cluster_start; while (dlist != NULL) { cluster_new = gamgi_engine_copy_cluster (GAMGI_CAST_CLUSTER dlist->data); gamgi_engine_link_cluster_assembly (cluster_new, assembly_new); dlist = dlist->next; } dlist = assembly->molecule_start; while (dlist != NULL) { molecule_new = gamgi_engine_copy_molecule (GAMGI_CAST_MOLECULE dlist->data); gamgi_engine_link_molecule_assembly (molecule_new, assembly_new); dlist = dlist->next; } dlist = assembly->group_start; while (dlist != NULL) { group_new = gamgi_engine_copy_group (GAMGI_CAST_GROUP dlist->data); gamgi_engine_link_group_assembly (group_new, assembly_new); dlist = dlist->next; } dlist = assembly->plane_start; while (dlist != NULL) { plane_new = gamgi_engine_copy_plane (GAMGI_CAST_PLANE dlist->data); gamgi_engine_link_plane_assembly (plane_new, assembly_new); dlist = dlist->next; } dlist = assembly->direction_start; while (dlist != NULL) { direction_new = gamgi_engine_copy_direction (GAMGI_CAST_DIRECTION dlist->data); gamgi_engine_link_direction_assembly (direction_new, assembly_new); dlist = dlist->next; } dlist = assembly->atom_start; while (dlist != NULL) { atom_new = gamgi_engine_copy_atom (GAMGI_CAST_ATOM dlist->data); gamgi_engine_link_atom_assembly (atom_new, assembly_new); dlist = dlist->next; } dlist = assembly->orbital_start; while (dlist != NULL) { orbital_new = gamgi_engine_copy_orbital (GAMGI_CAST_ORBITAL dlist->data); gamgi_engine_link_orbital_assembly (orbital_new, assembly_new); dlist = dlist->next; } dlist = assembly->text_start; while (dlist != NULL) { text_new = gamgi_engine_copy_text (GAMGI_CAST_TEXT dlist->data); gamgi_engine_link_text_assembly (text_new, assembly_new); dlist = dlist->next; } return assembly_new; } gamgi_light *gamgi_engine_copy_light (gamgi_light *light) { gamgi_light *light_new; light_new = gamgi_engine_create_light (); static_start (GAMGI_CAST_OBJECT light_new); gamgi_engine_copy_out_light (light, light_new); light_new->object.number = gamgi_engine_number_light_get (); return light_new; } gamgi_layer *gamgi_engine_copy_layer (gamgi_layer *layer) { gamgi_dlist *dlist; gamgi_text *text_new; gamgi_orbital *orbital_new; gamgi_atom *atom_new; gamgi_direction *direction_new; gamgi_plane *plane_new; gamgi_group *group_new; gamgi_molecule *molecule_new; gamgi_cluster *cluster_new; gamgi_cell *cell_new; gamgi_arrow *arrow_new; gamgi_shape *shape_new; gamgi_graph *graph_new; gamgi_assembly *assembly_new; gamgi_light *light_new; gamgi_layer *layer_new; layer_new = gamgi_engine_create_layer (); static_start (GAMGI_CAST_OBJECT layer_new); gamgi_engine_copy_out_layer (layer, layer_new); layer_new->object.number = gamgi_engine_number_layer_get (); dlist = layer->light_start; while (dlist != NULL) { light_new = gamgi_engine_copy_light (GAMGI_CAST_LIGHT dlist->data); gamgi_engine_link_light_layer (light_new, layer_new); dlist = dlist->next; } dlist = layer->assembly_start; while (dlist != NULL) { assembly_new = gamgi_engine_copy_assembly (GAMGI_CAST_ASSEMBLY dlist->data); gamgi_engine_link_assembly_layer (assembly_new, layer_new); dlist = dlist->next; } dlist = layer->graph_start; while (dlist != NULL) { graph_new = gamgi_engine_copy_graph (GAMGI_CAST_GRAPH dlist->data); gamgi_engine_link_graph_layer (graph_new, layer_new); dlist = dlist->next; } dlist = layer->shape_start; while (dlist != NULL) { shape_new = gamgi_engine_copy_shape (GAMGI_CAST_SHAPE dlist->data); gamgi_engine_link_shape_layer (shape_new, layer_new); dlist = dlist->next; } dlist = layer->arrow_start; while (dlist != NULL) { arrow_new = gamgi_engine_copy_arrow (GAMGI_CAST_ARROW dlist->data); gamgi_engine_link_arrow_layer (arrow_new, layer_new); dlist = dlist->next; } dlist = layer->cell_start; while (dlist != NULL) { cell_new = gamgi_engine_copy_cell (GAMGI_CAST_CELL dlist->data); gamgi_engine_link_cell_layer (cell_new, layer_new); dlist = dlist->next; } dlist = layer->cluster_start; while (dlist != NULL) { cluster_new = gamgi_engine_copy_cluster (GAMGI_CAST_CLUSTER dlist->data); gamgi_engine_link_cluster_layer (cluster_new, layer_new); dlist = dlist->next; } dlist = layer->molecule_start; while (dlist != NULL) { molecule_new = gamgi_engine_copy_molecule (GAMGI_CAST_MOLECULE dlist->data); gamgi_engine_link_molecule_layer (molecule_new, layer_new); dlist = dlist->next; } dlist = layer->group_start; while (dlist != NULL) { group_new = gamgi_engine_copy_group (GAMGI_CAST_GROUP dlist->data); gamgi_engine_link_group_layer (group_new, layer_new); dlist = dlist->next; } dlist = layer->plane_start; while (dlist != NULL) { plane_new = gamgi_engine_copy_plane (GAMGI_CAST_PLANE dlist->data); gamgi_engine_link_plane_layer (plane_new, layer_new); dlist = dlist->next; } dlist = layer->direction_start; while (dlist != NULL) { direction_new = gamgi_engine_copy_direction (GAMGI_CAST_DIRECTION dlist->data); gamgi_engine_link_direction_layer (direction_new, layer_new); dlist = dlist->next; } dlist = layer->atom_start; while (dlist != NULL) { atom_new = gamgi_engine_copy_atom (GAMGI_CAST_ATOM dlist->data); gamgi_engine_link_atom_layer (atom_new, layer_new); dlist = dlist->next; } dlist = layer->orbital_start; while (dlist != NULL) { orbital_new = gamgi_engine_copy_orbital (GAMGI_CAST_ORBITAL dlist->data); gamgi_engine_link_orbital_layer (orbital_new, layer_new); dlist = dlist->next; } dlist = layer->text_start; while (dlist != NULL) { text_new = gamgi_engine_copy_text (GAMGI_CAST_TEXT dlist->data); gamgi_engine_link_text_layer (text_new, layer_new); dlist = dlist->next; } return layer_new; } gamgi_window *gamgi_engine_copy_window (gamgi_window *window) { gamgi_dlist *dlist; gamgi_layer *layer; gamgi_layer *layer_new; gamgi_window *window_new; window_new = gamgi_engine_create_window (); static_start (GAMGI_CAST_OBJECT window_new); gamgi_engine_copy_out_window (window, window_new); window_new->object.number = gamgi_engine_number_window_get (); dlist = window->layer_start; while (dlist != NULL) { layer = GAMGI_CAST_LAYER dlist->data; layer_new = gamgi_engine_copy_layer (layer); gamgi_engine_link_layer_window (layer_new, window_new); if (window->layer == layer) window_new->layer = layer_new; dlist = dlist->next; } return window_new; } /*************** external function *********** * * * GAMGI_ENGINE_COPY_OBJECT * * * *********************************************/ gamgi_object *gamgi_engine_copy_object (gamgi_object *object) { gamgi_object *object_new; switch (object->class) { case GAMGI_ENGINE_TEXT: object_new = GAMGI_CAST_OBJECT gamgi_engine_copy_text (GAMGI_CAST_TEXT object); break; case GAMGI_ENGINE_ORBITAL: object_new = GAMGI_CAST_OBJECT gamgi_engine_copy_orbital (GAMGI_CAST_ORBITAL object); break; case GAMGI_ENGINE_BOND: object_new = GAMGI_CAST_OBJECT gamgi_engine_copy_bond (GAMGI_CAST_BOND object); break; case GAMGI_ENGINE_ATOM: object_new = GAMGI_CAST_OBJECT gamgi_engine_copy_atom (GAMGI_CAST_ATOM object); break; case GAMGI_ENGINE_DIRECTION: object_new = GAMGI_CAST_OBJECT gamgi_engine_copy_direction (GAMGI_CAST_DIRECTION object); break; case GAMGI_ENGINE_PLANE: object_new = GAMGI_CAST_OBJECT gamgi_engine_copy_plane (GAMGI_CAST_PLANE object); break; case GAMGI_ENGINE_GROUP: object_new = GAMGI_CAST_OBJECT gamgi_engine_copy_group (GAMGI_CAST_GROUP object); break; case GAMGI_ENGINE_MOLECULE: object_new = GAMGI_CAST_OBJECT gamgi_engine_copy_molecule (GAMGI_CAST_MOLECULE object); break; case GAMGI_ENGINE_CLUSTER: object_new = GAMGI_CAST_OBJECT gamgi_engine_copy_cluster (GAMGI_CAST_CLUSTER object); break; case GAMGI_ENGINE_CELL: object_new = GAMGI_CAST_OBJECT gamgi_engine_copy_cell (GAMGI_CAST_CELL object); break; case GAMGI_ENGINE_ARROW: object_new = GAMGI_CAST_OBJECT gamgi_engine_copy_arrow (GAMGI_CAST_ARROW object); break; case GAMGI_ENGINE_SHAPE: object_new = GAMGI_CAST_OBJECT gamgi_engine_copy_shape (GAMGI_CAST_SHAPE object); break; case GAMGI_ENGINE_GRAPH: object_new = GAMGI_CAST_OBJECT gamgi_engine_copy_graph (GAMGI_CAST_GRAPH object); break; case GAMGI_ENGINE_ASSEMBLY: object_new = GAMGI_CAST_OBJECT gamgi_engine_copy_assembly (GAMGI_CAST_ASSEMBLY object); break; case GAMGI_ENGINE_LIGHT: object_new = GAMGI_CAST_OBJECT gamgi_engine_copy_light (GAMGI_CAST_LIGHT object); break; case GAMGI_ENGINE_LAYER: object_new = GAMGI_CAST_OBJECT gamgi_engine_copy_layer (GAMGI_CAST_LAYER object); break; case GAMGI_ENGINE_WINDOW: object_new = GAMGI_CAST_OBJECT gamgi_engine_copy_window (GAMGI_CAST_WINDOW object); break; default: object_new = NULL; } return object_new; } gamgi0.17.1g/src/engine/gamgi_engine_find.h0000644000175000017500000002707311451406106020133 0ustar carloscarlos/******************************************* * * $GAMGI/src/engine/gamgi_engine_find.h * * Copyright (C) 2001, 2004 Carlos Pereira * * Distributed under the terms of the GNU * General Public License: $GAMGI/LICENSE * */ /********************** * external functions * **********************/ gamgi_bool gamgi_engine_find_object (gamgi_object *object, gamgi_object *parent); gamgi_layer *gamgi_engine_find_layer (gamgi_object *object); gamgi_window *gamgi_engine_find_window (gamgi_object *object); gamgi_object *gamgi_engine_find_root (gamgi_object *object1, gamgi_object *object2, gamgi_object *scope); gamgi_text *gamgi_engine_find_text_text (unsigned int number, gamgi_text *text); gamgi_text *gamgi_engine_find_text_orbital (unsigned int number, gamgi_orbital *orbital); gamgi_text *gamgi_engine_find_text_bond (unsigned int number, gamgi_bond *bond); gamgi_text *gamgi_engine_find_text_atom (unsigned int number, gamgi_atom *atom); gamgi_text *gamgi_engine_find_text_direction (unsigned int number, gamgi_direction *direction); gamgi_text *gamgi_engine_find_text_plane (unsigned int number, gamgi_plane *plane); gamgi_text *gamgi_engine_find_text_group (unsigned int number, gamgi_group *group); gamgi_text *gamgi_engine_find_text_molecule (unsigned int number, gamgi_molecule *molecule); gamgi_text *gamgi_engine_find_text_cluster (unsigned int number, gamgi_cluster *cluster); gamgi_text *gamgi_engine_find_text_cell (unsigned int number, gamgi_cell *cell); gamgi_text *gamgi_engine_find_text_arrow (unsigned int number, gamgi_arrow *arrow); gamgi_text *gamgi_engine_find_text_shape (unsigned int number, gamgi_shape *shape); gamgi_text *gamgi_engine_find_text_graph (unsigned int number, gamgi_graph *graph); gamgi_text *gamgi_engine_find_text_assembly (unsigned int number, gamgi_assembly *assembly); gamgi_text *gamgi_engine_find_text_layer (unsigned int number, gamgi_layer *layer); gamgi_text *gamgi_engine_find_text_window (unsigned int number, gamgi_window *window); gamgi_text *gamgi_engine_find_text_gamgi (unsigned int number); gamgi_orbital *gamgi_engine_find_orbital_orbital (unsigned int number, gamgi_orbital *orbital); gamgi_orbital *gamgi_engine_find_orbital_bond (unsigned int number, gamgi_bond *bond); gamgi_orbital *gamgi_engine_find_orbital_atom (unsigned int number, gamgi_atom *atom); gamgi_orbital *gamgi_engine_find_orbital_direction (unsigned int number, gamgi_direction *direction); gamgi_orbital *gamgi_engine_find_orbital_plane (unsigned int number, gamgi_plane *plane); gamgi_orbital *gamgi_engine_find_orbital_group (unsigned int number, gamgi_group *group); gamgi_orbital *gamgi_engine_find_orbital_molecule (unsigned int number, gamgi_molecule *molecule); gamgi_orbital *gamgi_engine_find_orbital_cluster (unsigned int number, gamgi_cluster *cluster); gamgi_orbital *gamgi_engine_find_orbital_cell (unsigned int number, gamgi_cell *cell); gamgi_orbital *gamgi_engine_find_orbital_assembly (unsigned int number, gamgi_assembly *assembly); gamgi_orbital *gamgi_engine_find_orbital_layer (unsigned int number, gamgi_layer *layer); gamgi_orbital *gamgi_engine_find_orbital_window (unsigned int number, gamgi_window *window); gamgi_orbital *gamgi_engine_find_orbital_gamgi (unsigned int number); gamgi_atom *gamgi_engine_find_atom_atom (unsigned int number, gamgi_atom *atom); gamgi_atom *gamgi_engine_find_atom_direction (unsigned int number, gamgi_direction *direction); gamgi_atom *gamgi_engine_find_atom_plane (unsigned int number, gamgi_plane *plane); gamgi_atom *gamgi_engine_find_atom_group (unsigned int number, gamgi_group *group); gamgi_atom *gamgi_engine_find_atom_molecule (unsigned int number, gamgi_molecule *molecule); gamgi_atom *gamgi_engine_find_atom_cluster (unsigned int number, gamgi_cluster *cluster); gamgi_atom *gamgi_engine_find_atom_cell (unsigned int number, gamgi_cell *cell); gamgi_atom *gamgi_engine_find_atom_assembly (unsigned int number, gamgi_assembly *assembly); gamgi_atom *gamgi_engine_find_atom_layer (unsigned int number, gamgi_layer *layer); gamgi_atom *gamgi_engine_find_atom_window (unsigned int number, gamgi_window *window); gamgi_atom *gamgi_engine_find_atom_gamgi (unsigned int number); gamgi_bond *gamgi_engine_find_bond_atom (unsigned int number, gamgi_atom *atom); gamgi_bond *gamgi_engine_find_bond_direction (unsigned int number, gamgi_direction *direction); gamgi_bond *gamgi_engine_find_bond_plane (unsigned int number, gamgi_plane *plane); gamgi_bond *gamgi_engine_find_bond_group (unsigned int number, gamgi_group *group); gamgi_bond *gamgi_engine_find_bond_molecule (unsigned int number, gamgi_molecule *molecule); gamgi_bond *gamgi_engine_find_bond_cluster (unsigned int number, gamgi_cluster *cluster); gamgi_bond *gamgi_engine_find_bond_cell (unsigned int number, gamgi_cell *cell); gamgi_bond *gamgi_engine_find_bond_assembly (unsigned int number, gamgi_assembly *assembly); gamgi_bond *gamgi_engine_find_bond_layer (unsigned int number, gamgi_layer *layer); gamgi_bond *gamgi_engine_find_bond_window (unsigned int number, gamgi_window *window); gamgi_bond *gamgi_engine_find_bond_gamgi (unsigned int number); gamgi_direction *gamgi_engine_find_direction_direction (unsigned int number, gamgi_direction *direction); gamgi_direction *gamgi_engine_find_direction_plane (unsigned int number, gamgi_plane *plane); gamgi_direction *gamgi_engine_find_direction_group (unsigned int number, gamgi_group *group); gamgi_direction *gamgi_engine_find_direction_molecule (unsigned int number, gamgi_molecule *molecule); gamgi_direction *gamgi_engine_find_direction_cluster (unsigned int number, gamgi_cluster *cluster); gamgi_direction *gamgi_engine_find_direction_cell (unsigned int number, gamgi_cell *cell); gamgi_direction *gamgi_engine_find_direction_assembly (unsigned int number, gamgi_assembly *assembly); gamgi_direction *gamgi_engine_find_direction_layer (unsigned int number, gamgi_layer *layer); gamgi_direction *gamgi_engine_find_direction_window (unsigned int number, gamgi_window *window); gamgi_direction *gamgi_engine_find_direction_gamgi (unsigned int number); gamgi_plane *gamgi_engine_find_plane_plane (unsigned int number, gamgi_plane *plane); gamgi_plane *gamgi_engine_find_plane_group (unsigned int number, gamgi_group *group); gamgi_plane *gamgi_engine_find_plane_molecule (unsigned int number, gamgi_molecule *molecule); gamgi_plane *gamgi_engine_find_plane_cluster (unsigned int number, gamgi_cluster *cluster); gamgi_plane *gamgi_engine_find_plane_cell (unsigned int number, gamgi_cell *cell); gamgi_plane *gamgi_engine_find_plane_assembly (unsigned int number, gamgi_assembly *assembly); gamgi_plane *gamgi_engine_find_plane_layer (unsigned int number, gamgi_layer *layer); gamgi_plane *gamgi_engine_find_plane_window (unsigned int number, gamgi_window *window); gamgi_plane *gamgi_engine_find_plane_gamgi (unsigned int number); gamgi_group *gamgi_engine_find_group_group (unsigned int number, gamgi_group *group); gamgi_group *gamgi_engine_find_group_molecule (unsigned int number, gamgi_molecule *molecule); gamgi_group *gamgi_engine_find_group_cluster (unsigned int number, gamgi_cluster *cluster); gamgi_group *gamgi_engine_find_group_cell (unsigned int number, gamgi_cell *cell); gamgi_group *gamgi_engine_find_group_assembly (unsigned int number, gamgi_assembly *assembly); gamgi_group *gamgi_engine_find_group_layer (unsigned int number, gamgi_layer *layer); gamgi_group *gamgi_engine_find_group_window (unsigned int number, gamgi_window *window); gamgi_group *gamgi_engine_find_group_gamgi (unsigned int number); gamgi_molecule *gamgi_engine_find_molecule_molecule (unsigned int number, gamgi_molecule *molecule); gamgi_molecule *gamgi_engine_find_molecule_cluster (unsigned int number, gamgi_cluster *cluster); gamgi_molecule *gamgi_engine_find_molecule_cell (unsigned int number, gamgi_cell *cell); gamgi_molecule *gamgi_engine_find_molecule_assembly (unsigned int number, gamgi_assembly *assembly); gamgi_molecule *gamgi_engine_find_molecule_layer (unsigned int number, gamgi_layer *layer); gamgi_molecule *gamgi_engine_find_molecule_window (unsigned int number, gamgi_window *window); gamgi_molecule *gamgi_engine_find_molecule_gamgi (unsigned int number); gamgi_cluster *gamgi_engine_find_cluster_cluster (unsigned int number, gamgi_cluster *cluster); gamgi_cluster *gamgi_engine_find_cluster_cell (unsigned int number, gamgi_cell *cell); gamgi_cluster *gamgi_engine_find_cluster_assembly (unsigned int number, gamgi_assembly *assembly); gamgi_cluster *gamgi_engine_find_cluster_layer (unsigned int number, gamgi_layer *layer); gamgi_cluster *gamgi_engine_find_cluster_window (unsigned int number, gamgi_window *window); gamgi_cluster *gamgi_engine_find_cluster_gamgi (unsigned int number); gamgi_cell *gamgi_engine_find_cell_cell (unsigned int number, gamgi_cell *cell); gamgi_cell *gamgi_engine_find_cell_assembly (unsigned int number, gamgi_assembly *assembly); gamgi_cell *gamgi_engine_find_cell_layer (unsigned int number, gamgi_layer *layer); gamgi_cell *gamgi_engine_find_cell_window (unsigned int number, gamgi_window *window); gamgi_cell *gamgi_engine_find_cell_gamgi (unsigned int number); gamgi_arrow *gamgi_engine_find_arrow_arrow (unsigned int number, gamgi_arrow *arrow); gamgi_arrow *gamgi_engine_find_arrow_assembly (unsigned int number, gamgi_assembly *assembly); gamgi_arrow *gamgi_engine_find_arrow_layer (unsigned int number, gamgi_layer *layer); gamgi_arrow *gamgi_engine_find_arrow_window (unsigned int number, gamgi_window *window); gamgi_arrow *gamgi_engine_find_arrow_gamgi (unsigned int number); gamgi_shape *gamgi_engine_find_shape_shape (unsigned int number, gamgi_shape *shape); gamgi_shape *gamgi_engine_find_shape_assembly (unsigned int number, gamgi_assembly *assembly); gamgi_shape *gamgi_engine_find_shape_layer (unsigned int number, gamgi_layer *layer); gamgi_shape *gamgi_engine_find_shape_window (unsigned int number, gamgi_window *window); gamgi_shape *gamgi_engine_find_shape_gamgi (unsigned int number); gamgi_graph *gamgi_engine_find_graph_graph (unsigned int number, gamgi_graph *graph); gamgi_graph *gamgi_engine_find_graph_assembly (unsigned int number, gamgi_assembly *assembly); gamgi_graph *gamgi_engine_find_graph_layer (unsigned int number, gamgi_layer *layer); gamgi_graph *gamgi_engine_find_graph_window (unsigned int number, gamgi_window *window); gamgi_graph *gamgi_engine_find_graph_gamgi (unsigned int number); gamgi_assembly *gamgi_engine_find_assembly_assembly (unsigned int number, gamgi_assembly *assembly); gamgi_assembly *gamgi_engine_find_assembly_layer (unsigned int number, gamgi_layer *layer); gamgi_assembly *gamgi_engine_find_assembly_window (unsigned int number, gamgi_window *window); gamgi_assembly *gamgi_engine_find_assembly_gamgi (unsigned int number); gamgi_light *gamgi_engine_find_light_light (unsigned int number, gamgi_light *light); gamgi_light *gamgi_engine_find_light_layer (unsigned int number, gamgi_layer *layer); gamgi_light *gamgi_engine_find_light_window (unsigned int number, gamgi_window *window); gamgi_light *gamgi_engine_find_light_gamgi (unsigned int number); gamgi_layer *gamgi_engine_find_layer_layer (unsigned int number, gamgi_layer *layer); gamgi_layer *gamgi_engine_find_layer_window (unsigned int number, gamgi_window *window); gamgi_layer *gamgi_engine_find_layer_gamgi (unsigned int number); gamgi_window *gamgi_engine_find_window_window (unsigned int number, gamgi_window *window); gamgi_window *gamgi_engine_find_window_gamgi (unsigned int number); /************* * Rationale * ************* ************* * Rationale * *************/ gamgi0.17.1g/src/engine/gamgi_engine_count.h0000644000175000017500000000362610067027665020354 0ustar carloscarlos/******************************************* * * $GAMGI/src/engine/gamgi_engine_count.h * * Copyright (C) 2001, 2004 Carlos Pereira * * Distributed under the terms of the GNU * General Public License: $GAMGI/LICENSE * */ /********************** * external functions * **********************/ void gamgi_engine_count_text (gamgi_text *text, gamgi_enum class, int *number); void gamgi_engine_count_orbital (gamgi_orbital *orbital, gamgi_enum class, int *number); void gamgi_engine_count_bond (gamgi_bond *bond, gamgi_enum class, int *number); void gamgi_engine_count_atom (gamgi_atom *atom, gamgi_enum class, int *number); void gamgi_engine_count_direction (gamgi_direction *direction, gamgi_enum class, int *number); void gamgi_engine_count_plane (gamgi_plane *plane, gamgi_enum class, int *number); void gamgi_engine_count_group (gamgi_group *group, gamgi_enum class, int *number); void gamgi_engine_count_molecule (gamgi_molecule *molecule, gamgi_enum class, int *number); void gamgi_engine_count_cluster (gamgi_cluster *cluster, gamgi_enum class, int *number); void gamgi_engine_count_cell (gamgi_cell *cell, gamgi_enum class, int *number); void gamgi_engine_count_arrow (gamgi_arrow *arrow, gamgi_enum class, int *number); void gamgi_engine_count_shape (gamgi_shape *shape, gamgi_enum class, int *number); void gamgi_engine_count_graph (gamgi_graph *graph, gamgi_enum class, int *number); void gamgi_engine_count_assembly (gamgi_assembly *assembly, gamgi_enum class, int *number); void gamgi_engine_count_layer (gamgi_layer *layer, gamgi_enum class, int *number); void gamgi_engine_count_window (gamgi_window *window, gamgi_enum class, int *number); void gamgi_engine_count_gamgi (gamgi_enum class, int *number); void gamgi_engine_count_object (gamgi_object *object, gamgi_enum class, int *number); /************* * Rationale * ************* ************* * Rationale * *************/ gamgi0.17.1g/src/engine/gamgi_engine_copy.h0000644000175000017500000000316111444451011020152 0ustar carloscarlos/******************************************* * * $GAMGI/src/engine/gamgi_engine_copy.h * * Copyright (C) 2001, 2004 Carlos Pereira * * Distributed under the terms of the GNU * General Public License: $GAMGI/LICENSE * */ /********************** * internal functions * ********************** static void static_start (gamgi_object *object); ********************** * external functions * **********************/ gamgi_text *gamgi_engine_copy_text (gamgi_text *text); gamgi_orbital *gamgi_engine_copy_orbital (gamgi_orbital *orbital); gamgi_bond *gamgi_engine_copy_bond (gamgi_bond *bond); gamgi_atom *gamgi_engine_copy_atom (gamgi_atom *atom); gamgi_direction *gamgi_engine_copy_direction (gamgi_direction *direction); gamgi_plane *gamgi_engine_copy_plane (gamgi_plane *plane); gamgi_group *gamgi_engine_copy_group (gamgi_group *group); gamgi_molecule *gamgi_engine_copy_molecule (gamgi_molecule *molecule); gamgi_cluster *gamgi_engine_copy_cluster (gamgi_cluster *cluster); gamgi_cell *gamgi_engine_copy_cell (gamgi_cell *cell); gamgi_arrow *gamgi_engine_copy_arrow (gamgi_arrow *arrow); gamgi_shape *gamgi_engine_copy_shape (gamgi_shape *shape); gamgi_graph *gamgi_engine_copy_graph (gamgi_graph *graph); gamgi_assembly *gamgi_engine_copy_assembly (gamgi_assembly *assembly); gamgi_light *gamgi_engine_copy_light (gamgi_light *light); gamgi_layer *gamgi_engine_copy_layer (gamgi_layer *layer); gamgi_window *gamgi_engine_copy_window (gamgi_window *window); gamgi_object *gamgi_engine_copy_object (gamgi_object *object); /************* * Rationale * ************* ************* * Rationale * *************/ gamgi0.17.1g/src/engine/gamgi_engine_empty.c0000644000175000017500000001201010516446552020337 0ustar carloscarlos/****************************************** * * $GAMGI/src/engine/gamgi_engine_empty.c * * Copyright (C) 2006 Carlos Pereira * * Distributed under the terms of the GNU * General Public License: $GAMGI/LICENSE * */ #include "gamgi_engine.h" #include "gamgi_mesa.h" #include "gamgi_chem.h" #include "gamgi_global.h" gamgi_bool gamgi_engine_empty_text (gamgi_text *text) { if (text->text_start != NULL) return FALSE; return TRUE; } gamgi_bool gamgi_engine_empty_orbital (gamgi_orbital *orbital) { if (orbital->text_start != NULL) return FALSE; return TRUE; } gamgi_bool gamgi_engine_empty_bond (gamgi_bond *bond) { if (bond->text_start != NULL) return FALSE; if (bond->orbital_start != NULL) return FALSE; return TRUE; } gamgi_bool gamgi_engine_empty_atom (gamgi_atom *atom) { if (atom->text_start != NULL) return FALSE; if (atom->orbital_start != NULL) return FALSE; if (atom->bond_start != NULL) return FALSE; return TRUE; } gamgi_bool gamgi_engine_empty_direction (gamgi_direction *direction) { if (direction->text_start != NULL) return FALSE; if (direction->orbital_start != NULL) return FALSE; if (direction->atom_start != NULL) return FALSE; return TRUE; } gamgi_bool gamgi_engine_empty_plane (gamgi_plane *plane) { if (plane->text_start != NULL) return FALSE; if (plane->orbital_start != NULL) return FALSE; if (plane->atom_start != NULL) return FALSE; if (plane->direction_start != NULL) return FALSE; return TRUE; } gamgi_bool gamgi_engine_empty_group (gamgi_group *group) { if (group->text_start != NULL) return FALSE; if (group->orbital_start != NULL) return FALSE; if (group->atom_start != NULL) return FALSE; if (group->direction_start != NULL) return FALSE; if (group->plane_start != NULL) return FALSE; if (group->group_start != NULL) return FALSE; return TRUE; } gamgi_bool gamgi_engine_empty_molecule (gamgi_molecule *molecule) { if (molecule->text_start != NULL) return FALSE; if (molecule->orbital_start != NULL) return FALSE; if (molecule->atom_start != NULL) return FALSE; if (molecule->direction_start != NULL) return FALSE; if (molecule->plane_start != NULL) return FALSE; if (molecule->group_start != NULL) return FALSE; return TRUE; } gamgi_bool gamgi_engine_empty_cluster (gamgi_cluster *cluster) { if (cluster->text_start != NULL) return FALSE; if (cluster->orbital_start != NULL) return FALSE; if (cluster->atom_start != NULL) return FALSE; if (cluster->direction_start != NULL) return FALSE; if (cluster->plane_start != NULL) return FALSE; if (cluster->group_start != NULL) return FALSE; if (cluster->molecule_start != NULL) return FALSE; if (cluster->cluster_start != NULL) return FALSE; return TRUE; } gamgi_bool gamgi_engine_empty_cell (gamgi_cell *cell) { if (cell->text_start != NULL) return FALSE; if (cell->orbital_start != NULL) return FALSE; if (cell->atom_start != NULL) return FALSE; if (cell->direction_start != NULL) return FALSE; if (cell->plane_start != NULL) return FALSE; if (cell->group_start != NULL) return FALSE; if (cell->molecule_start != NULL) return FALSE; if (cell->cluster_start != NULL) return FALSE; return TRUE; } gamgi_bool gamgi_engine_empty_arrow (gamgi_arrow *arrow) { if (arrow->text_start != NULL) return FALSE; return TRUE; } gamgi_bool gamgi_engine_empty_shape (gamgi_shape *shape) { if (shape->text_start != NULL) return FALSE; return TRUE; } gamgi_bool gamgi_engine_empty_graph (gamgi_graph *graph) { if (graph->text_start != NULL) return FALSE; return TRUE; } gamgi_bool gamgi_engine_empty_assembly (gamgi_assembly *assembly) { if (assembly->text_start != NULL) return FALSE; if (assembly->orbital_start != NULL) return FALSE; if (assembly->atom_start != NULL) return FALSE; if (assembly->direction_start != NULL) return FALSE; if (assembly->plane_start != NULL) return FALSE; if (assembly->group_start != NULL) return FALSE; if (assembly->molecule_start != NULL) return FALSE; if (assembly->cluster_start != NULL) return FALSE; if (assembly->cell_start != NULL) return FALSE; if (assembly->arrow_start != NULL) return FALSE; if (assembly->shape_start != NULL) return FALSE; if (assembly->graph_start != NULL) return FALSE; if (assembly->assembly_start != NULL) return FALSE; return TRUE; } gamgi_bool gamgi_engine_empty_light (gamgi_light *light) { return TRUE; } gamgi_bool gamgi_engine_empty_layer (gamgi_layer *layer) { if (layer->text_start != NULL) return FALSE; if (layer->orbital_start != NULL) return FALSE; if (layer->atom_start != NULL) return FALSE; if (layer->direction_start != NULL) return FALSE; if (layer->plane_start != NULL) return FALSE; if (layer->group_start != NULL) return FALSE; if (layer->molecule_start != NULL) return FALSE; if (layer->cluster_start != NULL) return FALSE; if (layer->cell_start != NULL) return FALSE; if (layer->arrow_start != NULL) return FALSE; if (layer->shape_start != NULL) return FALSE; if (layer->graph_start != NULL) return FALSE; if (layer->assembly_start != NULL) return FALSE; if (layer->light_start != NULL) return FALSE; return TRUE; } gamgi_bool gamgi_engine_empty_window (gamgi_window *window) { if (window->layer_start != NULL) return FALSE; return TRUE; } gamgi0.17.1g/src/engine/gamgi_engine_link.h0000644000175000017500000001644310364017311020145 0ustar carloscarlos/******************************************* * * $GAMGI/src/engine/gamgi_engine_link.h * * Copyright (C) 2001, 2004 Carlos Pereira * * Distributed under the terms of the GNU * General Public License: $GAMGI/LICENSE * */ /********************** * external functions * **********************/ void gamgi_engine_link_text_text (gamgi_text *child, gamgi_text *parent); void gamgi_engine_link_text_orbital (gamgi_text *text, gamgi_orbital *orbital); void gamgi_engine_link_text_bond (gamgi_text *text, gamgi_bond *bond); void gamgi_engine_link_text_atom (gamgi_text *text, gamgi_atom *atom); void gamgi_engine_link_text_direction (gamgi_text *text, gamgi_direction *direction); void gamgi_engine_link_text_plane (gamgi_text *text, gamgi_plane *plane); void gamgi_engine_link_text_group (gamgi_text *text, gamgi_group *group); void gamgi_engine_link_text_molecule (gamgi_text *text, gamgi_molecule *molecule); void gamgi_engine_link_text_cluster (gamgi_text *text, gamgi_cluster *cluster); void gamgi_engine_link_text_cell (gamgi_text *text, gamgi_cell *cell); void gamgi_engine_link_text_arrow (gamgi_text *text, gamgi_arrow *arrow); void gamgi_engine_link_text_shape (gamgi_text *text, gamgi_shape *shape); void gamgi_engine_link_text_graph (gamgi_text *text, gamgi_graph *graph); void gamgi_engine_link_text_assembly (gamgi_text *text, gamgi_assembly *assembly); void gamgi_engine_link_text_layer (gamgi_text *text, gamgi_layer *layer); void gamgi_engine_link_orbital_bond (gamgi_orbital *orbital, gamgi_bond *bond); void gamgi_engine_link_orbital_atom (gamgi_orbital *orbital, gamgi_atom *atom); void gamgi_engine_link_orbital_direction (gamgi_orbital *orbital, gamgi_direction *direction); void gamgi_engine_link_orbital_plane (gamgi_orbital *orbital, gamgi_plane *plane); void gamgi_engine_link_orbital_group (gamgi_orbital *orbital, gamgi_group *group); void gamgi_engine_link_orbital_molecule (gamgi_orbital *orbital, gamgi_molecule *molecule); void gamgi_engine_link_orbital_cluster (gamgi_orbital *orbital, gamgi_cluster *cluster); void gamgi_engine_link_orbital_cell (gamgi_orbital *orbital, gamgi_cell *cell); void gamgi_engine_link_orbital_assembly (gamgi_orbital *orbital, gamgi_assembly *assembly); void gamgi_engine_link_orbital_layer (gamgi_orbital *orbital, gamgi_layer *layer); void gamgi_engine_link_bond_atom (gamgi_bond *bond, gamgi_atom *atom); void gamgi_engine_link_atom_direction (gamgi_atom *atom, gamgi_direction *direction); void gamgi_engine_link_atom_plane (gamgi_atom *atom, gamgi_plane *plane); void gamgi_engine_link_atom_group (gamgi_atom *atom, gamgi_group *group); void gamgi_engine_link_atom_molecule (gamgi_atom *atom, gamgi_molecule *molecule); void gamgi_engine_link_atom_cluster (gamgi_atom *atom, gamgi_cluster *cluster); void gamgi_engine_link_atom_cell (gamgi_atom *atom, gamgi_cell *cell); void gamgi_engine_link_atom_assembly (gamgi_atom *atom, gamgi_assembly *assembly); void gamgi_engine_link_atom_layer (gamgi_atom *atom, gamgi_layer *layer); void gamgi_engine_link_direction_plane (gamgi_direction *direction, gamgi_plane *plane); void gamgi_engine_link_direction_group (gamgi_direction *direction, gamgi_group *group); void gamgi_engine_link_direction_molecule (gamgi_direction *direction, gamgi_molecule *molecule); void gamgi_engine_link_direction_cluster (gamgi_direction *direction, gamgi_cluster *cluster); void gamgi_engine_link_direction_cell (gamgi_direction *direction, gamgi_cell *cell); void gamgi_engine_link_direction_assembly (gamgi_direction *direction, gamgi_assembly *assembly); void gamgi_engine_link_direction_layer (gamgi_direction *direction, gamgi_layer *layer); void gamgi_engine_link_plane_group (gamgi_plane *plane, gamgi_group *group); void gamgi_engine_link_plane_molecule (gamgi_plane *plane, gamgi_molecule *molecule); void gamgi_engine_link_plane_cluster (gamgi_plane *plane, gamgi_cluster *cluster); void gamgi_engine_link_plane_cell (gamgi_plane *plane, gamgi_cell *cell); void gamgi_engine_link_plane_assembly (gamgi_plane *plane, gamgi_assembly *assembly); void gamgi_engine_link_plane_layer (gamgi_plane *plane, gamgi_layer *layer); void gamgi_engine_link_group_group (gamgi_group *child, gamgi_group *parent); void gamgi_engine_link_group_molecule (gamgi_group *group, gamgi_molecule *molecule); void gamgi_engine_link_group_cluster (gamgi_group *group, gamgi_cluster *cluster); void gamgi_engine_link_group_cell (gamgi_group *group, gamgi_cell *cell); void gamgi_engine_link_group_assembly (gamgi_group *group, gamgi_assembly *assembly); void gamgi_engine_link_group_layer (gamgi_group *group, gamgi_layer *layer); void gamgi_engine_link_molecule_cluster (gamgi_molecule *molecule, gamgi_cluster *cluster); void gamgi_engine_link_molecule_cell (gamgi_molecule *molecule, gamgi_cell *cell); void gamgi_engine_link_molecule_assembly (gamgi_molecule *molecule, gamgi_assembly *assembly); void gamgi_engine_link_molecule_layer (gamgi_molecule *molecule, gamgi_layer *layer); void gamgi_engine_link_cluster_cluster (gamgi_cluster *child, gamgi_cluster *parent); void gamgi_engine_link_cluster_cell (gamgi_cluster *cluster, gamgi_cell *cell); void gamgi_engine_link_cluster_assembly (gamgi_cluster *cluster, gamgi_assembly *assembly); void gamgi_engine_link_cluster_layer (gamgi_cluster *cluster, gamgi_layer *layer); void gamgi_engine_link_cell_assembly (gamgi_cell *cell, gamgi_assembly *assembly); void gamgi_engine_link_cell_layer (gamgi_cell *cell, gamgi_layer *layer); void gamgi_engine_link_arrow_assembly (gamgi_arrow *arrow, gamgi_assembly *assembly); void gamgi_engine_link_arrow_layer (gamgi_arrow *arrow, gamgi_layer *layer); void gamgi_engine_link_shape_assembly (gamgi_shape *shape, gamgi_assembly *assembly); void gamgi_engine_link_shape_layer (gamgi_shape *shape, gamgi_layer *layer); void gamgi_engine_link_graph_assembly (gamgi_graph *graph, gamgi_assembly *assembly); void gamgi_engine_link_graph_layer (gamgi_graph *graph, gamgi_layer *layer); void gamgi_engine_link_assembly_assembly (gamgi_assembly *child, gamgi_assembly *parent); void gamgi_engine_link_assembly_layer (gamgi_assembly *assembly, gamgi_layer *layer); void gamgi_engine_link_light_layer (gamgi_light *light, gamgi_layer *layer); void gamgi_engine_link_layer_window (gamgi_layer *layer, gamgi_window *window); void gamgi_engine_link_object_bond (gamgi_object *object, gamgi_bond *bond); void gamgi_engine_link_object_atom (gamgi_object *object, gamgi_atom *atom); void gamgi_engine_link_object_direction (gamgi_object *object, gamgi_direction *direction); void gamgi_engine_link_object_plane (gamgi_object *object, gamgi_plane *plane); void gamgi_engine_link_object_group (gamgi_object *object, gamgi_group *group); void gamgi_engine_link_object_molecule (gamgi_object *object, gamgi_molecule *molecule); void gamgi_engine_link_object_cluster (gamgi_object *object, gamgi_cluster *cluster); void gamgi_engine_link_object_cell (gamgi_object *object, gamgi_cell *cell); void gamgi_engine_link_object_assembly (gamgi_object *object, gamgi_assembly *assembly); void gamgi_engine_link_object_layer (gamgi_object *object, gamgi_layer *layer); void gamgi_engine_link_object_object (gamgi_object *child, gamgi_object *parent); /************* * Rationale * ************* ************* * Rationale * *************/ gamgi0.17.1g/src/engine/gamgi_engine_array.c0000644000175000017500000002007610301142102020302 0ustar carloscarlos/******************************************* * * $GAMGI/src/engine/gamgi_engine_array.c * * Copyright (C) 2001, 2004 Carlos Pereira * * Distributed under the terms of the GNU * General Public License: $GAMGI/LICENSE * */ #include "gamgi_engine.h" /***************** internal function ******************** * * ********************************************************/ static void static_iarray_start (gamgi_iarray *iarray, int size, int increment, int dimension) { iarray->size = size; iarray->increment = increment; iarray->dimension = dimension; iarray->offset = 0; iarray->last = NULL; } /***************** internal function ******************** * * ********************************************************/ static void static_darray_start (gamgi_darray *darray, int size, int increment, int dimension) { darray->size = size; darray->increment = increment; darray->dimension = dimension; darray->offset = 0; darray->last = NULL; } /***************** external function ******************** * * ********************************************************/ gamgi_iarray *gamgi_engine_iarray_create (int size, int increment, int dimension) { gamgi_iarray *iarray = (gamgi_iarray *) malloc (sizeof (gamgi_iarray)); iarray->array = (int *) malloc (size * dimension * sizeof (int)); static_iarray_start (iarray, size, increment, dimension); return iarray; } /***************** external function ******************** * * ********************************************************/ gamgi_iarray *gamgi_engine_iarray_recreate (gamgi_iarray *iarray, int size, int increment, int dimension) { iarray->array = (int *) realloc (iarray->array, size * dimension * sizeof (int)); iarray->size = size; iarray->increment = increment; iarray->dimension = dimension; iarray->offset = size; /******************************* * set pointer to last element * *******************************/ iarray->last = iarray->array + iarray->offset * iarray->dimension; return iarray; } /***************** external function ******************** * * ********************************************************/ int *gamgi_engine_iarray_push (gamgi_iarray *iarray, int *vector) { int i; /*********************************** * enlarge full array, adding more * * (user-controled) step elements * ***********************************/ if (iarray->offset == iarray->size) { iarray->size += iarray->increment; iarray->array = (int *) realloc (iarray->array, iarray->size * iarray->dimension * sizeof (int)); } /******************************* * set pointer to last element * *******************************/ iarray->last = iarray->array + iarray->offset * iarray->dimension; /***************************** * copy data to last element * *****************************/ if (vector != NULL) for (i = 0; i < iarray->dimension; i++) iarray->last[i] = vector[i]; /*********************** * update array offset * ***********************/ iarray->offset++; /********************************** * return pointer to last element * **********************************/ return iarray->last; } /***************** external function ******************** * * ********************************************************/ void gamgi_engine_iarray_pop (gamgi_iarray *iarray, int offset) { /************************************************************ * memory is not deallocated, to avoid expensive reallocs * * when the array is reused, only offset and last are reset * ************************************************************/ iarray->offset = offset; if (offset == 0) iarray->last = NULL; else iarray->last = iarray->array + (offset - 1) * iarray->dimension; } /***************** external function ******************** * * ********************************************************/ void gamgi_engine_iarray_remove (gamgi_iarray *iarray) { free (iarray->array); free (iarray); } /***************** external function ******************** * * ********************************************************/ void gamgi_engine_iarray_copy_remove (gamgi_iarray *iarray, int **array, int *size) { *array = iarray->array; *size = iarray->offset; free (iarray); } /***************** external function ******************** * * ********************************************************/ gamgi_darray *gamgi_engine_darray_create (int size, int increment, int dimension) { gamgi_darray *darray = (gamgi_darray *) malloc (sizeof (gamgi_darray)); darray->array = (double *) malloc (size * dimension * sizeof (double)); static_darray_start (darray, size, increment, dimension); return darray; } /***************** external function ******************** * * ********************************************************/ gamgi_darray *gamgi_engine_darray_recreate (gamgi_darray *darray, int size, int increment, int dimension) { darray->array = (double *) realloc (darray->array, size * dimension * sizeof (double)); darray->size = size; darray->increment = increment; darray->dimension = dimension; darray->offset = size; /******************************* * set pointer to last element * *******************************/ darray->last = darray->array + darray->offset * darray->dimension; return darray; } /***************** external function ******************** * * ********************************************************/ double *gamgi_engine_darray_push (gamgi_darray *darray, double *vector) { int i; /*********************************** * enlarge full array, adding more * * (user-controled) step elements * ***********************************/ if (darray->offset == darray->size) { darray->size += darray->increment; darray->array = (double *) realloc (darray->array, darray->size * darray->dimension * sizeof (double)); } /******************************* * set pointer to last element * *******************************/ darray->last = darray->array + darray->offset * darray->dimension; /***************************** * copy data to last element * *****************************/ if (vector != NULL) for (i = 0; i < darray->dimension; i++) darray->last[i] = vector[i]; /*********************** * update array offset * ***********************/ darray->offset++; /********************************** * return pointer to last element * **********************************/ return darray->last; } /***************** external function ******************** * * ********************************************************/ void gamgi_engine_darray_pop (gamgi_darray *darray, int offset) { /************************************************************ * memory is not deallocated, to avoid expensive reallocs * * when the array is reused, only offset and last are reset * ************************************************************/ darray->offset = offset; if (offset == 0) darray->last = NULL; else darray->last = darray->array + (offset - 1) * darray->dimension; } /***************** external function ******************** * * ********************************************************/ void gamgi_engine_darray_remove (gamgi_darray *darray) { free (darray->array); free (darray); } /***************** external function ******************** * * ********************************************************/ void gamgi_engine_darray_copy_remove (gamgi_darray *darray, double **array, int *size) { *array = darray->array; *size = darray->offset; free (darray); } gamgi0.17.1g/src/engine/gamgi_engine_unlink.c0000644000175000017500000011520410363030162020474 0ustar carloscarlos/******************************************* * * $GAMGI/src/engine/gamgi_engine_unlink.c * * Copyright (C) 2001, 2004 Carlos Pereira * * Distributed under the terms of the GNU * General Public License: $GAMGI/LICENSE * */ #include "gamgi_engine.h" #include "gamgi_engine_list.h" void gamgi_engine_unlink_text (gamgi_text *text) { gamgi_dlist *dlist; gamgi_object *object; gamgi_text *parent_text; gamgi_orbital *parent_orbital; gamgi_bond *parent_bond; gamgi_atom *parent_atom; gamgi_direction *parent_direction; gamgi_plane *parent_plane; gamgi_group *parent_group; gamgi_molecule *parent_molecule; gamgi_cluster *parent_cluster; gamgi_cell *parent_cell; gamgi_arrow *parent_arrow; gamgi_shape *parent_shape; gamgi_graph *parent_graph; gamgi_assembly *parent_assembly; gamgi_layer *parent_layer; object = text->object.object; dlist = text->object.dlist; /****************************************************** * If this is the last object in the parent list * * then the queue end must point to the object before * ******************************************************/ if (dlist->next == NULL) { switch (object->class) { case GAMGI_ENGINE_TEXT: parent_text = GAMGI_CAST_TEXT object; parent_text->text_end = dlist->before; break; case GAMGI_ENGINE_ORBITAL: parent_orbital = GAMGI_CAST_ORBITAL object; parent_orbital->text_end = dlist->before; break; case GAMGI_ENGINE_BOND: parent_bond = GAMGI_CAST_BOND object; parent_bond->text_end = dlist->before; break; case GAMGI_ENGINE_ATOM: parent_atom = GAMGI_CAST_ATOM object; parent_atom->text_end = dlist->before; break; case GAMGI_ENGINE_DIRECTION: parent_direction = GAMGI_CAST_DIRECTION object; parent_direction->text_end = dlist->before; break; case GAMGI_ENGINE_PLANE: parent_plane = GAMGI_CAST_PLANE object; parent_plane->text_end = dlist->before; break; case GAMGI_ENGINE_GROUP: parent_group = GAMGI_CAST_GROUP object; parent_group->text_end = dlist->before; break; case GAMGI_ENGINE_MOLECULE: parent_molecule = GAMGI_CAST_MOLECULE object; parent_molecule->text_end = dlist->before; break; case GAMGI_ENGINE_CLUSTER: parent_cluster = GAMGI_CAST_CLUSTER object; parent_cluster->text_end = dlist->before; break; case GAMGI_ENGINE_ARROW: parent_arrow = GAMGI_CAST_ARROW object; parent_arrow->text_end = dlist->before; break; case GAMGI_ENGINE_SHAPE: parent_shape = GAMGI_CAST_SHAPE object; parent_shape->text_end = dlist->before; break; case GAMGI_ENGINE_GRAPH: parent_graph = GAMGI_CAST_GRAPH object; parent_graph->text_end = dlist->before; break; case GAMGI_ENGINE_ASSEMBLY: parent_assembly = GAMGI_CAST_ASSEMBLY object; parent_assembly->text_end = dlist->before; break; case GAMGI_ENGINE_LAYER: parent_layer = GAMGI_CAST_LAYER object; parent_layer->text_end = dlist->before; break; } } /****************************************************** * If this is the first object in the parent list * * then the queue start must point to the object next * ******************************************************/ if (dlist->before == NULL) { switch (object->class) { case GAMGI_ENGINE_TEXT: parent_text = GAMGI_CAST_TEXT object; parent_text->text_start = dlist->next; break; case GAMGI_ENGINE_ORBITAL: parent_orbital = GAMGI_CAST_ORBITAL object; parent_orbital->text_start = dlist->next; break; case GAMGI_ENGINE_BOND: parent_bond = GAMGI_CAST_BOND object; parent_bond->text_start = dlist->next; break; case GAMGI_ENGINE_ATOM: parent_atom = GAMGI_CAST_ATOM object; parent_atom->text_start = dlist->next; break; case GAMGI_ENGINE_DIRECTION: parent_direction = GAMGI_CAST_DIRECTION object; parent_direction->text_start = dlist->next; break; case GAMGI_ENGINE_PLANE: parent_plane = GAMGI_CAST_PLANE object; parent_plane->text_start = dlist->next; break; case GAMGI_ENGINE_GROUP: parent_group = GAMGI_CAST_GROUP object; parent_group->text_start = dlist->next; break; case GAMGI_ENGINE_MOLECULE: parent_molecule = GAMGI_CAST_MOLECULE object; parent_molecule->text_start = dlist->next; break; case GAMGI_ENGINE_CLUSTER: parent_cluster = GAMGI_CAST_CLUSTER object; parent_cluster->text_start = dlist->next; break; case GAMGI_ENGINE_CELL: parent_cell = GAMGI_CAST_CELL object; parent_cell->text_start = dlist->next; break; case GAMGI_ENGINE_ARROW: parent_arrow = GAMGI_CAST_ARROW object; parent_arrow->text_start = dlist->next; break; case GAMGI_ENGINE_SHAPE: parent_shape = GAMGI_CAST_SHAPE object; parent_shape->text_start = dlist->next; break; case GAMGI_ENGINE_GRAPH: parent_graph = GAMGI_CAST_GRAPH object; parent_graph->text_start = dlist->next; break; case GAMGI_ENGINE_ASSEMBLY: parent_assembly = GAMGI_CAST_ASSEMBLY object; parent_assembly->text_start = dlist->next; break; case GAMGI_ENGINE_LAYER: parent_layer = GAMGI_CAST_LAYER object; parent_layer->text_start = dlist->next; break; } } /************************************ * remove node from parent list and * * reset child links to parent * ************************************/ gamgi_engine_dlist_remove_start (dlist); text->object.object = NULL; text->object.dlist = NULL; } void gamgi_engine_unlink_orbital (gamgi_orbital *orbital) { gamgi_dlist *dlist; gamgi_object *object; gamgi_bond *parent_bond; gamgi_atom *parent_atom; gamgi_direction *parent_direction; gamgi_plane *parent_plane; gamgi_group *parent_group; gamgi_molecule *parent_molecule; gamgi_cluster *parent_cluster; gamgi_cell *parent_cell; gamgi_assembly *parent_assembly; gamgi_layer *parent_layer; object = orbital->object.object; dlist = orbital->object.dlist; /****************************************************** * If this is the last object in the parent list * * then the queue end must point to the object before * ******************************************************/ if (dlist->next == NULL) { switch (object->class) { case GAMGI_ENGINE_BOND: parent_bond = GAMGI_CAST_BOND object; parent_bond->orbital_end = dlist->before; break; case GAMGI_ENGINE_ATOM: parent_atom = GAMGI_CAST_ATOM object; parent_atom->orbital_end = dlist->before; break; case GAMGI_ENGINE_DIRECTION: parent_direction = GAMGI_CAST_DIRECTION object; parent_direction->orbital_end = dlist->before; break; case GAMGI_ENGINE_PLANE: parent_plane = GAMGI_CAST_PLANE object; parent_plane->orbital_end = dlist->before; break; case GAMGI_ENGINE_GROUP: parent_group = GAMGI_CAST_GROUP object; parent_group->orbital_end = dlist->before; break; case GAMGI_ENGINE_MOLECULE: parent_molecule = GAMGI_CAST_MOLECULE object; parent_molecule->orbital_end = dlist->before; break; case GAMGI_ENGINE_CLUSTER: parent_cluster = GAMGI_CAST_CLUSTER object; parent_cluster->orbital_end = dlist->before; break; case GAMGI_ENGINE_CELL: parent_cell = GAMGI_CAST_CELL object; parent_cell->orbital_end = dlist->before; break; case GAMGI_ENGINE_ASSEMBLY: parent_assembly = GAMGI_CAST_ASSEMBLY object; parent_assembly->orbital_end = dlist->before; break; case GAMGI_ENGINE_LAYER: parent_layer = GAMGI_CAST_LAYER object; parent_layer->orbital_end = dlist->before; break; } } /****************************************************** * If this is the first object in the parent list * * then the queue start must point to the object next * ******************************************************/ if (dlist->before == NULL) { switch (object->class) { case GAMGI_ENGINE_BOND: parent_bond = GAMGI_CAST_BOND object; parent_bond->orbital_start = dlist->next; break; case GAMGI_ENGINE_ATOM: parent_atom = GAMGI_CAST_ATOM object; parent_atom->orbital_start = dlist->next; break; case GAMGI_ENGINE_DIRECTION: parent_direction = GAMGI_CAST_DIRECTION object; parent_direction->orbital_start = dlist->next; break; case GAMGI_ENGINE_PLANE: parent_plane = GAMGI_CAST_PLANE object; parent_plane->orbital_start = dlist->next; break; case GAMGI_ENGINE_GROUP: parent_group = GAMGI_CAST_GROUP object; parent_group->orbital_start = dlist->next; break; case GAMGI_ENGINE_MOLECULE: parent_molecule = GAMGI_CAST_MOLECULE object; parent_molecule->orbital_start = dlist->next; break; case GAMGI_ENGINE_CLUSTER: parent_cluster = GAMGI_CAST_CLUSTER object; parent_cluster->orbital_start = dlist->next; break; case GAMGI_ENGINE_CELL: parent_cell = GAMGI_CAST_CELL object; parent_cell->orbital_start = dlist->next; break; case GAMGI_ENGINE_ASSEMBLY: parent_assembly = GAMGI_CAST_ASSEMBLY object; parent_assembly->orbital_start = dlist->next; break; case GAMGI_ENGINE_LAYER: parent_layer = GAMGI_CAST_LAYER object; parent_layer->orbital_start = dlist->next; break; } } /************************************ * remove node from parent list and * * reset child links to parent * ************************************/ gamgi_engine_dlist_remove_start (dlist); orbital->object.object = NULL; orbital->object.dlist = NULL; } void gamgi_engine_unlink_bond (gamgi_bond *bond) { gamgi_dlist *dlist1, *dlist2; gamgi_atom *atom1, *atom2; atom1 = bond->atom1; atom2 = bond->atom2; dlist1 = bond->dlist1; dlist2 = bond->dlist2; /****************************************************** * If this is the last object in the parent list * * then the queue end must point to the object before * ******************************************************/ if (dlist1->next == NULL) atom1->bond_end = dlist1->before; if (dlist2->next == NULL) atom2->bond_end = dlist2->before; /****************************************************** * If this is the first object in the parent list * * then the queue start must point to the object next * ******************************************************/ if (dlist1->before == NULL) atom1->bond_start = dlist1->next; if (dlist2->before == NULL) atom2->bond_start = dlist2->next; /************************************ * remove node from parents list * * and reset child links to parents * ************************************/ gamgi_engine_dlist_remove_start (dlist1); gamgi_engine_dlist_remove_start (dlist2); bond->atom1 = NULL; bond->atom2 = NULL; bond->dlist1 = NULL; bond->dlist2 = NULL; } void gamgi_engine_unlink_atom (gamgi_atom *atom) { gamgi_dlist *dlist; gamgi_object *object; gamgi_direction *parent_direction; gamgi_plane *parent_plane; gamgi_group *parent_group; gamgi_molecule *parent_molecule; gamgi_cluster *parent_cluster; gamgi_cell *parent_cell; gamgi_assembly *parent_assembly; gamgi_layer *parent_layer; object = atom->object.object; dlist = atom->object.dlist; /****************************************************** * If this is the last object in the parent list * * then the queue end must point to the object before * ******************************************************/ if (dlist->next == NULL) { switch (object->class) { case GAMGI_ENGINE_DIRECTION: parent_direction = GAMGI_CAST_DIRECTION object; parent_direction->atom_end = dlist->before; break; case GAMGI_ENGINE_PLANE: parent_plane = GAMGI_CAST_PLANE object; parent_plane->atom_end = dlist->before; break; case GAMGI_ENGINE_GROUP: parent_group = GAMGI_CAST_GROUP object; parent_group->atom_end = dlist->before; break; case GAMGI_ENGINE_MOLECULE: parent_molecule = GAMGI_CAST_MOLECULE object; parent_molecule->atom_end = dlist->before; break; case GAMGI_ENGINE_CLUSTER: parent_cluster = GAMGI_CAST_CLUSTER object; parent_cluster->atom_end = dlist->before; break; case GAMGI_ENGINE_CELL: parent_cell = GAMGI_CAST_CELL object; parent_cell->atom_end = dlist->before; break; case GAMGI_ENGINE_ASSEMBLY: parent_assembly = GAMGI_CAST_ASSEMBLY object; parent_assembly->atom_end = dlist->before; break; case GAMGI_ENGINE_LAYER: parent_layer = GAMGI_CAST_LAYER object; parent_layer->atom_end = dlist->before; break; } } /****************************************************** * If this is the first object in the parent list * * then the queue start must point to the object next * ******************************************************/ if (dlist->before == NULL) { switch (object->class) { case GAMGI_ENGINE_DIRECTION: parent_direction = GAMGI_CAST_DIRECTION object; parent_direction->atom_start = dlist->next; break; case GAMGI_ENGINE_PLANE: parent_plane = GAMGI_CAST_PLANE object; parent_plane->atom_start = dlist->next; break; case GAMGI_ENGINE_GROUP: parent_group = GAMGI_CAST_GROUP object; parent_group->atom_start= dlist->next; break; case GAMGI_ENGINE_MOLECULE: parent_molecule = GAMGI_CAST_MOLECULE object; parent_molecule->atom_start = dlist->next; break; case GAMGI_ENGINE_CLUSTER: parent_cluster = GAMGI_CAST_CLUSTER object; parent_cluster->atom_start = dlist->next; break; case GAMGI_ENGINE_CELL: parent_cell = GAMGI_CAST_CELL object; parent_cell->atom_start = dlist->next; break; case GAMGI_ENGINE_ASSEMBLY: parent_assembly = GAMGI_CAST_ASSEMBLY object; parent_assembly->atom_start = dlist->next; break; case GAMGI_ENGINE_LAYER: parent_layer = GAMGI_CAST_LAYER object; parent_layer->atom_start = dlist->next; break; } } /************************************ * remove node from parent list and * * reset child links to parent * ************************************/ gamgi_engine_dlist_remove_start (dlist); atom->object.object = NULL; atom->object.dlist = NULL; } void gamgi_engine_unlink_direction (gamgi_direction *direction) { gamgi_dlist *dlist; gamgi_object *object; gamgi_plane *parent_plane; gamgi_group *parent_group; gamgi_molecule *parent_molecule; gamgi_cluster *parent_cluster; gamgi_cell *parent_cell; gamgi_assembly *parent_assembly; gamgi_layer *parent_layer; object = direction->object.object; dlist = direction->object.dlist; /****************************************************** * If this is the last object in the parent list * * then the queue end must point to the object before * ******************************************************/ if (dlist->next == NULL) { switch (object->class) { case GAMGI_ENGINE_PLANE: parent_plane = GAMGI_CAST_PLANE object; parent_plane->direction_end = dlist->before; break; case GAMGI_ENGINE_GROUP: parent_group = GAMGI_CAST_GROUP object; parent_group->direction_end = dlist->before; break; case GAMGI_ENGINE_MOLECULE: parent_molecule = GAMGI_CAST_MOLECULE object; parent_molecule->direction_end = dlist->before; break; case GAMGI_ENGINE_CLUSTER: parent_cluster = GAMGI_CAST_CLUSTER object; parent_cluster->direction_end = dlist->before; break; case GAMGI_ENGINE_CELL: parent_cell = GAMGI_CAST_CELL object; parent_cell->direction_end = dlist->before; break; case GAMGI_ENGINE_ASSEMBLY: parent_assembly = GAMGI_CAST_ASSEMBLY object; parent_assembly->direction_end = dlist->before; break; case GAMGI_ENGINE_LAYER: parent_layer = GAMGI_CAST_LAYER object; parent_layer->direction_end = dlist->before; break; } } /****************************************************** * If this is the first object in the parent list * * then the queue start must point to the object next * ******************************************************/ if (dlist->before == NULL) { switch (object->class) { case GAMGI_ENGINE_PLANE: parent_plane = GAMGI_CAST_PLANE object; parent_plane->direction_start = dlist->next; break; case GAMGI_ENGINE_GROUP: parent_group = GAMGI_CAST_GROUP object; parent_group->direction_start = dlist->next; break; case GAMGI_ENGINE_MOLECULE: parent_molecule = GAMGI_CAST_MOLECULE object; parent_molecule->direction_start = dlist->next; break; case GAMGI_ENGINE_CLUSTER: parent_cluster = GAMGI_CAST_CLUSTER object; parent_cluster->direction_start = dlist->next; break; case GAMGI_ENGINE_CELL: parent_cell = GAMGI_CAST_CELL object; parent_cell->direction_start = dlist->next; break; case GAMGI_ENGINE_ASSEMBLY: parent_assembly = GAMGI_CAST_ASSEMBLY object; parent_assembly->direction_start = dlist->next; break; case GAMGI_ENGINE_LAYER: parent_layer = GAMGI_CAST_LAYER object; parent_layer->direction_start = dlist->next; break; } } /************************************ * remove node from parent list and * * reset child links to parent * ************************************/ gamgi_engine_dlist_remove_start (dlist); direction->object.object = NULL; direction->object.dlist = NULL; } void gamgi_engine_unlink_plane (gamgi_plane *plane) { gamgi_dlist *dlist; gamgi_object *object; gamgi_group *parent_group; gamgi_molecule *parent_molecule; gamgi_cluster *parent_cluster; gamgi_cell *parent_cell; gamgi_assembly *parent_assembly; gamgi_layer *parent_layer; object = plane->object.object; dlist = plane->object.dlist; /****************************************************** * If this is the last object in the parent list * * then the queue end must point to the object before * ******************************************************/ if (dlist->next == NULL) { switch (object->class) { case GAMGI_ENGINE_GROUP: parent_group = GAMGI_CAST_GROUP object; parent_group->plane_end = dlist->before; break; case GAMGI_ENGINE_MOLECULE: parent_molecule = GAMGI_CAST_MOLECULE object; parent_molecule->plane_end = dlist->before; break; case GAMGI_ENGINE_CLUSTER: parent_cluster = GAMGI_CAST_CLUSTER object; parent_cluster->plane_end = dlist->before; break; case GAMGI_ENGINE_CELL: parent_cell = GAMGI_CAST_CELL object; parent_cell->plane_end = dlist->before; break; case GAMGI_ENGINE_ASSEMBLY: parent_assembly = GAMGI_CAST_ASSEMBLY object; parent_assembly->plane_end = dlist->before; break; case GAMGI_ENGINE_LAYER: parent_layer = GAMGI_CAST_LAYER object; parent_layer->plane_end = dlist->before; break; } } /****************************************************** * If this is the first object in the parent list * * then the queue start must point to the object next * ******************************************************/ if (dlist->before == NULL) { switch (object->class) { case GAMGI_ENGINE_GROUP: parent_group = GAMGI_CAST_GROUP object; parent_group->plane_start = dlist->next; break; case GAMGI_ENGINE_MOLECULE: parent_molecule = GAMGI_CAST_MOLECULE object; parent_molecule->plane_start = dlist->next; break; case GAMGI_ENGINE_CLUSTER: parent_cluster = GAMGI_CAST_CLUSTER object; parent_cluster->plane_start = dlist->next; break; case GAMGI_ENGINE_CELL: parent_cell = GAMGI_CAST_CELL object; parent_cell->plane_start = dlist->next; break; case GAMGI_ENGINE_ASSEMBLY: parent_assembly = GAMGI_CAST_ASSEMBLY object; parent_assembly->plane_start = dlist->next; break; case GAMGI_ENGINE_LAYER: parent_layer = GAMGI_CAST_LAYER object; parent_layer->plane_start = dlist->next; break; } } /************************************ * remove node from parent list and * * reset child links to parent * ************************************/ gamgi_engine_dlist_remove_start (dlist); plane->object.object = NULL; plane->object.dlist = NULL; } void gamgi_engine_unlink_group (gamgi_group *group) { gamgi_dlist *dlist; gamgi_object *object; gamgi_group *parent_group; gamgi_molecule *parent_molecule; gamgi_cluster *parent_cluster; gamgi_cell *parent_cell; gamgi_assembly *parent_assembly; gamgi_layer *parent_layer; object = group->object.object; dlist = group->object.dlist; /****************************************************** * If this is the last object in the parent list * * then the queue end must point to the object before * ******************************************************/ if (dlist->next == NULL) { switch (object->class) { case GAMGI_ENGINE_GROUP: parent_group = GAMGI_CAST_GROUP object; parent_group->group_end = dlist->before; break; case GAMGI_ENGINE_MOLECULE: parent_molecule = GAMGI_CAST_MOLECULE object; parent_molecule->group_end = dlist->before; break; case GAMGI_ENGINE_CLUSTER: parent_cluster = GAMGI_CAST_CLUSTER object; parent_cluster->group_end = dlist->before; break; case GAMGI_ENGINE_CELL: parent_cell = GAMGI_CAST_CELL object; parent_cell->group_end = dlist->before; break; case GAMGI_ENGINE_ASSEMBLY: parent_assembly = GAMGI_CAST_ASSEMBLY object; parent_assembly->group_end = dlist->before; break; case GAMGI_ENGINE_LAYER: parent_layer = GAMGI_CAST_LAYER object; parent_layer->group_end = dlist->before; break; } } /****************************************************** * If this is the first object in the parent list * * then the queue start must point to the object next * ******************************************************/ if (dlist->before == NULL) { switch (object->class) { case GAMGI_ENGINE_GROUP: parent_group = GAMGI_CAST_GROUP object; parent_group->group_start = dlist->next; break; case GAMGI_ENGINE_MOLECULE: parent_molecule = GAMGI_CAST_MOLECULE object; parent_molecule->group_start = dlist->next; break; case GAMGI_ENGINE_CLUSTER: parent_cluster = GAMGI_CAST_CLUSTER object; parent_cluster->group_start = dlist->next; break; case GAMGI_ENGINE_CELL: parent_cell = GAMGI_CAST_CELL object; parent_cell->group_start = dlist->next; break; case GAMGI_ENGINE_ASSEMBLY: parent_assembly = GAMGI_CAST_ASSEMBLY object; parent_assembly->group_start = dlist->next; break; case GAMGI_ENGINE_LAYER: parent_layer = GAMGI_CAST_LAYER object; parent_layer->group_start = dlist->next; break; } } /************************************ * remove node from parent list and * * reset child links to parent * ************************************/ gamgi_engine_dlist_remove_start (dlist); group->object.object = NULL; group->object.dlist = NULL; } void gamgi_engine_unlink_molecule (gamgi_molecule *molecule) { gamgi_dlist *dlist; gamgi_object *object; gamgi_cluster *parent_cluster; gamgi_cell *parent_cell; gamgi_assembly *parent_assembly; gamgi_layer *parent_layer; object = molecule->object.object; dlist = molecule->object.dlist; /****************************************************** * If this is the last object in the parent list * * then the queue end must point to the object before * ******************************************************/ if (dlist->next == NULL) { switch (object->class) { case GAMGI_ENGINE_CLUSTER: parent_cluster = GAMGI_CAST_CLUSTER object; parent_cluster->molecule_end = dlist->before; break; case GAMGI_ENGINE_CELL: parent_cell = GAMGI_CAST_CELL object; parent_cell->molecule_end = dlist->before; break; case GAMGI_ENGINE_ASSEMBLY: parent_assembly = GAMGI_CAST_ASSEMBLY object; parent_assembly->molecule_end = dlist->before; break; case GAMGI_ENGINE_LAYER: parent_layer = GAMGI_CAST_LAYER object; parent_layer->molecule_end = dlist->before; break; } } /****************************************************** * If this is the first object in the parent list * * then the queue start must point to the object next * ******************************************************/ if (dlist->before == NULL) { switch (object->class) { case GAMGI_ENGINE_CLUSTER: parent_cluster = GAMGI_CAST_CLUSTER object; parent_cluster->molecule_start = dlist->next; break; case GAMGI_ENGINE_CELL: parent_cell = GAMGI_CAST_CELL object; parent_cell->molecule_start = dlist->next; break; case GAMGI_ENGINE_ASSEMBLY: parent_assembly = GAMGI_CAST_ASSEMBLY object; parent_assembly->molecule_start = dlist->next; break; case GAMGI_ENGINE_LAYER: parent_layer = GAMGI_CAST_LAYER object; parent_layer->molecule_start = dlist->next; break; } } /************************************ * remove node from parent list and * * reset child links to parent * ************************************/ gamgi_engine_dlist_remove_start (dlist); molecule->object.object = NULL; molecule->object.dlist = NULL; } void gamgi_engine_unlink_cluster (gamgi_cluster *cluster) { gamgi_dlist *dlist; gamgi_object *object; gamgi_cluster *parent_cluster; gamgi_cell *parent_cell; gamgi_assembly *parent_assembly; gamgi_layer *parent_layer; object = cluster->object.object; dlist = cluster->object.dlist; /****************************************************** * If this is the last object in the parent list * * then the queue end must point to the object before * ******************************************************/ if (dlist->next == NULL) { switch (object->class) { case GAMGI_ENGINE_CLUSTER: parent_cluster = GAMGI_CAST_CLUSTER object; parent_cluster->cluster_end = dlist->before; break; case GAMGI_ENGINE_CELL: parent_cell = GAMGI_CAST_CELL object; parent_cell->cluster_end = dlist->before; break; case GAMGI_ENGINE_ASSEMBLY: parent_assembly = GAMGI_CAST_ASSEMBLY object; parent_assembly->cluster_end = dlist->before; break; case GAMGI_ENGINE_LAYER: parent_layer = GAMGI_CAST_LAYER object; parent_layer->cluster_end = dlist->before; break; } } /****************************************************** * If this is the first object in the parent list * * then the queue start must point to the object next * ******************************************************/ if (dlist->before == NULL) { switch (object->class) { case GAMGI_ENGINE_CLUSTER: parent_cluster = GAMGI_CAST_CLUSTER object; parent_cluster->cluster_start = dlist->next; break; case GAMGI_ENGINE_CELL: parent_cell = GAMGI_CAST_CELL object; parent_cell->cluster_start = dlist->next; break; case GAMGI_ENGINE_ASSEMBLY: parent_assembly = GAMGI_CAST_ASSEMBLY object; parent_assembly->cluster_start = dlist->next; break; case GAMGI_ENGINE_LAYER: parent_layer = GAMGI_CAST_LAYER object; parent_layer->cluster_start = dlist->next; break; } } /************************************ * remove node from parent list and * * reset child links to parent * ************************************/ gamgi_engine_dlist_remove_start (dlist); cluster->object.object = NULL; cluster->object.dlist = NULL; } void gamgi_engine_unlink_cell (gamgi_cell *cell) { gamgi_dlist *dlist; gamgi_object *object; gamgi_assembly *parent_assembly; gamgi_layer *parent_layer; object = cell->object.object; dlist = cell->object.dlist; /****************************************************** * If this is the last object in the parent list * * then the queue end must point to the object before * ******************************************************/ if (dlist->next == NULL) { switch (object->class) { case GAMGI_ENGINE_ASSEMBLY: parent_assembly = GAMGI_CAST_ASSEMBLY object; parent_assembly->cell_end = dlist->before; break; case GAMGI_ENGINE_LAYER: parent_layer = GAMGI_CAST_LAYER object; parent_layer->cell_end = dlist->before; break; } } /****************************************************** * If this is the first object in the parent list * * then the queue start must point to the object next * ******************************************************/ if (dlist->before == NULL) { switch (object->class) { case GAMGI_ENGINE_ASSEMBLY: parent_assembly = GAMGI_CAST_ASSEMBLY object; parent_assembly->cell_start = dlist->next; break; case GAMGI_ENGINE_LAYER: parent_layer = GAMGI_CAST_LAYER object; parent_layer->cell_start = dlist->next; break; } } /************************************ * remove node from parent list and * * reset child links to parent * ************************************/ gamgi_engine_dlist_remove_start (dlist); cell->object.object = NULL; cell->object.dlist = NULL; } void gamgi_engine_unlink_arrow (gamgi_arrow *arrow) { gamgi_dlist *dlist; gamgi_object *object; gamgi_assembly *parent_assembly; gamgi_layer *parent_layer; object = arrow->object.object; dlist = arrow->object.dlist; /****************************************************** * If this is the last object in the parent list * * then the queue end must point to the object before * ******************************************************/ if (dlist->next == NULL) { switch (object->class) { case GAMGI_ENGINE_ASSEMBLY: parent_assembly = GAMGI_CAST_ASSEMBLY object; parent_assembly->arrow_end = dlist->before; break; case GAMGI_ENGINE_LAYER: parent_layer = GAMGI_CAST_LAYER object; parent_layer->arrow_end = dlist->before; break; } } /****************************************************** * If this is the first object in the parent list * * then the queue start must point to the object next * ******************************************************/ if (dlist->before == NULL) { switch (object->class) { case GAMGI_ENGINE_ASSEMBLY: parent_assembly = GAMGI_CAST_ASSEMBLY object; parent_assembly->arrow_start = dlist->next; break; case GAMGI_ENGINE_LAYER: parent_layer = GAMGI_CAST_LAYER object; parent_layer->arrow_start = dlist->next; break; } } /************************************ * remove node from parent list and * * reset child links to parent * ************************************/ gamgi_engine_dlist_remove_start (dlist); arrow->object.object = NULL; arrow->object.dlist = NULL; } void gamgi_engine_unlink_shape (gamgi_shape *shape) { gamgi_dlist *dlist; gamgi_object *object; gamgi_assembly *parent_assembly; gamgi_layer *parent_layer; object = shape->object.object; dlist = shape->object.dlist; /****************************************************** * If this is the last object in the parent list * * then the queue end must point to the object before * ******************************************************/ if (dlist->next == NULL) { switch (object->class) { case GAMGI_ENGINE_ASSEMBLY: parent_assembly = GAMGI_CAST_ASSEMBLY object; parent_assembly->shape_end = dlist->before; break; case GAMGI_ENGINE_LAYER: parent_layer = GAMGI_CAST_LAYER object; parent_layer->shape_end = dlist->before; break; } } /****************************************************** * If this is the first object in the parent list * * then the queue start must point to the object next * ******************************************************/ if (dlist->before == NULL) { switch (object->class) { case GAMGI_ENGINE_ASSEMBLY: parent_assembly = GAMGI_CAST_ASSEMBLY object; parent_assembly->shape_start = dlist->next; break; case GAMGI_ENGINE_LAYER: parent_layer = GAMGI_CAST_LAYER object; parent_layer->shape_start = dlist->next; break; } } /************************************ * remove node from parent list and * * reset child links to parent * ************************************/ gamgi_engine_dlist_remove_start (dlist); shape->object.object = NULL; shape->object.dlist = NULL; } void gamgi_engine_unlink_graph (gamgi_graph *graph) { gamgi_dlist *dlist; gamgi_object *object; gamgi_assembly *parent_assembly; gamgi_layer *parent_layer; object = graph->object.object; dlist = graph->object.dlist; /****************************************************** * If this is the last object in the parent list * * then the queue end must point to the object before * ******************************************************/ if (dlist->next == NULL) { switch (object->class) { case GAMGI_ENGINE_ASSEMBLY: parent_assembly = GAMGI_CAST_ASSEMBLY object; parent_assembly->graph_end = dlist->before; break; case GAMGI_ENGINE_LAYER: parent_layer = GAMGI_CAST_LAYER object; parent_layer->graph_end = dlist->before; break; } } /****************************************************** * If this is the first object in the parent list * * then the queue start must point to the object next * ******************************************************/ if (dlist->before == NULL) { switch (object->class) { case GAMGI_ENGINE_ASSEMBLY: parent_assembly = GAMGI_CAST_ASSEMBLY object; parent_assembly->graph_start = dlist->next; break; case GAMGI_ENGINE_LAYER: parent_layer = GAMGI_CAST_LAYER object; parent_layer->graph_start = dlist->next; break; } } /************************************ * remove node from parent list and * * reset child links to parent * ************************************/ gamgi_engine_dlist_remove_start (dlist); graph->object.object = NULL; graph->object.dlist = NULL; } void gamgi_engine_unlink_assembly (gamgi_assembly *assembly) { gamgi_dlist *dlist; gamgi_object *object; gamgi_assembly *parent_assembly; gamgi_layer *parent_layer; object = assembly->object.object; dlist = assembly->object.dlist; /****************************************************** * If this is the last object in the parent list * * then the queue end must point to the object before * ******************************************************/ if (dlist->next == NULL) { switch (object->class) { case GAMGI_ENGINE_ASSEMBLY: parent_assembly = GAMGI_CAST_ASSEMBLY object; parent_assembly->assembly_end = dlist->before; break; case GAMGI_ENGINE_LAYER: parent_layer = GAMGI_CAST_LAYER object; parent_layer->assembly_end = dlist->before; break; } } /****************************************************** * If this is the first object in the parent list * * then the queue start must point to the object next * ******************************************************/ if (dlist->before == NULL) { switch (object->class) { case GAMGI_ENGINE_ASSEMBLY: parent_assembly = GAMGI_CAST_ASSEMBLY object; parent_assembly->assembly_start = dlist->next; break; case GAMGI_ENGINE_LAYER: parent_layer = GAMGI_CAST_LAYER object; parent_layer->assembly_start = dlist->next; break; } } /************************************ * remove node from parent list and * * reset child links to parent * ************************************/ gamgi_engine_dlist_remove_start (dlist); assembly->object.object = NULL; assembly->object.dlist = NULL; } void gamgi_engine_unlink_light (gamgi_light *light) { gamgi_dlist *dlist; gamgi_object *object; gamgi_layer *parent_layer; object = light->object.object; dlist = light->object.dlist; /****************************************************** * If this is the last object in the parent list * * then the queue end must point to the object before * ******************************************************/ if (dlist->next == NULL) { parent_layer = GAMGI_CAST_LAYER object; parent_layer->light_end = dlist->before; } /****************************************************** * If this is the first object in the parent list * * then the queue start must point to the object next * ******************************************************/ if (dlist->before == NULL) { parent_layer = GAMGI_CAST_LAYER object; parent_layer->light_start = dlist->next; } /************************************ * remove node from parent list and * * reset child links to parent * ************************************/ gamgi_engine_dlist_remove_start (dlist); light->object.object = NULL; light->object.dlist = NULL; } void gamgi_engine_unlink_layer (gamgi_layer *layer) { gamgi_dlist *dlist; gamgi_object *object; gamgi_window *parent_window; object = layer->object.object; dlist = layer->object.dlist; /****************************************************** * If this is the last object in the parent list * * then the queue end must point to the object before * ******************************************************/ if (dlist->next == NULL) { parent_window = GAMGI_CAST_WINDOW object; parent_window->layer_end = dlist->before; } /****************************************************** * If this is the first object in the parent list * * then the queue start must point to the object next * ******************************************************/ if (dlist->before == NULL) { parent_window = GAMGI_CAST_WINDOW object; parent_window->layer_start = dlist->next; } /************************************ * remove node from parent list and * * reset child links to parent * ************************************/ gamgi_engine_dlist_remove_start (dlist); layer->object.object = NULL; layer->object.dlist = NULL; } void gamgi_engine_unlink_object (gamgi_object *object) { switch (object->class) { case GAMGI_ENGINE_TEXT: gamgi_engine_unlink_text (GAMGI_CAST_TEXT object); break; case GAMGI_ENGINE_ORBITAL: gamgi_engine_unlink_orbital (GAMGI_CAST_ORBITAL object); break; case GAMGI_ENGINE_BOND: gamgi_engine_unlink_bond (GAMGI_CAST_BOND object); break; case GAMGI_ENGINE_ATOM: gamgi_engine_unlink_atom (GAMGI_CAST_ATOM object); break; case GAMGI_ENGINE_DIRECTION: gamgi_engine_unlink_direction (GAMGI_CAST_DIRECTION object); break; case GAMGI_ENGINE_PLANE: gamgi_engine_unlink_plane (GAMGI_CAST_PLANE object); break; case GAMGI_ENGINE_GROUP: gamgi_engine_unlink_group (GAMGI_CAST_GROUP object); break; case GAMGI_ENGINE_MOLECULE: gamgi_engine_unlink_molecule (GAMGI_CAST_MOLECULE object); break; case GAMGI_ENGINE_CLUSTER: gamgi_engine_unlink_cluster (GAMGI_CAST_CLUSTER object); break; case GAMGI_ENGINE_CELL: gamgi_engine_unlink_cell (GAMGI_CAST_CELL object); break; case GAMGI_ENGINE_ARROW: gamgi_engine_unlink_arrow (GAMGI_CAST_ARROW object); break; case GAMGI_ENGINE_SHAPE: gamgi_engine_unlink_shape (GAMGI_CAST_SHAPE object); break; case GAMGI_ENGINE_GRAPH: gamgi_engine_unlink_graph (GAMGI_CAST_GRAPH object); break; case GAMGI_ENGINE_ASSEMBLY: gamgi_engine_unlink_assembly (GAMGI_CAST_ASSEMBLY object); break; case GAMGI_ENGINE_LIGHT: gamgi_engine_unlink_light (GAMGI_CAST_LIGHT object); break; case GAMGI_ENGINE_LAYER: gamgi_engine_unlink_layer (GAMGI_CAST_LAYER object); break; default: break; } } gamgi0.17.1g/src/engine/gamgi_engine_create.c0000644000175000017500000006065411554622400020454 0ustar carloscarlos/******************************************* * * $GAMGI/src/engine/gamgi_engine_create.c * * Copyright (C) 2001, 2004 Carlos Pereira * * Distributed under the terms of the GNU * General Public License: $GAMGI/LICENSE * */ #include "gamgi_engine.h" #include "gamgi_io.h" #include "gamgi_global.h" #include "gamgi_engine_number.h" #include "gamgi_mesa_text.h" #include "gamgi_chem_atom.h" #include "gamgi_global_create.h" /***************** external function ******************** * * * GAMGI_ENGINE_TEXT_CREATE * * * * Creates an object describing a 2D or 3D text string. * * * ********************************************************/ gamgi_text *gamgi_engine_create_text (void) { gamgi_text *old_text = gamgi->text_end, *text; /******************* * allocate memory * *******************/ text = GAMGI_CAST_TEXT malloc (sizeof (gamgi_text)); /************************* * initialise down links * *************************/ text->text_start = NULL; text->text_end = NULL; /******************** * update text list * ********************/ gamgi->text_end = text; text->before = old_text; text->next = NULL; if (old_text != NULL) old_text->next = text; else gamgi->text_start = text; return text; } /***************** external function ******************* * * * GAMGI_ENGINE_ORBITAL_CREATE * * * * Creates an object describing a 3D chemical orbital. * * * *******************************************************/ gamgi_orbital *gamgi_engine_create_orbital (void) { gamgi_orbital *old_orbital = gamgi->orbital_end, *orbital; /******************* * allocate memory * *******************/ orbital = GAMGI_CAST_ORBITAL malloc (sizeof (gamgi_orbital)); /************************* * initialise down links * *************************/ orbital->text_start = NULL; orbital->text_end = NULL; /*********************** * update orbital list * ***********************/ gamgi->orbital_end = orbital; orbital->before = old_orbital; orbital->next = NULL; if (old_orbital != NULL) old_orbital->next = orbital; else gamgi->orbital_start = orbital; return orbital; } /**************** external function ************* * * * GAMGI_ENGINE_BOND_CREATE * * * * Creates an object describing a chemical bond * * * ************************************************/ gamgi_bond *gamgi_engine_create_bond (void) { gamgi_bond *old_bond = gamgi->bond_end, *bond; /******************* * allocate memory * *******************/ bond = GAMGI_CAST_BOND malloc (sizeof (gamgi_bond)); /************************* * initialise down links * *************************/ bond->text_start = NULL; bond->text_end = NULL; bond->orbital_start = NULL; bond->orbital_end = NULL; /******************** * update bond list * ********************/ gamgi->bond_end = bond; bond->before = old_bond; bond->next = NULL; if (old_bond != NULL) old_bond->next = bond; else gamgi->bond_start = bond; return bond; } /*********** external function *********** * * * GAMGI_ENGINE_ATOM_CREATE * * * * Creates an object describing an atom. * * * *****************************************/ gamgi_atom *gamgi_engine_create_atom (void) { gamgi_atom *old_atom = gamgi->atom_end, *atom; /******************* * allocate memory * *******************/ atom = GAMGI_CAST_ATOM malloc (sizeof (gamgi_atom)); /************************* * initialise down links * *************************/ atom->text_start = NULL; atom->text_end = NULL; atom->orbital_start = NULL; atom->orbital_end = NULL; atom->bond_start = NULL; atom->bond_end = NULL; /******************** * update atom list * ********************/ gamgi->atom_end = atom; atom->before = old_atom; atom->next = NULL; if (old_atom != NULL) old_atom->next = atom; else gamgi->atom_start = atom; return atom; } /********************* external function ********************** * * * GAMGI_ENGINE_DIRECTION_CREATE * * * * Creates an object describing a crystallographic direction. * * * **************************************************************/ gamgi_direction *gamgi_engine_create_direction (void) { gamgi_direction *old_direction = gamgi->direction_end, *direction; /******************* * allocate memory * *******************/ direction = GAMGI_CAST_DIRECTION malloc (sizeof (gamgi_direction)); /************************* * initialise down links * *************************/ direction->text_start = NULL; direction->text_end = NULL; direction->orbital_start = NULL; direction->orbital_end = NULL; direction->bond_start = NULL; direction->bond_end = NULL; direction->atom_start = NULL; direction->atom_end = NULL; /************************* * update direction list * *************************/ gamgi->direction_end = direction; direction->before = old_direction; direction->next = NULL; if (old_direction != NULL) old_direction->next = direction; else gamgi->direction_start = direction; return direction; } /********************* external function ****************** * * * GAMGI_ENGINE_PLANE_CREATE * * * * Creates an object describing a crystallographic plane. * * * **********************************************************/ gamgi_plane *gamgi_engine_create_plane (void) { gamgi_plane *old_plane = gamgi->plane_end, *plane; /******************* * allocate memory * *******************/ plane = GAMGI_CAST_PLANE malloc (sizeof (gamgi_plane)); /************************* * initialise down links * *************************/ plane->text_start = NULL; plane->text_end = NULL; plane->orbital_start = NULL; plane->orbital_end = NULL; plane->atom_start = NULL; plane->atom_end = NULL; plane->bond_start = NULL; plane->bond_end = NULL; plane->direction_start = NULL; plane->direction_end = NULL; /********************* * update plane list * *********************/ gamgi->plane_end = plane; plane->before = old_plane; plane->next = NULL; if (old_plane != NULL) old_plane->next = plane; else gamgi->plane_start = plane; return plane; } /***************** external function ************** * * * GAMGI_ENGINE_GROUP_CREATE * * * * Creates an object describing a group of atoms. * * * **************************************************/ gamgi_group *gamgi_engine_create_group (void) { gamgi_group *old_group = gamgi->group_end, *group; /******************* * allocate memory * *******************/ group = GAMGI_CAST_GROUP malloc (sizeof (gamgi_group)); /************************* * initialise down links * *************************/ group->text_start = NULL; group->text_end = NULL; group->orbital_start = NULL; group->orbital_end = NULL; group->bond_start = NULL; group->bond_end = NULL; group->atom_start = NULL; group->atom_end = NULL; group->direction_start = NULL; group->direction_end = NULL; group->plane_start = NULL; group->plane_end = NULL; group->group_start = NULL; group->group_end = NULL; /********************* * update group list * *********************/ gamgi->group_end = group; group->before = old_group; group->next = NULL; if (old_group != NULL) old_group->next = group; else gamgi->group_start = group; return group; } /************* external function ************ * * * GAMGI_ENGINE_MOLECULE_CREATE * * * * Creates an object describing a molecule. * * * ********************************************/ gamgi_molecule *gamgi_engine_create_molecule (void) { gamgi_molecule *old_molecule = gamgi->molecule_end, *molecule; /******************* * allocate memory * *******************/ molecule = GAMGI_CAST_MOLECULE malloc (sizeof (gamgi_molecule)); /************************* * initialise down links * *************************/ molecule->text_start = NULL; molecule->text_end = NULL; molecule->orbital_start = NULL; molecule->orbital_end = NULL; molecule->bond_start = NULL; molecule->bond_end = NULL; molecule->atom_start = NULL; molecule->atom_end = NULL; molecule->direction_start = NULL; molecule->direction_end = NULL; molecule->plane_start = NULL; molecule->plane_end = NULL; molecule->group_start = NULL; molecule->group_end = NULL; /************************ * update molecule list * ************************/ gamgi->molecule_end = molecule; molecule->before = old_molecule; molecule->next = NULL; if (old_molecule != NULL) old_molecule->next = molecule; else gamgi->molecule_start = molecule; return molecule; } /******************* external function ****************** * * * GAMGI_ENGINE_CLUSTER_CREATE * * * * Creates an object describing a cluster of molecules. * * * ********************************************************/ gamgi_cluster *gamgi_engine_create_cluster (void) { gamgi_cluster *old_cluster = gamgi->cluster_end, *cluster; /******************* * allocate memory * *******************/ cluster = GAMGI_CAST_CLUSTER malloc (sizeof (gamgi_cluster)); /************************* * initialise down links * *************************/ cluster->text_start = NULL; cluster->text_end = NULL; cluster->orbital_start = NULL; cluster->orbital_end = NULL; cluster->bond_start = NULL; cluster->bond_end = NULL; cluster->atom_start = NULL; cluster->atom_end = NULL; cluster->direction_start = NULL; cluster->direction_end = NULL; cluster->plane_start = NULL; cluster->plane_end = NULL; cluster->group_start = NULL; cluster->group_end = NULL; cluster->molecule_start = NULL; cluster->molecule_end = NULL; cluster->cluster_start = NULL; cluster->cluster_end = NULL; /*********************** * update cluster list * ***********************/ gamgi->cluster_end = cluster; cluster->before = old_cluster; cluster->next = NULL; if (old_cluster != NULL) old_cluster->next = cluster; else gamgi->cluster_start = cluster; return cluster; } /***************** external function ************* * * * GAMGI_ENGINE_CELL_CREATE * * * * Creates an object describing a periodic cell. * * * *************************************************/ gamgi_cell *gamgi_engine_create_cell (void) { gamgi_cell *old_cell = gamgi->cell_end, *cell; /******************* * allocate memory * *******************/ cell = GAMGI_CAST_CELL malloc (sizeof (gamgi_cell)); /************************* * initialise down links * *************************/ cell->text_start = NULL; cell->text_end = NULL; cell->orbital_start = NULL; cell->orbital_end = NULL; cell->bond_start = NULL; cell->bond_end = NULL; cell->atom_start = NULL; cell->atom_end = NULL; cell->direction_start = NULL; cell->direction_end = NULL; cell->plane_start = NULL; cell->plane_end = NULL; cell->group_start = NULL; cell->group_end = NULL; cell->molecule_start = NULL; cell->molecule_end = NULL; cell->cluster_start = NULL; cell->cluster_end = NULL; /******************** * update cell list * ********************/ gamgi->cell_end = cell; cell->before = old_cell; cell->next = NULL; if (old_cell != NULL) old_cell->next = cell; else gamgi->cell_start = cell; return cell; } /******************** external function ******************* * * * GAMGI_ENGINE_ARROW_CREATE * * * * Creates an object describing a single or double arrow. * * * **********************************************************/ gamgi_arrow *gamgi_engine_create_arrow (void) { gamgi_arrow *old_arrow = gamgi->arrow_end, *arrow; /******************* * allocate memory * *******************/ arrow = GAMGI_CAST_ARROW malloc (sizeof (gamgi_arrow)); /************************* * initialise down links * *************************/ arrow->text_start = NULL; arrow->text_end = NULL; /********************* * update arrow list * *********************/ gamgi->arrow_end = arrow; arrow->before = old_arrow; arrow->next = NULL; if (old_arrow != NULL) old_arrow->next = arrow; else gamgi->arrow_start = arrow; return arrow; } /******************** external function ******************** * * * GAMGI_ENGINE_SHAPE_CREATE * * * * Creates an object describing a contoured or full shape. * * * ***********************************************************/ gamgi_shape *gamgi_engine_create_shape (void) { gamgi_shape *old_shape = gamgi->shape_end, *shape; /******************* * allocate memory * *******************/ shape = GAMGI_CAST_SHAPE malloc (sizeof (gamgi_shape)); /************************* * initialise down links * *************************/ shape->text_start = NULL; shape->text_end = NULL; /********************* * update shape list * *********************/ gamgi->shape_end = shape; shape->before = old_shape; shape->next = NULL; if (old_shape != NULL) old_shape->next = shape; else gamgi->shape_start = shape; return shape; } /****************** external function ************* * * * GAMGI_ENGINE_GRAPH_CREATE * * * * Creates an object describing a 2D or 3D graph. * * * **************************************************/ gamgi_graph *gamgi_engine_create_graph (void) { gamgi_graph *old_graph = gamgi->graph_end, *graph; /******************* * allocate memory * *******************/ graph = GAMGI_CAST_GRAPH malloc (sizeof (gamgi_graph)); /************************* * initialise down links * *************************/ graph->text_start = NULL; graph->text_end = NULL; /********************* * update graph list * *********************/ gamgi->graph_end = graph; graph->before = old_graph; graph->next = NULL; if (old_graph != NULL) old_graph->next = graph; else gamgi->graph_start = graph; return graph; } /******************** external function ***************** * * * GAMGI_ENGINE_ASSEMBLY_CREATE * * * * Creates an object describing an assembly of objects. * * * ********************************************************/ gamgi_assembly *gamgi_engine_create_assembly (void) { gamgi_assembly *old_assembly = gamgi->assembly_end, *assembly; /******************* * allocate memory * *******************/ assembly = GAMGI_CAST_ASSEMBLY malloc (sizeof (gamgi_assembly)); /************************* * initialise down links * *************************/ assembly->text_start = NULL; assembly->text_end = NULL; assembly->orbital_start = NULL; assembly->orbital_end = NULL; assembly->bond_start = NULL; assembly->bond_end = NULL; assembly->atom_start = NULL; assembly->atom_end = NULL; assembly->direction_start = NULL; assembly->direction_end = NULL; assembly->plane_start = NULL; assembly->plane_end = NULL; assembly->group_start = NULL; assembly->group_end = NULL; assembly->molecule_start = NULL; assembly->molecule_end = NULL; assembly->cluster_start = NULL; assembly->cluster_end = NULL; assembly->cell_start = NULL; assembly->cell_end = NULL; assembly->arrow_start = NULL; assembly->arrow_end = NULL; assembly->shape_start = NULL; assembly->shape_end = NULL; assembly->graph_start = NULL; assembly->graph_end = NULL; assembly->assembly_start = NULL; assembly->assembly_end = NULL; /************************ * update assembly list * ************************/ gamgi->assembly_end = assembly; assembly->before = old_assembly; assembly->next = NULL; if (old_assembly != NULL) old_assembly->next = assembly; else gamgi->assembly_start = assembly; return assembly; } /**************** external function ************** * * * GAMGI_ENGINE_LIGHT_CREATE * * * * Creates an object describing an OpenGL light. * * * *************************************************/ gamgi_light *gamgi_engine_create_light (void) { gamgi_light *old_light = gamgi->light_end, *light; /******************* * allocate memory * *******************/ light = GAMGI_CAST_LIGHT malloc (sizeof (gamgi_light)); /********************* * update light list * *********************/ gamgi->light_end = light; light->before = old_light; light->next = NULL; if (old_light != NULL) old_light->next = light; else gamgi->light_start = light; return light; } /*********************** external function ********************* * * * GAMGI_ENGINE_CREATE_LAYER * * * * Creates an object describing a transparent or opaque layer. * * * ***************************************************************/ gamgi_layer *gamgi_engine_create_layer (void) { gamgi_layer *old_layer = gamgi->layer_end, *layer; /******************* * allocate memory * *******************/ layer = GAMGI_CAST_LAYER malloc (sizeof (gamgi_layer)); /************************* * initialise down links * *************************/ layer->text_start = NULL; layer->text_end = NULL; layer->orbital_start = NULL; layer->orbital_end = NULL; layer->bond_start = NULL; layer->bond_end = NULL; layer->atom_start = NULL; layer->atom_end = NULL; layer->direction_start = NULL; layer->direction_end = NULL; layer->plane_start = NULL; layer->plane_end = NULL; layer->group_start = NULL; layer->group_end = NULL; layer->molecule_start = NULL; layer->molecule_end = NULL; layer->cluster_start = NULL; layer->cluster_end = NULL; layer->cell_start = NULL; layer->cell_end = NULL; layer->arrow_start = NULL; layer->arrow_end = NULL; layer->shape_start = NULL; layer->shape_end = NULL; layer->graph_start = NULL; layer->graph_end = NULL; layer->assembly_start = NULL; layer->assembly_end = NULL; layer->light_start = NULL; layer->light_end = NULL; /********************* * update layer list * *********************/ gamgi->layer_end = layer; layer->before = old_layer; layer->next = NULL; if (old_layer != NULL) old_layer->next = layer; else gamgi->layer_start = layer; return layer; } /**************** external function *************** * * * GAMGI_ENGINE_WINDOW_CREATE * * * * Creates an object describing a GTK top window. * * * **************************************************/ gamgi_window *gamgi_engine_create_window (void) { gamgi_window *old_window = gamgi->window_end, *window; /******************* * allocate memory * *******************/ window = GAMGI_CAST_WINDOW malloc (sizeof (gamgi_window)); /************************* * initialise down links * *************************/ window->layer_start = NULL; window->layer_end = NULL; /********************** * update window list * **********************/ gamgi->window_end = window; window->before = old_window; window->next = NULL; if (old_window != NULL) old_window->next = window; else gamgi->window_start = window; return window; } /*********************** external function ******************* * * * GAMGI_ENGINE_CREATE_GAMGI * * * * Creates an object to allocate the GAMGI system resources. * * * *************************************************************/ void gamgi_engine_create_gamgi () { /************************************************** * gamgi is the only global variable defined in * * GAMGI. Its purpose is to contain the global * * resources used by the program. Every data * * available in GAMGI can be obtained from gamgi. * **************************************************/ gamgi = GAMGI_CAST_GAMGI malloc (sizeof (gamgi_gamgi)); /******************************* * create hash table to speed * * up atom element recognition * *******************************/ gamgi->element = gamgi_chem_atom_element (); /**************************** * create font glyph arrays * ****************************/ gamgi_mesa_text_font_start (); /********************************** * initialize pointers to windows * **********************************/ gamgi->message = NULL; gamgi->question = NULL; /************************************** * create configuration class objects * **************************************/ gamgi->help = gamgi_global_create_help (); gamgi->text = gamgi_global_create_text (); gamgi->orbital = gamgi_global_create_orbital (); gamgi->bond = gamgi_global_create_bond (); gamgi->atom = gamgi_global_create_atom (); gamgi->direction = gamgi_global_create_direction (); gamgi->plane = gamgi_global_create_plane (); gamgi->group = gamgi_global_create_group (); gamgi->molecule = gamgi_global_create_molecule (); gamgi->cluster = gamgi_global_create_cluster (); gamgi->cell = gamgi_global_create_cell (); gamgi->arrow = gamgi_global_create_arrow (); gamgi->shape = gamgi_global_create_shape (); gamgi->graph = gamgi_global_create_graph (); gamgi->assembly = gamgi_global_create_assembly (); gamgi->light = gamgi_global_create_light (); gamgi->layer = gamgi_global_create_layer (); gamgi->window = gamgi_global_create_window (); gamgi->gamgi = gamgi_global_create_gamgi (); /*************************************************** * initialize object selection tools, lists, focus * ***************************************************/ gamgi->function = NULL; gamgi->window_dialog = NULL; gamgi->window_mouse = NULL; gamgi->state = FALSE; gamgi->texts = NULL; gamgi->orbitals = NULL; gamgi->bonds = NULL; gamgi->atoms = NULL; gamgi->directions = NULL; gamgi->planes = NULL; gamgi->groups = NULL; gamgi->molecules = NULL; gamgi->clusters = NULL; gamgi->cells = NULL; gamgi->arrows = NULL; gamgi->shapes = NULL; gamgi->graphs = NULL; gamgi->assemblys = NULL; gamgi->lights = NULL; gamgi->layers = NULL; gamgi->windows = NULL; gamgi->focus = FALSE; /********************************** * initialise pointers to objects * **********************************/ gamgi->text_start = NULL; gamgi->text_end = NULL; gamgi->orbital_start = NULL; gamgi->orbital_end = NULL; gamgi->bond_start = NULL; gamgi->bond_end = NULL; gamgi->atom_start = NULL; gamgi->atom_end = NULL; gamgi->direction_start = NULL; gamgi->direction_end = NULL; gamgi->plane_start = NULL; gamgi->plane_end = NULL; gamgi->group_start = NULL; gamgi->group_end = NULL; gamgi->molecule_start = NULL; gamgi->molecule_end = NULL; gamgi->cluster_start = NULL; gamgi->cluster_end = NULL; gamgi->cell_start = NULL; gamgi->cell_end = NULL; gamgi->arrow_start = NULL; gamgi->arrow_end = NULL; gamgi->shape_start = NULL; gamgi->shape_end = NULL; gamgi->graph_start = NULL; gamgi->graph_end = NULL; gamgi->assembly_start = NULL; gamgi->assembly_end = NULL; gamgi->light_start = NULL; gamgi->light_end = NULL; gamgi->layer_start = NULL; gamgi->layer_end = NULL; gamgi->window_start = NULL; gamgi->window_end = NULL; } gamgi0.17.1g/src/engine/gamgi_engine_start.h0000644000175000017500000000264010067030312020333 0ustar carloscarlos/******************************************* * * $GAMGI/src/engine/gamgi_engine_start.h * * Copyright (C) 2001, 2004 Carlos Pereira * * Distributed under the terms of the GNU * General Public License: $GAMGI/LICENSE * */ /********************** * external functions * **********************/ void gamgi_engine_start_object (gamgi_object *object, int class); void gamgi_engine_start_text (gamgi_text *text); void gamgi_engine_start_orbital (gamgi_orbital *orbital); void gamgi_engine_start_bond (gamgi_bond *bond); void gamgi_engine_start_atom (gamgi_atom *atom); void gamgi_engine_start_direction (gamgi_direction *direction); void gamgi_engine_start_plane (gamgi_plane *plane); void gamgi_engine_start_group (gamgi_group *group); void gamgi_engine_start_molecule (gamgi_molecule *molecule); void gamgi_engine_start_cluster (gamgi_cluster *cluster); void gamgi_engine_start_cell (gamgi_cell *cell); void gamgi_engine_start_arrow (gamgi_arrow *arrow); void gamgi_engine_start_shape (gamgi_shape *shape); void gamgi_engine_start_graph (gamgi_graph *graph); void gamgi_engine_start_assembly (gamgi_assembly *assembly); void gamgi_engine_start_light (gamgi_light *light); void gamgi_engine_start_layer (gamgi_layer *layer); void gamgi_engine_start_window (gamgi_window *window); void gamgi_engine_start_gamgi (void); /************* * Rationale * ************* ************* * Rationale * *************/ gamgi0.17.1g/src/engine/gamgi_engine_filter.c0000644000175000017500000001200611745100536020465 0ustar carloscarlos/******************************************* * * $GAMGI/src/engine/gamgi_engine_filter.c * * Copyright (C) 2001, 2004 Carlos Pereira * * Distributed under the terms of the GNU * General Public License: $GAMGI/LICENSE * */ #include "gamgi_engine.h" #include "gamgi_math.h" #include "gamgi_chem.h" #include "gamgi_engine_list.h" #include "gamgi_engine_unlink.h" #include "gamgi_engine_remove.h" #include "gamgi_math_measure.h" gamgi_dlist *gamgi_engine_filter_bond_length (gamgi_dlist *start, double min, double max) { gamgi_atom *atom1, *atom2; gamgi_bond* bond; gamgi_dlist *dlist, *dlist_next; double length; for (dlist = start; dlist != NULL; dlist = dlist_next) { dlist_next = dlist->next; bond = GAMGI_CAST_BOND dlist->data; atom1 = bond->atom1; atom2 = bond->atom2; gamgi_math_measure_length_2atom (atom1, atom2, &length); if (length < min || length > max) { if (dlist->before == NULL) start = dlist_next; gamgi_engine_dlist_remove_start (dlist); gamgi_engine_unlink_bond (bond); gamgi_engine_remove_bond (bond); } } return start; } gamgi_dlist *gamgi_engine_filter_bond_element (gamgi_dlist *start, int z1, int z2) { gamgi_bond* bond; gamgi_dlist *dlist, *dlist_next; int element1, element2; for (dlist = start; dlist != NULL; dlist = dlist_next) { dlist_next = dlist->next; bond = GAMGI_CAST_BOND dlist->data; element1 = bond->atom1->element; element2 = bond->atom2->element; if ((z1 != element1 && z1 != element2) || (z2 != element1 && z2 != element2)) { if (dlist->before == NULL) start = dlist_next; gamgi_engine_dlist_remove_start (dlist); gamgi_engine_unlink_bond (bond); gamgi_engine_remove_bond (bond); } } return start; } gamgi_dlist *gamgi_engine_filter_atom_element (gamgi_dlist *start, int z1, int z2) { gamgi_atom *atom; gamgi_dlist *dlist, *dlist_next; int element; for (dlist = start; dlist != NULL; dlist = dlist_next) { dlist_next = dlist->next; atom = GAMGI_CAST_ATOM dlist->data; element = atom->element; if (element != z1 && element != z2) { if (dlist->before == NULL) start = dlist_next; gamgi_engine_dlist_remove_start (dlist); } } return start; } gamgi_dlist *gamgi_engine_filter_atom_class (gamgi_dlist *start, int offset, gamgi_enum class) { gamgi_object *object; gamgi_dlist *dlist, *dlist_next; /*********************************************** * unlist objects with specific parent classes * ***********************************************/ for (dlist = start; dlist != NULL; dlist = dlist_next) { dlist_next = dlist->next; /******************************************** * ignore first offset elements of the list * ********************************************/ if (offset-- > 0) continue; object = GAMGI_CAST_OBJECT dlist->data; if (object->object->class == class) { if (dlist->before == NULL) start = dlist_next; gamgi_engine_dlist_remove_start (dlist); } } return start; } gamgi_dlist *gamgi_engine_filter_atom_parent (gamgi_dlist *start, int offset, gamgi_object *parent) { gamgi_object *object; gamgi_dlist *dlist, *dlist_next; /************************************************** * unlist objects without specific parent objects * **************************************************/ for (dlist = start; dlist != NULL; dlist = dlist_next) { dlist_next = dlist->next; /******************************************** * ignore first offset elements of the list * ********************************************/ if (offset-- > 0) continue; object = GAMGI_CAST_OBJECT dlist->data; if (object->object != parent) { if (dlist->before == NULL) start = dlist_next; gamgi_engine_dlist_remove_start (dlist); } } return start; } gamgi_dlist *gamgi_engine_filter_atom_identical (gamgi_dlist *start, int offset) { gamgi_atom *atom_i, *atom_j; gamgi_dlist *i, *j, *j_next; double x, y, z; for (i = start; i != NULL; i = i->next) { /******************************************** * ignore first offset elements of the list * ********************************************/ if (offset-- > 0) continue; atom_i = GAMGI_CAST_ATOM i->data; for (j = i->next; j != NULL; j = j_next) { j_next = j->next; atom_j = GAMGI_CAST_ATOM j->data; x = atom_i->position[0] - atom_j->position[0]; y = atom_i->position[1] - atom_j->position[1]; z = atom_i->position[2] - atom_j->position[2]; if (x * x + y * y + z * z < GAMGI_MATH_TOLERANCE_STRUCTURE * GAMGI_MATH_TOLERANCE_STRUCTURE) gamgi_engine_dlist_remove_start (j); } } return start; } gamgi_dlist *gamgi_engine_filter_atom (gamgi_dlist *start, int offset, gamgi_enum filter, gamgi_enum class, gamgi_object *parent) { if (filter == GAMGI_CHEM_FILTER_CLASS) while (class > GAMGI_ENGINE_ATOM) start = gamgi_engine_filter_atom_class (start, offset, class--); if (filter == GAMGI_CHEM_FILTER_PARENT) start = gamgi_engine_filter_atom_parent (start, offset, parent); if (filter == GAMGI_CHEM_FILTER_IDENTICAL) start = gamgi_engine_filter_atom_identical (start, offset); return start; } gamgi0.17.1g/src/engine/gamgi_engine_list.c0000644000175000017500000003372211434311225020155 0ustar carloscarlos/******************************************* * * $GAMGI/src/engine/gamgi_engine_list.c * * Copyright (C) 2001, 2004 Carlos Pereira * * Distributed under the terms of the GNU * General Public License: $GAMGI/LICENSE * */ #include "gamgi_engine.h" /***************** external function ******************** * * * GAMGI_ENGINE_SLIST_ADD_START * * * * Add a new slist node before the slist_start node and * * returns the address of the new node. This is usefull * * to add new elements to stacks, but cannot be used to * * add new elements in the middle of a slist! * ********************************************************/ gamgi_slist *gamgi_engine_slist_add_start (gamgi_slist *slist_start) { gamgi_slist *slist_new; slist_new = GAMGI_CAST_SLIST malloc (sizeof (gamgi_slist)); slist_new->next = slist_start; return slist_new; } /**************** external function ********************* * * * GAMGI_ENGINE_SLIST_ADD_END * * * * Add a new slist node after the slist_end node and * * returns the address of the new node. This is usefull * * to add new elements to queues, but can also be used * * to add new elements in the middle of a slist! * ********************************************************/ gamgi_slist *gamgi_engine_slist_add_end (gamgi_slist *slist_end) { gamgi_slist *slist_new; slist_new = GAMGI_CAST_SLIST malloc (sizeof (gamgi_slist)); if (slist_end != NULL) { slist_new->next = slist_end->next; slist_end->next = slist_new; } else slist_new->next = NULL; return slist_new; } /******************* external function ****************** * * * GAMGI_ENGINE_SLIST_REMOVE_START * * * * Remove the slist_start node and returns the address * * of the next node. This is usefull to remove elements * * from both stacks and queues, but cannot be used to * * remove elements in the middle of a slist! * * * * slist_start MUST be non null! * ********************************************************/ gamgi_slist *gamgi_engine_slist_remove_start (gamgi_slist *slist_start) { gamgi_slist *slist_old; slist_old = slist_start->next; free (slist_start); return slist_old; } /********************* external function ********************* * * * GAMGI_ENGINE_SLIST_REMOVE_ALL * * * * Remove all elements of a slist, from slist_start to NULL! * *************************************************************/ void gamgi_engine_slist_remove_all (gamgi_slist *slist_start) { while (slist_start != NULL) slist_start = gamgi_engine_slist_remove_start (slist_start); } /*************** external function ********************** * * * GAMGI_ENGINE_DLIST_ADD_START * * * * Add a new dlist node before the dlist_start node and * * returns the address of the new node. This is usefull * * to add new elements to stacks, but can also be used * * to add new elements in the middle of a dlist! * * * * if dlist_start->before is NULL then dlist_start is * * the start, otherwise is in the middle of the dlist! * ********************************************************/ gamgi_dlist *gamgi_engine_dlist_add_start (gamgi_dlist *dlist_start) { gamgi_dlist *dlist_new; dlist_new = GAMGI_CAST_DLIST malloc (sizeof (gamgi_dlist)); dlist_new->next = dlist_start; if (dlist_start != NULL) { dlist_new->before = dlist_start->before; if (dlist_start->before != NULL) dlist_start->before->next = dlist_new; dlist_start->before = dlist_new; } else dlist_new->before = NULL; return dlist_new; } /**************** external function ********************* * * * GAMGI_ENGINE_DLIST_ADD_END * * * * Add a new dlist node after the dlist_end node and * * returns the address of the new node. This is usefull * * to add new elements to queues, but can also be used * * to add new elements in the middle of a dlist! * * * * if dlist_end->next is NULL then dlist_end is the * * end, otherwise is in the middle of the dlist! * ********************************************************/ gamgi_dlist *gamgi_engine_dlist_add_end (gamgi_dlist *dlist_end) { gamgi_dlist *dlist_new; dlist_new = GAMGI_CAST_DLIST malloc (sizeof (gamgi_dlist)); dlist_new->before = dlist_end; if (dlist_end != NULL) { dlist_new->next = dlist_end->next; if (dlist_end->next != NULL) dlist_end->next->before = dlist_new; dlist_end->next = dlist_new; } else dlist_new->next = NULL; return dlist_new; } /****************** external function ******************* * * * GAMGI_ENGINE_DLIST_REMOVE_START * * * * Remove the dlist_start node and returns the address * * of the next node. This is usefull to remove elements * * from both stacks and queues, but can also be used to * * remove elements in the middle of a dlist! * * * * By-pass dlist_start, linking directly * * left and right nodes to each other! * ********************************************************/ gamgi_dlist *gamgi_engine_dlist_remove_start (gamgi_dlist *dlist_start) { gamgi_dlist *dlist_old; dlist_old = dlist_start->next; if (dlist_old != NULL) dlist_old->before = dlist_start->before; if (dlist_start->before != NULL) dlist_start->before->next = dlist_old; free (dlist_start); return dlist_old; } /******************** external function ********************** * * * GAMGI_ENGINE_DLIST_REMOVE_ALL * * * * Remove all elements of a dlist, from dlist_start to NULL! * *************************************************************/ void gamgi_engine_dlist_remove_all (gamgi_dlist *dlist_start) { while (dlist_start != NULL) dlist_start = gamgi_engine_dlist_remove_start (dlist_start); } /*********************** external function ********************* * * * GAMGI_ENGINE_SLIST_MERGE * * * * Merge two ordered lists of slist nodes in a single ordered * * list, as determined by an external comparing function. When * * the function returns positive, the two nodes are swaped. * ***************************************************************/ gamgi_slist *gamgi_engine_slist_merge (gamgi_slist *a, gamgi_slist *b, int (* function) (const void *, const void *)) { gamgi_slist start; gamgi_slist *c = &start; while (a != NULL && b != NULL) if ((*function) (a, b) > 0) { c->next = b; c = b; b = b->next; } else { c->next = a; c = a; a = a->next; } c->next = (a == NULL) ? b : a; return start.next; } /*********************** external function ********************* * * * GAMGI_ENGINE_DLIST_MERGE * * * * Merge two ordered lists of dlist nodes in a single ordered * * list, as determined by an external comparing function. When * * the function returns positive, the two nodes are swaped. * ***************************************************************/ gamgi_dlist *gamgi_engine_dlist_merge (gamgi_dlist *a, gamgi_dlist *b, int (* function) (const void *, const void *)) { gamgi_dlist start; gamgi_dlist *c = &start; while (a != NULL && b != NULL) if ((*function) (a, b) > 0) { c->next = b; b->before = c; c = b; b = b->next; } else { c->next = a; a->before = c; c = a; a = a->next; } c->next = (a == NULL) ? b : a; return start.next; } /*********************** external function ****************** * * * GAMGI_ENGINE_SLIST_SORT * * * * Use the merge-sort recursive algorithm to sort a list of * * slist nodes, according to an external comparing function * ************************************************************/ gamgi_slist *gamgi_engine_slist_msort (gamgi_slist *c, int (* function) (const void *, const void *)) { gamgi_slist *a, *b; if (c == NULL || c->next == NULL) return c; /**************************************************************** * divide list c in two new lists, a going from the start * * to the middle, and b going from the middle to the end * * * * pointer b moves along the list at twice the speed of pointer * * c, so when b reaches the end of the list, c is at the middle * ****************************************************************/ a = c; b = c->next; while (b != NULL && b->next != NULL) { c = c->next; b = b->next->next; } b = c->next; c->next = NULL; return gamgi_engine_slist_merge (gamgi_engine_slist_msort (a, function), gamgi_engine_slist_msort (b, function), function); } /*********************** external function ****************** * * * GAMGI_ENGINE_DLIST_SORT * * * * Use the merge-sort recursive algorithm to sort a list of * * dlist nodes, according to an external comparing function * ************************************************************/ gamgi_dlist *gamgi_engine_dlist_msort (gamgi_dlist *c, int (* function) (const void *, const void *)) { gamgi_dlist *a, *b; if (c == NULL || c->next == NULL) return c; /**************************************************************** * divide list c in two new lists, a going from the start * * to the middle, and b going from the middle to the end * * * * pointer b moves along the list at twice the speed of pointer * * c, so when b reaches the end of the list, c is at the middle * ****************************************************************/ a = c; b = c->next; while (b != NULL && b->next != NULL) { c = c->next; b = b->next->next; } b = c->next; c->next = NULL; return gamgi_engine_dlist_merge (gamgi_engine_dlist_msort (a, function), gamgi_engine_dlist_msort (b, function), function); } /*********************** external function ******************** * * * GAMGI_ENGINE_SLIST_INVERT * * * * Invert the list, so the first node becomes the last and * * vice-versa. The input should be the first node of a single * * list, and the output is the first node of the new list * **************************************************************/ gamgi_slist *gamgi_engine_slist_invert (gamgi_slist *start) { gamgi_slist *slist, *slist_before, *slist_next; slist_before = NULL; for (slist = start; slist != NULL; slist = slist_next) { slist_next = slist->next; slist->next = slist_before; slist_before = slist; } return slist_before; } /*********************** external function ******************** * * * GAMGI_ENGINE_DLIST_INVERT * * * * Invert the list, so the first node becomes the last and * * vice-versa. The input should be the first node of a double * * list, and the output is the first node of the new list * **************************************************************/ gamgi_dlist *gamgi_engine_dlist_invert (gamgi_dlist *start) { gamgi_dlist *dlist, *dlist_before; dlist_before = NULL; for (dlist = start; dlist != NULL; dlist = dlist->before) { dlist_before = dlist->before; dlist->before = dlist->next; dlist->next = dlist_before; dlist_before = dlist; } return dlist_before; } gamgi_slist *gamgi_engine_slist_copy (gamgi_slist *start) { gamgi_slist *slist, *slist_new, *start_new; if (start == NULL) return NULL; start_new = gamgi_engine_slist_add_end (NULL); start_new->data = start->data; slist_new = start_new; for (slist = start->next; slist != NULL; slist = slist->next) { slist_new = gamgi_engine_slist_add_end (slist_new); slist_new->data = slist->data; } return start_new; } gamgi_dlist *gamgi_engine_dlist_copy (gamgi_dlist *start) { gamgi_dlist *dlist, *dlist_new, *start_new; if (start == NULL) return NULL; start_new = gamgi_engine_dlist_add_end (NULL); start_new->data = start->data; dlist_new = start_new; for (dlist = start->next; dlist != NULL; dlist = dlist->next) { dlist_new = gamgi_engine_dlist_add_end (dlist_new); dlist_new->data = dlist->data; } return start_new; } int gamgi_engine_slist_nodes (gamgi_slist *start) { gamgi_slist *slist; int i = 0; for (slist = start; slist != NULL; slist = slist->next) i++; return i; } int gamgi_engine_dlist_nodes (gamgi_dlist *start) { gamgi_dlist *dlist; int i = 0; for (dlist = start; dlist != NULL; dlist = dlist->next) i++; return i; } gamgi0.17.1g/src/engine/gamgi_engine_array.h0000644000175000017500000000310610265247536020334 0ustar carloscarlos/******************************************* * * $GAMGI/src/engine/gamgi_engine_array.h * * Copyright (C) 2001, 2004 Carlos Pereira * * Distributed under the terms of the GNU * General Public License: $GAMGI/LICENSE * */ /********************** * internal functions * ********************** static void static_iarray_start (gamgi_iarray *iarray, int size, int increment, int dimension); static void static_darray_start (gamgi_darray *darray, int size, int increment, int dimension); ********************** * external functions * **********************/ gamgi_iarray *gamgi_engine_iarray_create (int total, int step, int dimensions); gamgi_iarray *gamgi_engine_iarray_recreate (gamgi_iarray *iarray, int total, int step, int dimensions); double *gamgi_engine_iarray_push (gamgi_iarray *iarray, int *vector); void gamgi_engine_iarray_pop (gamgi_iarray *iarray, int offset); void gamgi_engine_iarray_remove (gamgi_iarray *iarray); void gamgi_engine_iarray_copy_remove (gamgi_iarray *iarray, int **array, int *size); gamgi_darray *gamgi_engine_darray_create (int total, int step, int dimensions); gamgi_darray *gamgi_engine_darray_recreate (gamgi_darray *darray, int total, int step, int dimensions); double *gamgi_engine_darray_push (gamgi_darray *darray, double *vector); void gamgi_engine_darray_pop (gamgi_darray *darray, int offset); void gamgi_engine_darray_remove (gamgi_darray *darray); void gamgi_engine_darray_copy_remove (gamgi_darray *darray, double **array, int *size); /************* * Rationale * ************* ************* * Rationale * *************/ gamgi0.17.1g/src/engine/gamgi_engine_remove_out.c0000644000175000017500000001007310067030235021360 0ustar carloscarlos/*********************************************** * * $GAMGI/src/engine/gamgi_engine_remove_out.c * * Copyright (C) 2001, 2004 Carlos Pereira * * Distributed under the terms of the GNU * General Public License: $GAMGI/LICENSE * */ #include "gamgi_engine.h" void gamgi_engine_remove_out_text (gamgi_text *text) { /* bypass text list and free text */ if (text->before) text->before->next = text->next; if (text->next) text->next->before = text->before; free(text); } void gamgi_engine_remove_out_orbital (gamgi_orbital *orbital) { /* bypass orbital list and free orbital */ if (orbital->before) orbital->before->next = orbital->next; if (orbital->next) orbital->next->before = orbital->before; free(orbital); } void gamgi_engine_remove_out_bond (gamgi_bond *bond) { /* bypass bond list and free bond */ if (bond->before) bond->before->next = bond->next; if (bond->next) bond->next->before = bond->before; free(bond); } void gamgi_engine_remove_out_atom (gamgi_atom *atom) { /* bypass atom list and free atom */ if (atom->before) atom->before->next = atom->next; if (atom->next) atom->next->before = atom->before; free(atom); } void gamgi_engine_remove_out_direction (gamgi_direction *direction) { /* bypass direction list and free direction */ if (direction->before) direction->before->next = direction->next; if (direction->next) direction->next->before = direction->before; free(direction); } void gamgi_engine_remove_out_plane (gamgi_plane *plane) { /* bypass plane list and free plane */ if (plane->before) plane->before->next = plane->next; if (plane->next) plane->next->before = plane->before; free(plane); } void gamgi_engine_remove_out_group (gamgi_group *group) { /* bypass group list and free group */ if (group->before) group->before->next = group->next; if (group->next) group->next->before = group->before; free(group); } void gamgi_engine_remove_out_molecule (gamgi_molecule *molecule) { /* bypass molecule list and free molecule */ if (molecule->before) molecule->before->next = molecule->next; if (molecule->next) molecule->next->before = molecule->before; free(molecule); } void gamgi_engine_remove_out_cluster (gamgi_cluster *cluster) { /* bypass cluster list and free cluster */ if (cluster->before) cluster->before->next = cluster->next; if (cluster->next) cluster->next->before = cluster->before; free(cluster); } void gamgi_engine_remove_out_cell (gamgi_cell *cell) { /* bypass cell list and free cell */ if (cell->before) cell->before->next = cell->next; if (cell->next) cell->next->before = cell->before; free(cell); } void gamgi_engine_remove_out_arrow (gamgi_arrow *arrow) { /* bypass arrow list and free arrow */ if (arrow->before) arrow->before->next = arrow->next; if (arrow->next) arrow->next->before = arrow->before; free(arrow); } void gamgi_engine_remove_out_shape (gamgi_shape *shape) { /* bypass shape list and free shape */ if (shape->before) shape->before->next = shape->next; if (shape->next) shape->next->before = shape->before; free(shape); } void gamgi_engine_remove_out_graph (gamgi_graph *graph) { /* bypass graph list and free graph */ if (graph->before) graph->before->next = graph->next; if (graph->next) graph->next->before = graph->before; free(graph); } void gamgi_engine_remove_out_assembly (gamgi_assembly *assembly) { /* bypass assembly list and free assembly */ if (assembly->before) assembly->before->next = assembly->next; if (assembly->next) assembly->next->before = assembly->before; free(assembly); } void gamgi_engine_remove_out_light (gamgi_light *light) { /* bypass light list and free light */ if (light->before) light->before->next = light->next; if (light->next) light->next->before = light->before; free(light); } void gamgi_engine_remove_out_layer (gamgi_layer *layer) { /* bypass layer list and free layer */ if (layer->before) layer->before->next = layer->next; if (layer->next) layer->next->before = layer->before; free(layer); } void gamgi_engine_remove_out_window (gamgi_window *window) { /* bypass window list and free window */ if (window->before) window->before->next = window->next; if (window->next) window->next->before = window->before; free(window); } gamgi0.17.1g/src/engine/gamgi_engine_remove.h0000644000175000017500000000265010067030224020476 0ustar carloscarlos/******************************************* * * $GAMGI/src/engine/gamgi_engine_remove.h * * Copyright (C) 2001, 2004 Carlos Pereira * * Distributed under the terms of the GNU * General Public License: $GAMGI/LICENSE * */ /********************** * external functions * **********************/ void gamgi_engine_remove_text (gamgi_text *text); void gamgi_engine_remove_orbital (gamgi_orbital *orbital); void gamgi_engine_remove_bond (gamgi_bond *bond); void gamgi_engine_remove_atom (gamgi_atom *atom); void gamgi_engine_remove_direction (gamgi_direction *direction); void gamgi_engine_remove_plane (gamgi_plane *plane); void gamgi_engine_remove_group (gamgi_group *group); void gamgi_engine_remove_molecule (gamgi_molecule *molecule); void gamgi_engine_remove_cluster (gamgi_cluster *cluster); void gamgi_engine_remove_cell (gamgi_cell *cell); void gamgi_engine_remove_arrow (gamgi_arrow *arrow); void gamgi_engine_remove_shape (gamgi_shape *shape); void gamgi_engine_remove_graph (gamgi_graph *graph); void gamgi_engine_remove_assembly (gamgi_assembly *assembly); void gamgi_engine_remove_light (gamgi_light *light); void gamgi_engine_remove_layer (gamgi_layer *layer); void gamgi_engine_remove_window (gamgi_window *window); void gamgi_engine_remove_object (gamgi_object *object); void gamgi_engine_remove_gamgi (void); /************* * Rationale * ************* ************* * Rationale * *************/ gamgi0.17.1g/src/engine/gamgi_engine_empty.h0000644000175000017500000000262310516447426020356 0ustar carloscarlos/****************************************** * * $GAMGI/src/engine/gamgi_engine_empty.h * * Copyright (C) 2006 Carlos Pereira * * Distributed under the terms of the GNU * General Public License: $GAMGI/LICENSE * */ /********************** * external functions * **********************/ gamgi_bool gamgi_engine_empty_text (gamgi_text *text); gamgi_bool gamgi_engine_empty_orbital (gamgi_orbital *orbital); gamgi_bool gamgi_engine_empty_bond (gamgi_bond *bond); gamgi_bool gamgi_engine_empty_atom (gamgi_atom *atom); gamgi_bool gamgi_engine_empty_direction (gamgi_direction *direction); gamgi_bool gamgi_engine_empty_plane (gamgi_plane *plane); gamgi_bool gamgi_engine_empty_group (gamgi_group *group); gamgi_bool gamgi_engine_empty_molecule (gamgi_molecule *molecule); gamgi_bool gamgi_engine_empty_cluster (gamgi_cluster *cluster); gamgi_bool gamgi_engine_empty_cell (gamgi_cell *cell); gamgi_bool gamgi_engine_empty_arrow (gamgi_arrow *arrow); gamgi_bool gamgi_engine_empty_shape (gamgi_shape *shape); gamgi_bool gamgi_engine_empty_graph (gamgi_graph *graph); gamgi_bool gamgi_engine_empty_assembly (gamgi_assembly *assembly); gamgi_bool gamgi_engine_empty_light (gamgi_light *light); gamgi_bool gamgi_engine_empty_layer (gamgi_layer *layer); gamgi_bool gamgi_engine_empty_window (gamgi_window *window); /************* * Rationale * ************* ************* * Rationale * *************/ gamgi0.17.1g/src/engine/gamgi_engine_filter.h0000644000175000017500000000206411636455645020512 0ustar carloscarlos/******************************************* * * $GAMGI/src/engine/gamgi_engine_filter.h * * Copyright (C) 2001, 2004 Carlos Pereira * * Distributed under the terms of the GNU * General Public License: $GAMGI/LICENSE * */ /********************** * external functions * **********************/ gamgi_dlist *gamgi_engine_filter_bond_length (gamgi_dlist *start, double min, double max); gamgi_dlist *gamgi_engine_filter_bond_element (gamgi_dlist *start, int z1, int z2); gamgi_dlist *gamgi_engine_filter_atom_element (gamgi_dlist *start, int z1, int z2); gamgi_dlist *gamgi_engine_filter_atom_class (gamgi_dlist *start, int offset, gamgi_enum class); gamgi_dlist *gamgi_engine_filter_atom_parent (gamgi_dlist *start, int offset, gamgi_object *parent); gamgi_dlist *gamgi_engine_filter_atom_identical (gamgi_dlist *start, int offset); gamgi_dlist *gamgi_engine_filter_atom (gamgi_dlist *start, int offset, gamgi_enum filter, gamgi_enum class, gamgi_object *parent); /************* * Rationale * ************* ************* * Rationale * *************/ gamgi0.17.1g/src/engine/gamgi_engine_copy_out.h0000644000175000017500000000365710067027626021066 0ustar carloscarlos/********************************************* * * $GAMGI/src/engine/gamgi_engine_copy_out.h * * Copyright (C) 2001, 2004 Carlos Pereira * * Distributed under the terms of the GNU * General Public License: $GAMGI/LICENSE * */ /********************** * internal functions * ********************** static void static_copy (gamgi_object *object, gamgi_object *object_new); ********************** * external functions * **********************/ void gamgi_engine_copy_out_text (gamgi_text *text, gamgi_text *text_new); void gamgi_engine_copy_out_orbital (gamgi_orbital *orbital, gamgi_orbital *orbital_new); void gamgi_engine_copy_out_bond (gamgi_bond *bond, gamgi_bond *bond_new); void gamgi_engine_copy_out_atom (gamgi_atom *atom, gamgi_atom *atom_new); void gamgi_engine_copy_out_direction (gamgi_direction *direction, gamgi_direction *direction_new); void gamgi_engine_copy_out_plane (gamgi_plane *plane, gamgi_plane *plane_new); void gamgi_engine_copy_out_group (gamgi_group *group, gamgi_group *group_new); void gamgi_engine_copy_out_molecule (gamgi_molecule *molecule, gamgi_molecule *molecule_new); void gamgi_engine_copy_out_cluster (gamgi_cluster *cluster, gamgi_cluster *cluster_new); void gamgi_engine_copy_out_cell (gamgi_cell *cell, gamgi_cell *cell_new); void gamgi_engine_copy_out_arrow (gamgi_arrow *arrow, gamgi_arrow *arrow_new); void gamgi_engine_copy_out_shape (gamgi_shape *shape, gamgi_shape *shape_new); void gamgi_engine_copy_out_graph (gamgi_graph *graph, gamgi_graph *graph_new); void gamgi_engine_copy_out_assembly (gamgi_assembly *assembly, gamgi_assembly *assembly_new); void gamgi_engine_copy_out_light (gamgi_light *light, gamgi_light *light_new); void gamgi_engine_copy_out_layer (gamgi_layer *layer, gamgi_layer *layer_new); void gamgi_engine_copy_out_window (gamgi_window *window, gamgi_window *window_new); /************* * Rationale * ************* ************* * Rationale * *************/ gamgi0.17.1g/src/engine/gamgi_engine_remove_out.h0000644000175000017500000000262310067030244021367 0ustar carloscarlos/*********************************************** * * $GAMGI/src/engine/gamgi_engine_remove_out.h * * Copyright (C) 2001, 2004 Carlos Pereira * * Distributed under the terms of the GNU * General Public License: $GAMGI/LICENSE * */ /********************** * external functions * **********************/ void gamgi_engine_remove_out_text (gamgi_text *text); void gamgi_engine_remove_out_orbital (gamgi_orbital *orbital); void gamgi_engine_remove_out_bond (gamgi_bond *bond); void gamgi_engine_remove_out_atom (gamgi_atom *atom); void gamgi_engine_remove_out_direction (gamgi_direction *direction); void gamgi_engine_remove_out_plane (gamgi_plane *plane); void gamgi_engine_remove_out_group (gamgi_group *group); void gamgi_engine_remove_out_molecule (gamgi_molecule *molecule); void gamgi_engine_remove_out_cluster (gamgi_cluster *cluster); void gamgi_engine_remove_out_cell (gamgi_cell *cell); void gamgi_engine_remove_out_arrow (gamgi_arrow *arrow); void gamgi_engine_remove_out_shape (gamgi_shape *shape); void gamgi_engine_remove_out_graph (gamgi_graph *graph); void gamgi_engine_remove_out_assembly (gamgi_assembly *assembly); void gamgi_engine_remove_out_light (gamgi_light *light); void gamgi_engine_remove_out_layer (gamgi_layer *layer); void gamgi_engine_remove_out_window (gamgi_window *window); /************* * Rationale * ************* ************* * Rationale * *************/ gamgi0.17.1g/src/engine/gamgi_engine_number.h0000644000175000017500000000734410067030204020474 0ustar carloscarlos/******************************************* * * $GAMGI/src/engine/gamgi_engine_number.h * * Copyright (C) 2001, 2004 Carlos Pereira * * Distributed under the terms of the GNU * General Public License: $GAMGI/LICENSE * */ /********************** * external functions * **********************/ /******** * text * ********/ unsigned int gamgi_engine_number_text_get (void); void gamgi_engine_number_text_recycle (unsigned int number); void gamgi_engine_number_text_reset (void); /*********** * orbital * ***********/ unsigned int gamgi_engine_number_orbital_get (void); void gamgi_engine_number_orbital_recycle (unsigned int number); void gamgi_engine_number_orbital_reset (void); /******** * bond * ********/ unsigned int gamgi_engine_number_bond_get (void); void gamgi_engine_number_bond_recycle (unsigned int number); void gamgi_engine_number_bond_reset (void); /******** * atom * ********/ unsigned int gamgi_engine_number_atom_get (void); void gamgi_engine_number_atom_recycle (unsigned int number); void gamgi_engine_number_atom_reset (void); /************* * direction * *************/ unsigned int gamgi_engine_number_direction_get (void); void gamgi_engine_number_direction_recycle (unsigned int number); void gamgi_engine_number_direction_reset (void); /********* * plane * *********/ unsigned int gamgi_engine_number_plane_get (void); void gamgi_engine_number_plane_recycle (unsigned int number); void gamgi_engine_number_plane_reset (void); /********* * group * *********/ unsigned int gamgi_engine_number_group_get (void); void gamgi_engine_number_group_recycle (unsigned int number); void gamgi_engine_number_group_reset (void); /************ * molecule * ************/ unsigned int gamgi_engine_number_molecule_get (void); void gamgi_engine_number_molecule_recycle (unsigned int number); void gamgi_engine_number_molecule_reset (void); /*********** * cluster * ***********/ unsigned int gamgi_engine_number_cluster_get (void); void gamgi_engine_number_cluster_recycle (unsigned int number); void gamgi_engine_number_cluster_reset (void); /******** * cell * ********/ unsigned int gamgi_engine_number_cell_get (void); void gamgi_engine_number_cell_recycle (unsigned int number); void gamgi_engine_number_cell_reset (void); /********* * arrow * *********/ unsigned int gamgi_engine_number_arrow_get (void); void gamgi_engine_number_arrow_recycle (unsigned int number); void gamgi_engine_number_arrow_reset (void); /********* * shape * *********/ unsigned int gamgi_engine_number_shape_get (void); void gamgi_engine_number_shape_recycle (unsigned int number); void gamgi_engine_number_shape_reset (void); /********* * graph * *********/ unsigned int gamgi_engine_number_graph_get (void); void gamgi_engine_number_graph_recycle (unsigned int number); void gamgi_engine_number_graph_reset (void); /************ * assembly * ************/ unsigned int gamgi_engine_number_assembly_get (void); void gamgi_engine_number_assembly_recycle (unsigned int number); void gamgi_engine_number_assembly_reset (void); /********* * light * *********/ unsigned int gamgi_engine_number_light_get (void); void gamgi_engine_number_light_recycle (unsigned int number); void gamgi_engine_number_light_reset (void); /********* * layer * *********/ unsigned int gamgi_engine_number_layer_get (void); void gamgi_engine_number_layer_recycle (unsigned int number); void gamgi_engine_number_layer_reset (void); /********** * window * **********/ unsigned int gamgi_engine_number_window_get (void); void gamgi_engine_number_window_recycle (unsigned int number); void gamgi_engine_number_window_reset (void); /************* * Rationale * ************* ************* * Rationale * *************/ gamgi0.17.1g/src/engine/gamgi_engine_remove.c0000644000175000017500000013265012043260647020507 0ustar carloscarlos/******************************************* * * $GAMGI/src/engine/gamgi_engine_remove.c * * Copyright (C) 2001, 2004 Carlos Pereira * * Distributed under the terms of the GNU * General Public License: $GAMGI/LICENSE * */ #include "gamgi_engine.h" #include "gamgi_chem.h" #include "gamgi_io.h" #include "gamgi_global.h" #include "gamgi_engine_remove_out.h" #include "gamgi_engine_number.h" #include "gamgi_engine_list.h" #include "gamgi_engine_unlink.h" #include "gamgi_gtk_history.h" #include "gamgi_mesa_text.h" #include "gamgi_math_hash.h" #include "gamgi_global_selection.h" #include "gamgi_global_remove.h" /***************** external function ********************* * * * GAMGI_ENGINE_REMOVE_TEXT * * * * Remove all objects which belong to text and remove * * the text. The function calls itself when the child is * * also text. Caution: the text must be unlinked before! * *********************************************************/ void gamgi_engine_remove_text (gamgi_text *text) { gamgi_dlist *dlist; gamgi_text *text_next, *text_before; /******************************** * remove text global selection * ********************************/ gamgi_global_selection_clean (GAMGI_ENGINE_TEXT, &gamgi->texts, "button_text", text->object.selection); /******************** * remove text list * ********************/ dlist = text->text_start; while (dlist != NULL) { gamgi_engine_remove_text (GAMGI_CAST_TEXT dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /************************* * free text contents * * * * unref font, remove it * * when no longer needed * *************************/ gamgi_mesa_text_font_decrease (text); text->font = FALSE; gamgi_mesa_text_remove (text); /*************** * remove text * ***************/ /********************************************* * because recursive removing may occur, * * addressing can be done only after all * * child objects are removed from the lists. * *********************************************/ text_next = text->next; text_before = text->before; gamgi_engine_number_text_recycle (text->object.number); gamgi_engine_remove_out_text (text); if (text_next == NULL) gamgi->text_end = text_before; if (text_before == NULL) gamgi->text_start = text_next; } /******************** external function ********************** * * * GAMGI_ENGINE_REMOVE_ORBITAL * * * * Remove all objects which belong to orbital and remove the * * orbital. Caution: the orbital must be unlinked before! * *************************************************************/ void gamgi_engine_remove_orbital (gamgi_orbital *orbital) { gamgi_dlist *dlist; gamgi_orbital *orbital_next, *orbital_before; /*********************************** * remove orbital global selection * ***********************************/ gamgi_global_selection_clean (GAMGI_ENGINE_ORBITAL, &gamgi->orbitals, "button_orbital", orbital->object.selection); /******************** * remove text list * ********************/ dlist = orbital->text_start; while (dlist != NULL) { gamgi_engine_remove_text (GAMGI_CAST_TEXT dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /********************* * free array memory * *********************/ free (orbital->points); free (orbital->lines); /****************** * remove orbital * ******************/ orbital_next = orbital->next; orbital_before = orbital->before; gamgi_engine_number_orbital_recycle (orbital->object.number); gamgi_engine_remove_out_orbital (orbital); if (orbital_next == NULL) gamgi->orbital_end = orbital_before; if (orbital_before == NULL) gamgi->orbital_start = orbital_next; } /***************** external function *************** * * * GAMGI_ENGINE_REMOVE_BOND * * * * Remove all objects which belong to bond, unlink * * from the two parent atoms and remove the bond * * * * Caution: the bond must be unlinked before! * ***************************************************/ void gamgi_engine_remove_bond (gamgi_bond *bond) { gamgi_dlist *dlist; gamgi_bond *bond_next, *bond_before; /******************************** * remove bond global selection * ********************************/ gamgi_global_selection_clean (GAMGI_ENGINE_BOND, &gamgi->bonds, "button_bond", bond->object.selection); /******************** * remove text list * ********************/ dlist = bond->text_start; while (dlist != NULL) { gamgi_engine_remove_text (GAMGI_CAST_TEXT dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /*********************** * remove orbital list * ***********************/ dlist = bond->orbital_start; while (dlist != NULL) { gamgi_engine_remove_orbital (GAMGI_CAST_ORBITAL dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /*************** * remove bond * ***************/ bond_next = bond->next; bond_before = bond->before; gamgi_engine_number_bond_recycle (bond->object.number); gamgi_engine_remove_out_bond (bond); if (bond_next == NULL) gamgi->bond_end = bond_before; if (bond_before == NULL) gamgi->bond_start = bond_next; } /***************** external function ******************** * * * GAMGI_ENGINE_REMOVE_ATOM * * * * Remove all objects which belong to atom and remove * * the atom. Caution: the atom must be unlinked before! * ********************************************************/ void gamgi_engine_remove_atom (gamgi_atom *atom) { gamgi_dlist *dlist; gamgi_atom *atom_next, *atom_before; gamgi_bond *bond; /******************************** * remove atom global selection * ********************************/ gamgi_global_selection_clean (GAMGI_ENGINE_ATOM, &gamgi->atoms, "button_atom", atom->object.selection); /******************** * remove text list * ********************/ dlist = atom->text_start; while (dlist != NULL) { gamgi_engine_remove_text (GAMGI_CAST_TEXT dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /*********************** * remove orbital list * ***********************/ dlist = atom->orbital_start; while (dlist != NULL) { gamgi_engine_remove_orbital (GAMGI_CAST_ORBITAL dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /******************** * remove bond list * ********************/ dlist = atom->bond_start; while (dlist != NULL) { bond = GAMGI_CAST_BOND dlist->data; dlist = dlist->next; gamgi_engine_unlink_bond (bond); gamgi_engine_remove_bond (bond); } /*************** * remove atom * ***************/ atom_next = atom->next; atom_before = atom->before; gamgi_engine_number_atom_recycle (atom->object.number); gamgi_engine_remove_out_atom (atom); if (atom_next == NULL) gamgi->atom_end = atom_before; if (atom_before == NULL) gamgi->atom_start = atom_next; } /******************** external function ************************ * * * GAMGI_ENGINE_REMOVE_DIRECTION * * * * Remove all objects which belong to direction and remove the * * direction. Caution: the direction must be unlinked before! * ***************************************************************/ void gamgi_engine_remove_direction (gamgi_direction *direction) { gamgi_dlist *dlist; gamgi_direction *direction_next, *direction_before; /************************************* * remove direction global selection * *************************************/ gamgi_global_selection_clean (GAMGI_ENGINE_DIRECTION, &gamgi->directions, "button_direction", direction->object.selection); /******************** * remove text list * ********************/ dlist = direction->text_start; while (dlist != NULL) { gamgi_engine_remove_text (GAMGI_CAST_TEXT dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /*********************** * remove orbital list * ***********************/ dlist = direction->orbital_start; while (dlist != NULL) { gamgi_engine_remove_orbital (GAMGI_CAST_ORBITAL dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /******************** * remove atom list * ********************/ dlist = direction->atom_start; while (dlist != NULL) { gamgi_engine_remove_atom (GAMGI_CAST_ATOM dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /********************* * free array memory * *********************/ free (direction->points); free (direction->loops); /******************** * remove direction * ********************/ direction_next = direction->next; direction_before = direction->before; gamgi_engine_number_direction_recycle (direction->object.number); gamgi_engine_remove_out_direction (direction); if (direction_next == NULL) gamgi->direction_end = direction_before; if (direction_before == NULL) gamgi->direction_start = direction_next; } /******************** external function ******************* * * * GAMGI_ENGINE_REMOVE_PLANE * * * * Remove all objects which belong to plane and remove * * the plane. Caution: the plane must be unlinked before! * **********************************************************/ void gamgi_engine_remove_plane (gamgi_plane *plane) { gamgi_dlist *dlist; gamgi_plane *plane_next, *plane_before; /******************************** * remove plane global selection * ********************************/ gamgi_global_selection_clean (GAMGI_ENGINE_PLANE, &gamgi->planes, "button_plane", plane->object.selection); /******************** * remove text list * ********************/ dlist = plane->text_start; while (dlist != NULL) { gamgi_engine_remove_text (GAMGI_CAST_TEXT dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /*********************** * remove orbital list * ***********************/ dlist = plane->orbital_start; while (dlist != NULL) { gamgi_engine_remove_orbital (GAMGI_CAST_ORBITAL dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /******************** * remove atom list * ********************/ dlist = plane->atom_start; while (dlist != NULL) { gamgi_engine_remove_atom (GAMGI_CAST_ATOM dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /************************* * remove direction list * *************************/ dlist = plane->direction_start; while (dlist != NULL) { gamgi_engine_remove_direction (GAMGI_CAST_DIRECTION dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /********************* * free array memory * *********************/ free (plane->points); free (plane->loops); /**************** * remove plane * ****************/ plane_next = plane->next; plane_before = plane->before; gamgi_engine_number_plane_recycle (plane->object.number); gamgi_engine_remove_out_plane (plane); if (plane_next == NULL) gamgi->plane_end = plane_before; if (plane_before == NULL) gamgi->plane_start = plane_next; } /******************* external function ********************* * * * GAMGI_ENGINE_REMOVE_GROUP * * * * Remove all objects which belong to group and remove * * the group. The function calls itself when the child is * * also group. Caution: the group must be unlinked before! * ***********************************************************/ void gamgi_engine_remove_group (gamgi_group *group) { gamgi_dlist *dlist; gamgi_group *group_next, *group_before; /********************************* * remove group global selection * *********************************/ gamgi_global_selection_clean (GAMGI_ENGINE_GROUP, &gamgi->groups, "button_group", group->object.selection); /******************** * remove text list * ********************/ dlist = group->text_start; while (dlist != NULL) { gamgi_engine_remove_text (GAMGI_CAST_TEXT dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /*********************** * remove orbital list * ***********************/ dlist = group->orbital_start; while (dlist != NULL) { gamgi_engine_remove_orbital (GAMGI_CAST_ORBITAL dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /******************** * remove atom list * ********************/ dlist = group->atom_start; while (dlist != NULL) { gamgi_engine_remove_atom (GAMGI_CAST_ATOM dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /************************* * remove direction list * *************************/ dlist = group->direction_start; while (dlist != NULL) { gamgi_engine_remove_direction (GAMGI_CAST_DIRECTION dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /********************* * remove plane list * *********************/ dlist = group->plane_start; while (dlist != NULL) { gamgi_engine_remove_plane (GAMGI_CAST_PLANE dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /********************* * remove group list * *********************/ dlist = group->group_start; while (dlist != NULL) { gamgi_engine_remove_group (GAMGI_CAST_GROUP dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /**************** * remove group * ****************/ /********************************************* * because recursive removing may occur, * * addressing can be done only after all * * child objects are removed from the lists. * *********************************************/ group_next = group->next; group_before = group->before; gamgi_engine_number_group_recycle (group->object.number); gamgi_engine_remove_out_group (group); if (group_next == NULL) gamgi->group_end = group_before; if (group_before == NULL) gamgi->group_start = group_next; } /********************** external function ********************* * * * GAMGI_ENGINE_REMOVE_MOLECULE * * * * Remove all objects which belong to molecule and remove the * * molecule. Caution: the molecule must be unlinked before! * **************************************************************/ void gamgi_engine_remove_molecule (gamgi_molecule *molecule) { gamgi_dlist *dlist; gamgi_molecule *molecule_next, *molecule_before; /************************************ * remove molecule global selection * ************************************/ gamgi_global_selection_clean (GAMGI_ENGINE_MOLECULE, &gamgi->molecules, "button_molecule", molecule->object.selection); /******************** * remove text list * ********************/ dlist = molecule->text_start; while (dlist != NULL) { gamgi_engine_remove_text (GAMGI_CAST_TEXT dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /*********************** * remove orbital list * ***********************/ /* remove orbital list */ dlist = molecule->orbital_start; while (dlist != NULL) { gamgi_engine_remove_orbital (GAMGI_CAST_ORBITAL dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /******************** * remove atom list * ********************/ dlist = molecule->atom_start; while (dlist != NULL) { gamgi_engine_remove_atom (GAMGI_CAST_ATOM dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /************************* * remove direction list * *************************/ dlist = molecule->direction_start; while (dlist != NULL) { gamgi_engine_remove_direction (GAMGI_CAST_DIRECTION dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /********************* * remove plane list * *********************/ /* remove plane list */ dlist = molecule->plane_start; while (dlist != NULL) { gamgi_engine_remove_plane (GAMGI_CAST_PLANE dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /********************* * remove group list * *********************/ dlist = molecule->group_start; while (dlist != NULL) { gamgi_engine_remove_group (GAMGI_CAST_GROUP dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /******************* * remove molecule * *******************/ molecule_next = molecule->next; molecule_before = molecule->before; gamgi_engine_number_molecule_recycle (molecule->object.number); gamgi_engine_remove_out_molecule (molecule); if (molecule_next == NULL) gamgi->molecule_end = molecule_before; if (molecule_before == NULL) gamgi->molecule_start = molecule_next; } /************************ external function ****************** * * * GAMGI_ENGINE_REMOVE_CLUSTER * * * * Remove all objects which belong to cluster and remove the * * cluster. The function calls itself when the child is also * * cluster. Caution: the cluster must be unlinked before! * *************************************************************/ void gamgi_engine_remove_cluster (gamgi_cluster *cluster) { gamgi_dlist *dlist; gamgi_cluster *cluster_next, *cluster_before; /*********************************** * remove cluster global selection * ***********************************/ gamgi_global_selection_clean (GAMGI_ENGINE_CLUSTER, &gamgi->clusters, "button_cluster", cluster->object.selection); /******************** * remove text list * ********************/ dlist = cluster->text_start; while (dlist != NULL) { gamgi_engine_remove_text (GAMGI_CAST_TEXT dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /*********************** * remove orbital list * ***********************/ dlist = cluster->orbital_start; while (dlist != NULL) { gamgi_engine_remove_orbital (GAMGI_CAST_ORBITAL dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /******************** * remove atom list * ********************/ dlist = cluster->atom_start; while (dlist != NULL) { gamgi_engine_remove_atom (GAMGI_CAST_ATOM dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /************************* * remove direction list * *************************/ dlist = cluster->direction_start; while (dlist != NULL) { gamgi_engine_remove_direction (GAMGI_CAST_DIRECTION dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /********************* * remove plane list * *********************/ dlist = cluster->plane_start; while (dlist != NULL) { gamgi_engine_remove_plane (GAMGI_CAST_PLANE dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /********************* * remove group list * *********************/ dlist = cluster->group_start; while (dlist != NULL) { gamgi_engine_remove_group (GAMGI_CAST_GROUP dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /************************ * remove molecule list * ************************/ dlist = cluster->molecule_start; while (dlist != NULL) { gamgi_engine_remove_molecule (GAMGI_CAST_MOLECULE dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /************************ * remove clustier list * ************************/ dlist = cluster->cluster_start; while (dlist != NULL) { gamgi_engine_remove_cluster (GAMGI_CAST_CLUSTER dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /********************* * free array memory * *********************/ free (cluster->points); free (cluster->loops); free (cluster->colors); free (cluster->paints); /****************** * remove cluster * ******************/ /********************************************* * because recursive removing may occur, * * addressing can be done only after all * * child objects are removed from the lists. * *********************************************/ cluster_next = cluster->next; cluster_before = cluster->before; gamgi_engine_number_cluster_recycle (cluster->object.number); gamgi_engine_remove_out_cluster (cluster); if (cluster_next == NULL) gamgi->cluster_end = cluster_before; if (cluster_before == NULL) gamgi->cluster_start = cluster_next; } /******************** external function ***************** * * * GAMGI_ENGINE_REMOVE_CELL * * * * Remove all objects which belong to cell and remove * * the cell. Caution: the cell must be unlinked before! * ********************************************************/ void gamgi_engine_remove_cell (gamgi_cell *cell) { gamgi_dlist *dlist; gamgi_cell *cell_next, *cell_before; /******************************** * remove cell global selection * ********************************/ gamgi_global_selection_clean (GAMGI_ENGINE_CELL, &gamgi->cells, "button_cell", cell->object.selection); /******************** * remove text list * ********************/ dlist = cell->text_start; while (dlist != NULL) { gamgi_engine_remove_text (GAMGI_CAST_TEXT dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /*********************** * remove orbital list * ***********************/ dlist = cell->orbital_start; while (dlist != NULL) { gamgi_engine_remove_orbital (GAMGI_CAST_ORBITAL dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /******************** * remove atom list * ********************/ dlist = cell->atom_start; while (dlist != NULL) { gamgi_engine_remove_atom (GAMGI_CAST_ATOM dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /************************* * remove direction list * *************************/ dlist = cell->direction_start; while (dlist != NULL) { gamgi_engine_remove_direction (GAMGI_CAST_DIRECTION dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /********************* * remove plane list * *********************/ dlist = cell->plane_start; while (dlist != NULL) { gamgi_engine_remove_plane (GAMGI_CAST_PLANE dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /********************* * remove group list * *********************/ dlist = cell->group_start; while (dlist != NULL) { gamgi_engine_remove_group (GAMGI_CAST_GROUP dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /************************ * remove molecule list * ************************/ /* remove molecule list */ dlist = cell->molecule_start; while (dlist != NULL) { gamgi_engine_remove_molecule (GAMGI_CAST_MOLECULE dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /*********************** * remove cluster list * ***********************/ /* remove cluster list */ dlist = cell->cluster_start; while (dlist != NULL) { gamgi_engine_remove_cluster (GAMGI_CAST_CLUSTER dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /********************* * free array memory * *********************/ free (cell->points); free (cell->loops); free (cell->lines); /*************** * remove cell * ***************/ cell_next = cell->next; cell_before = cell->before; gamgi_engine_number_cell_recycle (cell->object.number); gamgi_engine_remove_out_cell (cell); if (cell_next == NULL) gamgi->cell_end = cell_before; if (cell_before == NULL) gamgi->cell_start = cell_next; } /******************** external function ******************* * * * GAMGI_ENGINE_REMOVE_ARROW * * * * Remove all objects which belong to arrow and remove * * the arrow. Caution: the arrow must be unlinked before! * **********************************************************/ void gamgi_engine_remove_arrow (gamgi_arrow *arrow) { gamgi_dlist *dlist; gamgi_arrow *arrow_next, *arrow_before; /********************************* * remove arrow global selection * *********************************/ gamgi_global_selection_clean (GAMGI_ENGINE_ARROW, &gamgi->arrows, "button_arrow", arrow->object.selection); /******************** * remove text list * ********************/ dlist = arrow->text_start; while (dlist != NULL) { gamgi_engine_remove_text (GAMGI_CAST_TEXT dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /**************** * remove arrow * ****************/ arrow_next = arrow->next; arrow_before = arrow->before; gamgi_engine_number_arrow_recycle (arrow->object.number); gamgi_engine_remove_out_arrow (arrow); if (arrow_next == NULL) gamgi->arrow_end = arrow_before; if (arrow_before == NULL) gamgi->arrow_start = arrow_next; } /******************** external function ******************* * * * GAMGI_ENGINE_REMOVE_SHAPE * * * * Remove all objects which belong to shape and remove * * the shape. Caution: the shape must be unlinked before! * **********************************************************/ void gamgi_engine_remove_shape (gamgi_shape *shape) { gamgi_dlist *dlist; gamgi_shape *shape_next, *shape_before; /********************************* * remove shape global selection * *********************************/ gamgi_global_selection_clean (GAMGI_ENGINE_SHAPE, &gamgi->shapes, "button_shape", shape->object.selection); /******************** * remove text list * ********************/ dlist = shape->text_start; while (dlist != NULL) { gamgi_engine_remove_text (GAMGI_CAST_TEXT dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /**************** * remove shape * ****************/ shape_next = shape->next; shape_before = shape->before; gamgi_engine_number_shape_recycle (shape->object.number); gamgi_engine_remove_out_shape (shape); if (shape_next == NULL) gamgi->shape_end = shape_before; if (shape_before == NULL) gamgi->shape_start = shape_next; } /******************** external function ******************* * * * GAMGI_ENGINE_REMOVE_GRAPH * * * * Remove all objects which belong to graph and remove * * the graph. Caution: the graph must be unlinked before! * **********************************************************/ void gamgi_engine_remove_graph (gamgi_graph *graph) { gamgi_dlist *dlist; gamgi_graph *graph_next, *graph_before; /********************************* * remove graph global selection * *********************************/ gamgi_global_selection_clean (GAMGI_ENGINE_GRAPH, &gamgi->graphs, "button_graph", graph->object.selection); /******************** * remove text list * ********************/ dlist = graph->text_start; while (dlist != NULL) { gamgi_engine_remove_text (GAMGI_CAST_TEXT dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /**************** * remove graph * ****************/ graph_next = graph->next; graph_before = graph->before; gamgi_engine_number_graph_recycle (graph->object.number); gamgi_engine_remove_out_graph (graph); if (graph_next == NULL) gamgi->graph_end = graph_before; if (graph_before == NULL) gamgi->graph_start = graph_next; } /************************ external function ******************* * * * GAMGI_ENGINE_REMOVE_ASSEMBLY * * * * Remove all objects which belong to assembly and remove the * * assembly. The function calls itself when the child is also * * assembly. Caution: the assembly must be unlinked before! * **************************************************************/ void gamgi_engine_remove_assembly (gamgi_assembly *assembly) { gamgi_dlist *dlist; gamgi_assembly *assembly_next, *assembly_before; /************************************ * remove assembly global selection * ************************************/ gamgi_global_selection_clean (GAMGI_ENGINE_ASSEMBLY, &gamgi->assemblys, "button_assembly", assembly->object.selection); /******************** * remove text list * ********************/ dlist = assembly->text_start; while (dlist != NULL) { gamgi_engine_remove_text (GAMGI_CAST_TEXT dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /*********************** * remove orbital list * ***********************/ dlist = assembly->orbital_start; while (dlist != NULL) { gamgi_engine_remove_orbital (GAMGI_CAST_ORBITAL dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /******************** * remove atom list * ********************/ dlist = assembly->atom_start; while (dlist != NULL) { gamgi_engine_remove_atom (GAMGI_CAST_ATOM dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /************************* * remove direction list * *************************/ dlist = assembly->direction_start; while (dlist != NULL) { gamgi_engine_remove_direction (GAMGI_CAST_DIRECTION dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /********************* * remove plane list * *********************/ dlist = assembly->plane_start; while (dlist != NULL) { gamgi_engine_remove_plane (GAMGI_CAST_PLANE dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /********************* * remove group list * *********************/ dlist = assembly->group_start; while (dlist != NULL) { gamgi_engine_remove_group (GAMGI_CAST_GROUP dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /************************ * remove molecule list * ************************/ dlist = assembly->molecule_start; while (dlist != NULL) { gamgi_engine_remove_molecule (GAMGI_CAST_MOLECULE dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /*********************** * remove cluster list * ***********************/ /* remove cluster list */ dlist = assembly->cluster_start; while (dlist != NULL) { gamgi_engine_remove_cluster (GAMGI_CAST_CLUSTER dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /******************** * remove cell list * ********************/ dlist = assembly->cell_start; while (dlist != NULL) { gamgi_engine_remove_cell (GAMGI_CAST_CELL dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /********************* * remove arrow list * *********************/ dlist = assembly->arrow_start; while (dlist != NULL) { gamgi_engine_remove_arrow (GAMGI_CAST_ARROW dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /********************* * remove shape list * *********************/ dlist = assembly->shape_start; while (dlist != NULL) { gamgi_engine_remove_shape (GAMGI_CAST_SHAPE dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /********************* * remove graph list * *********************/ dlist = assembly->graph_start; while (dlist != NULL) { gamgi_engine_remove_graph (GAMGI_CAST_GRAPH dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /************************ * remove assembly list * ************************/ dlist = assembly->assembly_start; while (dlist != NULL) { gamgi_engine_remove_assembly (GAMGI_CAST_ASSEMBLY dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /******************* * remove assembly * *******************/ /********************************************* * because recursive removing may occur, * * addressing can be done only after all * * child objects are removed from the lists. * *********************************************/ assembly_next = assembly->next; assembly_before = assembly->before; gamgi_engine_number_assembly_recycle (assembly->object.number); gamgi_engine_remove_out_assembly (assembly); if (assembly_next == NULL) gamgi->assembly_end = assembly_before; if (assembly_before == NULL) gamgi->assembly_start = assembly_next; } /********* external function ******** * * * GAMGI_ENGINE_REMOVE_LIGHT * * * * Remove the light. Caution: the * * light must be unlinked before! * ************************************/ void gamgi_engine_remove_light (gamgi_light *light) { gamgi_light *light_next, *light_before; /********************************* * remove light global selection * *********************************/ gamgi_global_selection_clean (GAMGI_ENGINE_LIGHT, &gamgi->lights, "button_light", light->object.selection); /**************** * remove light * ****************/ light_next = light->next; light_before = light->before; gamgi_engine_number_light_recycle (light->object.number); gamgi_engine_remove_out_light (light); if (light_next == NULL) gamgi->light_end = light_before; if (light_before == NULL) gamgi->light_start = light_next; } /******************** external function ******************* * * * GAMGI_ENGINE_REMOVE_LAYER * * * * Remove all objects which belong to layer and remove * * the layer. Caution: the layer must be unlinked before! * **********************************************************/ void gamgi_engine_remove_layer (gamgi_layer *layer) { gamgi_dlist *dlist; gamgi_layer *layer_next, *layer_before; /************************************** * clean Undo,Save history mechanisms * **************************************/ if (layer->undo != NULL) gamgi_gtk_history_layer_reset (layer->undo); if (layer->save != NULL) gamgi_gtk_history_layer_reset (layer->save); /********************************* * remove layer global selection * *********************************/ gamgi_global_selection_clean (GAMGI_ENGINE_LAYER, &gamgi->layers, "button_layer", layer->object.selection); /******************** * remove text list * ********************/ dlist = layer->text_start; while (dlist != NULL) { gamgi_engine_remove_text (GAMGI_CAST_TEXT dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /*********************** * remove orbital list * ***********************/ dlist = layer->orbital_start; while (dlist != NULL) { gamgi_engine_remove_orbital (GAMGI_CAST_ORBITAL dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /******************** * remove atom list * ********************/ dlist = layer->atom_start; while (dlist != NULL) { gamgi_engine_remove_atom (GAMGI_CAST_ATOM dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /************************* * remove direction list * *************************/ dlist = layer->direction_start; while (dlist != NULL) { gamgi_engine_remove_direction (GAMGI_CAST_DIRECTION dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /********************* * remove plane list * *********************/ dlist = layer->plane_start; while (dlist != NULL) { gamgi_engine_remove_plane (GAMGI_CAST_PLANE dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /********************* * remove group list * *********************/ dlist = layer->group_start; while (dlist != NULL) { gamgi_engine_remove_group (GAMGI_CAST_GROUP dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /************************ * remove molecule list * ************************/ dlist = layer->molecule_start; while (dlist != NULL) { gamgi_engine_remove_molecule (GAMGI_CAST_MOLECULE dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /*********************** * remove cluster list * ***********************/ dlist = layer->cluster_start; while (dlist != NULL) { gamgi_engine_remove_cluster (GAMGI_CAST_CLUSTER dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /******************** * remove cell list * ********************/ dlist = layer->cell_start; while (dlist != NULL) { gamgi_engine_remove_cell (GAMGI_CAST_CELL dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /********************* * remove arrow list * *********************/ dlist = layer->arrow_start; while (dlist != NULL) { gamgi_engine_remove_arrow (GAMGI_CAST_ARROW dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /********************* * remove shape list * *********************/ dlist = layer->shape_start; while (dlist != NULL) { gamgi_engine_remove_shape (GAMGI_CAST_SHAPE dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /********************* * remove graph list * *********************/ dlist = layer->graph_start; while (dlist != NULL) { gamgi_engine_remove_graph (GAMGI_CAST_GRAPH dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /************************ * remove assembly list * ************************/ dlist = layer->assembly_start; while (dlist != NULL) { gamgi_engine_remove_assembly (GAMGI_CAST_ASSEMBLY dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /********************* * remove light list * *********************/ dlist = layer->light_start; while (dlist != NULL) { gamgi_engine_remove_light (GAMGI_CAST_LIGHT dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /**************** * remove layer * ****************/ /**************************************************************** * addressing must be done after removing the undo/save layers. * ****************************************************************/ layer_next = layer->next; layer_before = layer->before; gamgi_engine_number_layer_recycle (layer->object.number); gamgi_engine_remove_out_layer (layer); if (layer_next == NULL) gamgi->layer_end = layer_before; if (layer_before == NULL) gamgi->layer_start = layer_next; } /***************** external function **************** * * * GAMGI_ENGINE_REMOVE_WINDOW * * * * Remove all layers which belong to window and * * remove the window. A window object does not * * have a link, so it does not need to be unlinked. * ****************************************************/ void gamgi_engine_remove_window (gamgi_window *window) { gamgi_dlist *dlist; gamgi_window *window_next, *window_before; /************************************** * clean Undo,Save history mechanisms * **************************************/ if (window->history != NULL) gamgi_gtk_history_window_reset (window->history); /********************************** * remove window global selection * **********************************/ gamgi_global_selection_clean (GAMGI_ENGINE_WINDOW, &gamgi->windows, "button_window", window->object.selection); /********************* * remove layer list * *********************/ dlist = window->layer_start; while (dlist != NULL) { gamgi_engine_remove_layer (GAMGI_CAST_LAYER dlist->data); dlist = gamgi_engine_dlist_remove_start (dlist); } /***************** * remove window * *****************/ window_next = window->next; window_before = window->before; gamgi_engine_number_window_recycle (window->object.number); gamgi_engine_remove_out_window (window); if (window_next == NULL) gamgi->window_end = window_before; if (window_before == NULL) gamgi->window_start = window_next; } /*************** external function *********** * * * GAMGI_ENGINE_REMOVE_OBJECT * * * *********************************************/ void gamgi_engine_remove_object (gamgi_object *object) { switch (object->class) { case GAMGI_ENGINE_TEXT: gamgi_engine_remove_text (GAMGI_CAST_TEXT object); break; case GAMGI_ENGINE_ORBITAL: gamgi_engine_remove_orbital (GAMGI_CAST_ORBITAL object); break; case GAMGI_ENGINE_BOND: gamgi_engine_remove_bond (GAMGI_CAST_BOND object); break; case GAMGI_ENGINE_ATOM: gamgi_engine_remove_atom (GAMGI_CAST_ATOM object); break; case GAMGI_ENGINE_DIRECTION: gamgi_engine_remove_direction (GAMGI_CAST_DIRECTION object); break; case GAMGI_ENGINE_PLANE: gamgi_engine_remove_plane (GAMGI_CAST_PLANE object); break; case GAMGI_ENGINE_GROUP: gamgi_engine_remove_group (GAMGI_CAST_GROUP object); break; case GAMGI_ENGINE_MOLECULE: gamgi_engine_remove_molecule (GAMGI_CAST_MOLECULE object); break; case GAMGI_ENGINE_CLUSTER: gamgi_engine_remove_cluster (GAMGI_CAST_CLUSTER object); break; case GAMGI_ENGINE_CELL: gamgi_engine_remove_cell (GAMGI_CAST_CELL object); break; case GAMGI_ENGINE_ARROW: gamgi_engine_remove_arrow (GAMGI_CAST_ARROW object); break; case GAMGI_ENGINE_SHAPE: gamgi_engine_remove_shape (GAMGI_CAST_SHAPE object); break; case GAMGI_ENGINE_GRAPH: gamgi_engine_remove_graph (GAMGI_CAST_GRAPH object); break; case GAMGI_ENGINE_ASSEMBLY: gamgi_engine_remove_assembly (GAMGI_CAST_ASSEMBLY object); break; case GAMGI_ENGINE_LIGHT: gamgi_engine_remove_light (GAMGI_CAST_LIGHT object); break; case GAMGI_ENGINE_LAYER: gamgi_engine_remove_layer (GAMGI_CAST_LAYER object); break; case GAMGI_ENGINE_WINDOW: gamgi_engine_remove_window (GAMGI_CAST_WINDOW object); break; } } /*************** external function *********** * * * GAMGI_ENGINE_REMOVE_GAMGI * * * * Deallocate memory for all GAMGI resources * * currently available that are directly * * controlled by the GAMGI engine. * * * *********************************************/ void gamgi_engine_remove_gamgi () { /****************************** * remove all linked objects: * * go through the window list * ******************************/ while (gamgi->window_end != NULL) gamgi_engine_remove_window (gamgi->window_end); /*********************************** * remove all unlinked objects: * * * * this is just a precaution, ALL * * GAMGI objects must be linked! * * * * remove parents before children! * ***********************************/ while (gamgi->layer_end != NULL) gamgi_engine_remove_layer (gamgi->layer_end); while (gamgi->light_end != NULL) gamgi_engine_remove_light (gamgi->light_end); while (gamgi->assembly_end != NULL) gamgi_engine_remove_assembly (gamgi->assembly_end); while (gamgi->graph_end != NULL) gamgi_engine_remove_graph (gamgi->graph_end); while (gamgi->shape_end != NULL) gamgi_engine_remove_shape (gamgi->shape_end); while (gamgi->arrow_end != NULL) gamgi_engine_remove_arrow (gamgi->arrow_end); while (gamgi->cell_end != NULL) gamgi_engine_remove_cell (gamgi->cell_end); while (gamgi->cluster_end != NULL) gamgi_engine_remove_cluster (gamgi->cluster_end); while (gamgi->molecule_end != NULL) gamgi_engine_remove_molecule (gamgi->molecule_end); while (gamgi->group_end != NULL) gamgi_engine_remove_group (gamgi->group_end); while (gamgi->plane_end != NULL) gamgi_engine_remove_plane (gamgi->plane_end); while (gamgi->direction_end != NULL) gamgi_engine_remove_direction (gamgi->direction_end); while (gamgi->atom_end != NULL) gamgi_engine_remove_atom (gamgi->atom_end); while (gamgi->bond_end != NULL) gamgi_engine_remove_bond (gamgi->bond_end); while (gamgi->orbital_end != NULL) gamgi_engine_remove_orbital (gamgi->orbital_end); while (gamgi->text_end != NULL) gamgi_engine_remove_text (gamgi->text_end); /************************************** * remove object number recycle lists * **************************************/ gamgi_engine_number_text_reset (); gamgi_engine_number_orbital_reset (); gamgi_engine_number_bond_reset (); gamgi_engine_number_atom_reset (); gamgi_engine_number_direction_reset (); gamgi_engine_number_plane_reset (); gamgi_engine_number_group_reset (); gamgi_engine_number_molecule_reset (); gamgi_engine_number_cluster_reset (); gamgi_engine_number_cell_reset (); gamgi_engine_number_arrow_reset (); gamgi_engine_number_shape_reset (); gamgi_engine_number_graph_reset (); gamgi_engine_number_assembly_reset (); gamgi_engine_number_light_reset (); gamgi_engine_number_layer_reset (); gamgi_engine_number_window_reset (); /************************ * remove configuration * ************************/ gamgi_global_remove_help (gamgi->help); gamgi_global_remove_text (gamgi->text); gamgi_global_remove_orbital (gamgi->orbital); gamgi_global_remove_bond (gamgi->bond); gamgi_global_remove_atom (gamgi->atom); gamgi_global_remove_direction (gamgi->direction); gamgi_global_remove_plane (gamgi->plane); gamgi_global_remove_group (gamgi->group); gamgi_global_remove_molecule (gamgi->molecule); gamgi_global_remove_cluster (gamgi->cluster); gamgi_global_remove_cell (gamgi->cell); gamgi_global_remove_arrow (gamgi->arrow); gamgi_global_remove_shape (gamgi->shape); gamgi_global_remove_graph (gamgi->graph); gamgi_global_remove_assembly (gamgi->assembly); gamgi_global_remove_light (gamgi->light); gamgi_global_remove_layer (gamgi->layer); gamgi_global_remove_window (gamgi->window); gamgi_global_remove_gamgi (gamgi->gamgi); /**************************** * remove font glyph arrays * ****************************/ gamgi_mesa_text_font_end (); /********************************* * remove hash table to speed up * * atom element name recognition * *********************************/ gamgi_math_hash_remove (gamgi->element, GAMGI_CHEM_HASH_SIZE); /**************************************** * remove the singleton gamgi structure * ****************************************/ free (gamgi); } gamgi0.17.1g/src/engine/gamgi_engine_count.c0000644000175000017500000004746310067027644020353 0ustar carloscarlos/******************************************* * * $GAMGI/src/engine/gamgi_engine_count.c * * Copyright (C) 2001, 2004 Carlos Pereira * * Distributed under the terms of the GNU * General Public License: $GAMGI/LICENSE * */ #include "gamgi_engine.h" #include "gamgi_global.h" void gamgi_engine_count_text (gamgi_text *text, int class, int *number) { gamgi_dlist *dlist; /* count text */ dlist = text->text_start; while (dlist != NULL) { gamgi_engine_count_text (GAMGI_CAST_TEXT dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_TEXT) *number += 1; } void gamgi_engine_count_orbital (gamgi_orbital *orbital, int class, int *number) { gamgi_dlist *dlist; if (class == GAMGI_ENGINE_ORBITAL) { *number += 1; return; } /* count text */ dlist = orbital->text_start; while (dlist != NULL) { gamgi_engine_count_text (GAMGI_CAST_TEXT dlist->data, class, number); dlist = dlist->next; } } void gamgi_engine_count_bond (gamgi_bond *bond, int class, int *number) { gamgi_dlist *dlist; /* in case second link does not exist */ if (bond->atom2 == NULL) return; /* first scan */ if (bond->first == TRUE) bond->first = FALSE; /* second scan */ else { bond->first = TRUE; if (class == GAMGI_ENGINE_BOND) { *number += 1; return; } /* draw orbital list */ dlist = bond->orbital_start; while (dlist != NULL) { gamgi_engine_count_orbital (GAMGI_CAST_ORBITAL dlist->data, class, number); dlist = dlist->next; } /* draw text list */ dlist = bond->text_start; while (dlist != NULL) { gamgi_engine_count_text (GAMGI_CAST_TEXT dlist->data, class, number); dlist = dlist->next; } } } void gamgi_engine_count_atom (gamgi_atom *atom, int class, int *number) { gamgi_dlist *dlist; if (class == GAMGI_ENGINE_ATOM) { *number += 1; return; } /* count bond */ dlist = atom->bond_start; while (dlist != NULL) { gamgi_engine_count_bond (GAMGI_CAST_BOND dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_BOND) return; /* count orbital */ dlist = atom->orbital_start; while (dlist != NULL) { gamgi_engine_count_orbital (GAMGI_CAST_ORBITAL dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_ORBITAL) return; /* count text */ dlist = atom->text_start; while (dlist != NULL) { gamgi_engine_count_text (GAMGI_CAST_TEXT dlist->data, class, number); dlist = dlist->next; } } void gamgi_engine_count_direction (gamgi_direction *direction, int class, int *number) { gamgi_dlist *dlist; if (class == GAMGI_ENGINE_DIRECTION) { *number += 1; return; } /* count atom */ dlist = direction->atom_start; while (dlist != NULL) { gamgi_engine_count_atom (GAMGI_CAST_ATOM dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_ATOM) return; /* count orbital */ dlist = direction->orbital_start; while (dlist != NULL) { gamgi_engine_count_orbital (GAMGI_CAST_ORBITAL dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_ORBITAL) return; /* count text */ dlist = direction->text_start; while (dlist != NULL) { gamgi_engine_count_text (GAMGI_CAST_TEXT dlist->data, class, number); dlist = dlist->next; } } void gamgi_engine_count_plane (gamgi_plane *plane, int class, int *number) { gamgi_dlist *dlist; if (class == GAMGI_ENGINE_PLANE) { *number += 1; return; } if (class == GAMGI_ENGINE_PLANE) return; /* count direction */ dlist = plane->direction_start; while (dlist != NULL) { gamgi_engine_count_direction (GAMGI_CAST_DIRECTION dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_DIRECTION) return; /* count atom */ dlist = plane->atom_start; while (dlist != NULL) { gamgi_engine_count_atom (GAMGI_CAST_ATOM dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_ATOM) return; /* count orbital */ dlist = plane->orbital_start; while (dlist != NULL) { gamgi_engine_count_orbital (GAMGI_CAST_ORBITAL dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_ORBITAL) return; /* count text */ dlist = plane->text_start; while (dlist != NULL) { gamgi_engine_count_text (GAMGI_CAST_TEXT dlist->data, class, number); dlist = dlist->next; } } void gamgi_engine_count_group (gamgi_group *group, int class, int *number) { gamgi_dlist *dlist; /* count group */ dlist = group->group_start; while (dlist != NULL) { gamgi_engine_count_group (GAMGI_CAST_GROUP dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_GROUP) { *number += 1; return; } /* count plane */ dlist = group->plane_start; while (dlist != NULL) { gamgi_engine_count_plane (GAMGI_CAST_PLANE dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_PLANE) return; /* count direction */ dlist = group->direction_start; while (dlist != NULL) { gamgi_engine_count_direction (GAMGI_CAST_DIRECTION dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_DIRECTION) return; /* count atom */ dlist = group->atom_start; while (dlist != NULL) { gamgi_engine_count_atom (GAMGI_CAST_ATOM dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_ATOM) return; /* count orbital */ dlist = group->orbital_start; while (dlist != NULL) { gamgi_engine_count_orbital (GAMGI_CAST_ORBITAL dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_ORBITAL) return; /* count text */ dlist = group->text_start; while (dlist != NULL) { gamgi_engine_count_text (GAMGI_CAST_TEXT dlist->data, class, number); dlist = dlist->next; } } void gamgi_engine_count_molecule (gamgi_molecule *molecule, int class, int *number) { gamgi_dlist *dlist; if (class == GAMGI_ENGINE_MOLECULE) { *number += 1; return; } /* count group */ dlist = molecule->group_start; while (dlist != NULL) { gamgi_engine_count_group (GAMGI_CAST_GROUP dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_GROUP) return; /* count plane */ dlist = molecule->plane_start; while (dlist != NULL) { gamgi_engine_count_plane (GAMGI_CAST_PLANE dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_PLANE) return; /* count direction */ dlist = molecule->direction_start; while (dlist != NULL) { gamgi_engine_count_direction (GAMGI_CAST_DIRECTION dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_DIRECTION) return; /* count atom */ dlist = molecule->atom_start; while (dlist != NULL) { gamgi_engine_count_atom (GAMGI_CAST_ATOM dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_ATOM) return; /* count orbital */ dlist = molecule->orbital_start; while (dlist != NULL) { gamgi_engine_count_orbital (GAMGI_CAST_ORBITAL dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_ORBITAL) return; /* count text */ dlist = molecule->text_start; while (dlist != NULL) { gamgi_engine_count_text (GAMGI_CAST_TEXT dlist->data, class, number); dlist = dlist->next; } } void gamgi_engine_count_cluster (gamgi_cluster *cluster, int class, int *number) { gamgi_dlist *dlist; /* count cluster */ dlist = cluster->cluster_start; while (dlist != NULL) { gamgi_engine_count_cluster (GAMGI_CAST_CLUSTER dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_CLUSTER) { *number += 1; return; } /* count molecule */ dlist = cluster->molecule_start; while (dlist != NULL) { gamgi_engine_count_molecule (GAMGI_CAST_MOLECULE dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_MOLECULE) return; /* count group */ dlist = cluster->group_start; while (dlist != NULL) { gamgi_engine_count_group (GAMGI_CAST_GROUP dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_GROUP) return; /* count plane */ dlist = cluster->plane_start; while (dlist != NULL) { gamgi_engine_count_plane (GAMGI_CAST_PLANE dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_PLANE) return; /* count direction */ dlist = cluster->direction_start; while (dlist != NULL) { gamgi_engine_count_direction (GAMGI_CAST_DIRECTION dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_DIRECTION) return; /* count atom */ dlist = cluster->atom_start; while (dlist != NULL) { gamgi_engine_count_atom (GAMGI_CAST_ATOM dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_ATOM) return; /* count orbital */ dlist = cluster->orbital_start; while (dlist != NULL) { gamgi_engine_count_orbital (GAMGI_CAST_ORBITAL dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_ORBITAL) return; /* count text */ dlist = cluster->text_start; while (dlist != NULL) { gamgi_engine_count_text (GAMGI_CAST_TEXT dlist->data, class, number); dlist = dlist->next; } } void gamgi_engine_count_cell (gamgi_cell *cell, int class, int *number) { gamgi_dlist *dlist; if (class == GAMGI_ENGINE_CELL) { *number += 1; return; } /* count cluster */ dlist = cell->cluster_start; while (dlist != NULL) { gamgi_engine_count_cluster (GAMGI_CAST_CLUSTER dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_CLUSTER) return; /* count molecule */ dlist = cell->molecule_start; while (dlist != NULL) { gamgi_engine_count_molecule (GAMGI_CAST_MOLECULE dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_MOLECULE) return; /* count group */ dlist = cell->group_start; while (dlist != NULL) { gamgi_engine_count_group (GAMGI_CAST_GROUP dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_GROUP) return; /* count plane */ dlist = cell->plane_start; while (dlist != NULL) { gamgi_engine_count_plane (GAMGI_CAST_PLANE dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_PLANE) return; /* count direction */ dlist = cell->direction_start; while (dlist != NULL) { gamgi_engine_count_direction (GAMGI_CAST_DIRECTION dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_DIRECTION) return; /* count atom */ dlist = cell->atom_start; while (dlist != NULL) { gamgi_engine_count_atom (GAMGI_CAST_ATOM dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_ATOM) return; /* count orbital */ dlist = cell->orbital_start; while (dlist != NULL) { gamgi_engine_count_orbital (GAMGI_CAST_ORBITAL dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_ORBITAL) return; /* count text */ dlist = cell->text_start; while (dlist != NULL) { gamgi_engine_count_text (GAMGI_CAST_TEXT dlist->data, class, number); dlist = dlist->next; } } void gamgi_engine_count_arrow (gamgi_arrow *arrow, int class, int *number) { gamgi_dlist *dlist; if (class == GAMGI_ENGINE_ARROW) { *number += 1; return; } /* count text */ dlist = arrow->text_start; while (dlist != NULL) { gamgi_engine_count_text (GAMGI_CAST_TEXT dlist->data, class, number); dlist = dlist->next; } } void gamgi_engine_count_shape (gamgi_shape *shape, int class, int *number) { gamgi_dlist *dlist; if (class == GAMGI_ENGINE_SHAPE) { *number += 1; return; } /* count text */ dlist = shape->text_start; while (dlist != NULL) { gamgi_engine_count_text (GAMGI_CAST_TEXT dlist->data, class, number); dlist = dlist->next; } } void gamgi_engine_count_graph (gamgi_graph *graph, int class, int *number) { gamgi_dlist *dlist; if (class == GAMGI_ENGINE_GRAPH) { *number += 1; return; } /* count text */ dlist = graph->text_start; while (dlist != NULL) { gamgi_engine_count_text (GAMGI_CAST_TEXT dlist->data, class, number); dlist = dlist->next; } } void gamgi_engine_count_assembly (gamgi_assembly *assembly, int class, int *number) { gamgi_dlist *dlist; /* count assembly */ dlist = assembly->assembly_start; while (dlist != NULL) { gamgi_engine_count_assembly (GAMGI_CAST_ASSEMBLY dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_ASSEMBLY) { *number += 1; return; } /* count graph */ dlist = assembly->graph_start; while (dlist != NULL) { gamgi_engine_count_graph (GAMGI_CAST_GRAPH dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_GRAPH) return; /* count shape */ dlist = assembly->shape_start; while (dlist != NULL) { gamgi_engine_count_shape (GAMGI_CAST_SHAPE dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_SHAPE) return; /* count arrow */ dlist = assembly->arrow_start; while (dlist != NULL) { gamgi_engine_count_arrow (GAMGI_CAST_ARROW dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_ARROW) return; /* count cell */ dlist = assembly->cell_start; while (dlist != NULL) { gamgi_engine_count_cell (GAMGI_CAST_CELL dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_CELL) return; /* count cluster */ dlist = assembly->cluster_start; while (dlist != NULL) { gamgi_engine_count_cluster (GAMGI_CAST_CLUSTER dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_CLUSTER) return; /* count molecule */ dlist = assembly->molecule_start; while (dlist != NULL) { gamgi_engine_count_molecule (GAMGI_CAST_MOLECULE dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_MOLECULE) return; /* count group */ dlist = assembly->group_start; while (dlist != NULL) { gamgi_engine_count_group (GAMGI_CAST_GROUP dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_GROUP) return; /* count plane */ dlist = assembly->plane_start; while (dlist != NULL) { gamgi_engine_count_plane (GAMGI_CAST_PLANE dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_PLANE) return; /* count direction */ dlist = assembly->direction_start; while (dlist != NULL) { gamgi_engine_count_direction (GAMGI_CAST_DIRECTION dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_DIRECTION) return; /* count atom */ dlist = assembly->atom_start; while (dlist != NULL) { gamgi_engine_count_atom (GAMGI_CAST_ATOM dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_ATOM) return; /* count orbital */ dlist = assembly->orbital_start; while (dlist != NULL) { gamgi_engine_count_orbital (GAMGI_CAST_ORBITAL dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_ORBITAL) return; /* count text */ dlist = assembly->text_start; while (dlist != NULL) { gamgi_engine_count_text (GAMGI_CAST_TEXT dlist->data, class, number); dlist = dlist->next; } } void gamgi_engine_count_layer (gamgi_layer *layer, int class, int *number) { gamgi_dlist *dlist; /* count assembly */ dlist = layer->assembly_start; while (dlist != NULL) { gamgi_engine_count_assembly (GAMGI_CAST_ASSEMBLY dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_ASSEMBLY) return; /* count graph */ dlist = layer->graph_start; while (dlist != NULL) { gamgi_engine_count_graph (GAMGI_CAST_GRAPH dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_GRAPH) return; /* count shape */ dlist = layer->shape_start; while (dlist != NULL) { gamgi_engine_count_shape (GAMGI_CAST_SHAPE dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_SHAPE) return; /* count arrow */ dlist = layer->arrow_start; while (dlist != NULL) { gamgi_engine_count_arrow (GAMGI_CAST_ARROW dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_ARROW) return; /* count cell */ dlist = layer->cell_start; while (dlist != NULL) { gamgi_engine_count_cell (GAMGI_CAST_CELL dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_CELL) return; /* count cluster */ dlist = layer->cluster_start; while (dlist != NULL) { gamgi_engine_count_cluster (GAMGI_CAST_CLUSTER dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_CLUSTER) return; /* count molecule */ dlist = layer->molecule_start; while (dlist != NULL) { gamgi_engine_count_molecule (GAMGI_CAST_MOLECULE dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_MOLECULE) return; /* count group */ dlist = layer->group_start; while (dlist != NULL) { gamgi_engine_count_group (GAMGI_CAST_GROUP dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_GROUP) return; /* count plane */ dlist = layer->plane_start; while (dlist != NULL) { gamgi_engine_count_plane (GAMGI_CAST_PLANE dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_PLANE) return; /* count direction */ dlist = layer->direction_start; while (dlist != NULL) { gamgi_engine_count_direction (GAMGI_CAST_DIRECTION dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_DIRECTION) return; /* count atom */ dlist = layer->atom_start; while (dlist != NULL) { gamgi_engine_count_atom (GAMGI_CAST_ATOM dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_ATOM) return; /* count orbital */ dlist = layer->orbital_start; while (dlist != NULL) { gamgi_engine_count_orbital (GAMGI_CAST_ORBITAL dlist->data, class, number); dlist = dlist->next; } if (class == GAMGI_ENGINE_ORBITAL) return; /* count text */ dlist = layer->text_start; while (dlist != NULL) { gamgi_engine_count_text (GAMGI_CAST_TEXT dlist->data, class, number); dlist = dlist->next; } } void gamgi_engine_count_window (gamgi_window *window, gamgi_enum class, int *number) { gamgi_dlist *dlist; /*************************************** * count class objects in window scope * ***************************************/ dlist = window->layer_start; while (dlist != NULL) { gamgi_engine_count_layer (GAMGI_CAST_LAYER dlist->data, class, number); dlist = dlist->next; } } void gamgi_engine_count_gamgi (gamgi_enum class, int *number) { gamgi_window *window; /************************************** * count class objects in gamgi scope * **************************************/ window = gamgi->window_start; while (window != NULL) { gamgi_engine_count_window (window, class, number); window = window->next; } } void gamgi_engine_count_object (gamgi_object *object, gamgi_enum class, int *number) { switch (object->class) { case GAMGI_ENGINE_TEXT: gamgi_engine_count_text (GAMGI_CAST_TEXT object, class, number); break; case GAMGI_ENGINE_ORBITAL: gamgi_engine_count_orbital (GAMGI_CAST_ORBITAL object, class, number); break; case GAMGI_ENGINE_BOND: gamgi_engine_count_bond (GAMGI_CAST_BOND object, class, number); break; case GAMGI_ENGINE_ATOM: gamgi_engine_count_atom (GAMGI_CAST_ATOM object, class, number); break; case GAMGI_ENGINE_DIRECTION: gamgi_engine_count_direction (GAMGI_CAST_DIRECTION object, class, number); break; case GAMGI_ENGINE_PLANE: gamgi_engine_count_plane (GAMGI_CAST_PLANE object, class, number); break; case GAMGI_ENGINE_GROUP: gamgi_engine_count_group (GAMGI_CAST_GROUP object, class, number); break; case GAMGI_ENGINE_MOLECULE: gamgi_engine_count_molecule (GAMGI_CAST_MOLECULE object, class, number); break; case GAMGI_ENGINE_CLUSTER: gamgi_engine_count_cluster (GAMGI_CAST_CLUSTER object, class, number); break; case GAMGI_ENGINE_CELL: gamgi_engine_count_cell (GAMGI_CAST_CELL object, class, number); break; case GAMGI_ENGINE_ARROW: gamgi_engine_count_arrow (GAMGI_CAST_ARROW object, class, number); break; case GAMGI_ENGINE_SHAPE: gamgi_engine_count_shape (GAMGI_CAST_SHAPE object, class, number); break; case GAMGI_ENGINE_GRAPH: gamgi_engine_count_graph (GAMGI_CAST_GRAPH object, class, number); break; case GAMGI_ENGINE_ASSEMBLY: gamgi_engine_count_assembly (GAMGI_CAST_ASSEMBLY object, class, number); break; case GAMGI_ENGINE_LAYER: gamgi_engine_count_layer (GAMGI_CAST_LAYER object, class, number); break; default: break; } } gamgi0.17.1g/src/makefile0000644000175000017500000000164110100232276014570 0ustar carloscarlos########################################### # # $GAMGI/src/makefile # # Copyright (C) 2001, 2004 Carlos Pereira # # Distributed under the terms of the GNU # General Public License: $GAMGI/LICENSE # #========================== Gamgi paths ============================== ifndef FLAG FLAG = 1 SRC = ./ include $(SRC)make_paths #========================== Gamgi files ============================== GAMGI_o = $(GAMGI_ENGINE_o) $(GAMGI_GTK_o) $(GAMGI_MESA_o) \ $(GAMGI_MATH_o) $(GAMGI_CHEM_o) $(GAMGI_PHYS_o) \ $(GAMGI_IO_o) $(GAMGI_EXPAT_o) $(GAMGI_GLOBAL_o) GAMGI_h = $(GAMGI_ENGINE_h) $(GAMGI_GTK_h) $(GAMGI_MESA_h) \ $(GAMGI_MATH_h) $(GAMGI_CHEM_h) $(GAMGI_PHYS_h) \ $(GAMGI_IO_h) $(GAMGI_EXPAT_h) $(GAMGI_GLOBAL_h) #========================= Gamgi local =============================== include $(SRC)make_local #========================= Gamgi rules =============================== include $(SRC)make_rules endif gamgi0.17.1g/src/expat/0000755000175000017500000000000012277506767014241 5ustar carloscarlosgamgi0.17.1g/src/expat/gamgi_expat_export.c0000644000175000017500000022615612267554454020302 0ustar carloscarlos/***************************************** * * $GAMGI/src/expat/gamgi_expat_export.c * * Copyright (C) 2004 Carlos Pereira * * Distributed under the terms of the GNU * General Public License: $GAMGI/LICENSE * */ #include "gamgi_engine.h" #include "gamgi_gtk.h" #include "gamgi_math.h" #include "gamgi_chem.h" #include "gamgi_phys.h" #include "gamgi_io.h" #include "gamgi_expat.h" #include "gamgi_global.h" #include "gamgi_engine_list.h" #include "gamgi_engine_find.h" #include "gamgi_gtk_dialog.h" #include "gamgi_math_sort.h" #include "gamgi_chem_bond.h" #include "gamgi_chem_atom.h" #include "gamgi_expat_export_config.h" #include "gamgi_expat_export_object.h" #include "gamgi_io_file.h" #include "gamgi_io_x3d.h" #include "gamgi_global_selection.h" /***************** internal function ********************* * * *********************************************************/ static void static_space (FILE *fp, int space, gamgi_bool *error) { while (space-- > 0) gamgi_io_file_fprintf (fp, " ", error); } /***************** internal function ********************* * * *********************************************************/ static int static_end (FILE *fp, char *string, gamgi_bool *error) { static_space (fp, GAMGI_EXPAT_END, error); gamgi_io_file_fprintf (fp, string, error); return GAMGI_EXPAT_END; } /***************** internal function ********************* * * *********************************************************/ static int static_middle (FILE *fp, char *string, gamgi_bool *error) { static_space (fp, GAMGI_EXPAT_MIDDLE, error); gamgi_io_file_fprintf (fp, string, error); return GAMGI_EXPAT_MIDDLE; } /***************** internal function ********************* * * *********************************************************/ static int static_start (FILE *fp, char *string, int depth, gamgi_bool *error) { gamgi_io_file_fprintf (fp, "\n", error); depth = gamgi_math_sort_min (depth, GAMGI_EXPAT_DEPTH_MAX); static_space (fp, depth * GAMGI_EXPAT_START, error); gamgi_io_file_fprintf (fp, string, error); return depth * GAMGI_EXPAT_START; } /***************** external function ********************* * * *********************************************************/ void gamgi_expat_export_cdata (FILE *fp, char *string, int depth, int *column, gamgi_bool *error) { int length = strlen (string); if (*column >= 0 && *column + length < GAMGI_EXPAT_LINE) *column += length + static_middle (fp, string, error); else *column = length + static_start (fp, string, depth, error); } /***************** external function ********************* * * *********************************************************/ void gamgi_expat_export_attribute (FILE *fp, char *string, int depth, int *column, gamgi_bool *error) { int length = strlen (string); /******************************************************************* * to guarantee that the element can still be closed in the same * * line, in the worst case (/>) we need to allow for 2 more spaces * *******************************************************************/ if (*column + length < GAMGI_EXPAT_LINE - GAMGI_EXPAT_END - 2) *column += length + static_middle (fp, string, error); else *column = length + static_start (fp, string, depth, error); } /***************** external function ********************* * * *********************************************************/ void gamgi_expat_export_element (FILE *fp, char *element, char *string, int depth_parent, int *depth_last, int *column, gamgi_bool *output, gamgi_bool *error) { int depth; if (*output == FALSE) { *output = TRUE; depth = depth_parent + 1; if (depth > *depth_last) gamgi_io_file_fprintf (fp, ">", error); if (depth - *depth_last == 2) *column = strlen ("") + static_start (fp, "", depth - 1, error); *column = strlen (element) + static_start (fp, element, depth, error); *depth_last = depth; } gamgi_expat_export_attribute (fp, string, *depth_last, column, error); } void gamgi_expat_export_bond (gamgi_window *window, FILE *fp, int depth_parent, int *depth_last, gamgi_bool *error, int element1, int element2, double min, double max) { gamgi_bool output = FALSE; gamgi_expat_export_config_bond_local (window, fp, depth_parent, depth_last, &output, error, element1, element2, min, max); if (output == TRUE) static_end (fp, "/>", error); } void gamgi_expat_export_atom (gamgi_window *window, FILE *fp, int depth_parent, int *depth_last, gamgi_bool *error, int element, double mass, double radius, float red, float green, float blue) { gamgi_bool output = FALSE; gamgi_expat_export_config_atom_local (window, fp, depth_parent, depth_last, &output, error, element, mass, radius, red, green, blue); if (output == TRUE) static_end (fp, "/>", error); } static void static_cdata_double (int size, double *array, FILE *fp, int depth, gamgi_bool *error) { char string[GAMGI_ENGINE_STRING]; int column, i; /**************** * double array * ****************/ column = -1; for (i = 0; i < size; i++) { sprintf (string, "%.*f", gamgi->gamgi->length, array[i]); gamgi_expat_export_cdata (fp, string, depth, &column, error); } } static void static_cdata_float (int size, float *array, FILE *fp, int depth, gamgi_bool *error) { char string[GAMGI_ENGINE_STRING]; int column, i; /*************** * float array * ***************/ column = -1; for (i = 0; i < size; i++) { sprintf (string, "%.*f", GAMGI_MATH_DECIMAL_COLOR, array[i]); gamgi_expat_export_cdata (fp, string, depth, &column, error); } } static void static_cdata_int (int size, int *array, FILE *fp, int depth, gamgi_bool *error) { char string[GAMGI_ENGINE_STRING]; int column, i; /************* * int array * *************/ column = -1; for (i = 0; i < size; i++) { sprintf (string, "%d", array[i]); gamgi_expat_export_cdata (fp, string, depth, &column, error); } } static void static_cdata (char *name, char *type, int size, void *array, gamgi_window *window, FILE *fp, int depth_parent, int *depth_last, gamgi_bool *error) { char string[GAMGI_ENGINE_STRING]; int column, depth; depth = depth_parent + 1; if (depth > *depth_last) gamgi_io_file_fprintf (fp, ">", error); column = strlen ("", error); /************** * cdata here * **************/ if (strcmp (type, "double") == 0) static_cdata_double (size, array, fp, depth, error); if (strcmp (type, "float") == 0) static_cdata_float (size, array, fp, depth, error); if (strcmp (type, "int") == 0) static_cdata_int (size, array, fp, depth, error); static_start (fp, "", depth, error); } static void static_config_help (gamgi_window *window, FILE *fp, int depth_parent, int *depth_last, gamgi_bool *error) { gamgi_bool output = FALSE; gamgi_expat_export_config_help (window, fp, depth_parent, depth_last, &output, error); if (output == TRUE) static_end (fp, "/>", error); } static void static_config_text (gamgi_window *window, FILE *fp, int depth_parent, int *depth_last, gamgi_bool *error) { gamgi_bool output = FALSE; gamgi_expat_export_config_text (window, fp, depth_parent, depth_last, &output, error); if (output == TRUE) static_end (fp, "/>", error); } static void static_config_orbital (gamgi_window *window, FILE *fp, int depth_parent, int *depth_last, gamgi_bool *error) { gamgi_bool output = FALSE; gamgi_expat_export_config_orbital (window, fp, depth_parent, depth_last, &output, error); if (output == TRUE) static_end (fp, "/>", error); } static void static_config_bond (gamgi_window *window, FILE *fp, int depth_parent, int *depth_last, gamgi_bool *error) { gamgi_bool output = FALSE; gamgi_expat_export_config_bond_global (window, fp, depth_parent, depth_last, &output, error); if (output == TRUE) static_end (fp, "/>", error); } static void static_config_atom (gamgi_window *window, FILE *fp, int depth_parent, int *depth_last, gamgi_bool *error) { gamgi_bool output = FALSE; gamgi_expat_export_config_atom_global (window, fp, depth_parent, depth_last, &output, error); if (output == TRUE) static_end (fp, "/>", error); } static void static_config_direction (gamgi_window *window, FILE *fp, int depth_parent, int *depth_last, gamgi_bool *error) { gamgi_bool output = FALSE; gamgi_expat_export_config_direction (window, fp, depth_parent, depth_last, &output, error); if (output == TRUE) static_end (fp, "/>", error); } static void static_config_plane (gamgi_window *window, FILE *fp, int depth_parent, int *depth_last, gamgi_bool *error) { gamgi_bool output = FALSE; gamgi_expat_export_config_plane (window, fp, depth_parent, depth_last, &output, error); if (output == TRUE) static_end (fp, "/>", error); } static void static_config_group (gamgi_window *window, FILE *fp, int depth_parent, int *depth_last, gamgi_bool *error) { gamgi_bool output = FALSE; gamgi_expat_export_config_group (window, fp, depth_parent, depth_last, &output, error); if (output == TRUE) static_end (fp, "/>", error); } static void static_config_molecule (gamgi_window *window, FILE *fp, int depth_parent, int *depth_last, gamgi_bool *error) { gamgi_bool output = FALSE; gamgi_expat_export_config_molecule (window, fp, depth_parent, depth_last, &output, error); if (output == TRUE) static_end (fp, "/>", error); } static void static_config_cluster (gamgi_window *window, FILE *fp, int depth_parent, int *depth_last, gamgi_bool *error) { gamgi_bool output = FALSE; gamgi_expat_export_config_cluster (window, fp, depth_parent, depth_last, &output, error); if (output == TRUE) static_end (fp, "/>", error); } static void static_config_cell (gamgi_window *window, FILE *fp, int depth_parent, int *depth_last, gamgi_bool *error) { gamgi_bool output = FALSE; gamgi_expat_export_config_cell (window, fp, depth_parent, depth_last, &output, error); if (output == TRUE) static_end (fp, "/>", error); } static void static_config_arrow (gamgi_window *window, FILE *fp, int depth_parent, int *depth_last, gamgi_bool *error) { gamgi_bool output = FALSE; gamgi_expat_export_config_arrow (window, fp, depth_parent, depth_last, &output, error); if (output == TRUE) static_end (fp, "/>", error); } static void static_config_shape (gamgi_window *window, FILE *fp, int depth_parent, int *depth_last, gamgi_bool *error) { gamgi_bool output = FALSE; gamgi_expat_export_config_shape (window, fp, depth_parent, depth_last, &output, error); if (output == TRUE) static_end (fp, "/>", error); } static void static_config_graph (gamgi_window *window, FILE *fp, int depth_parent, int *depth_last, gamgi_bool *error) { gamgi_bool output = FALSE; gamgi_expat_export_config_graph (window, fp, depth_parent, depth_last, &output, error); if (output == TRUE) static_end (fp, "/>", error); } static void static_config_assembly (gamgi_window *window, FILE *fp, int depth_parent, int *depth_last, gamgi_bool *error) { gamgi_bool output = FALSE; gamgi_expat_export_config_assembly (window, fp, depth_parent, depth_last, &output, error); if (output == TRUE) static_end (fp, "/>", error); } static void static_config_light (gamgi_window *window, FILE *fp, int depth_parent, int *depth_last, gamgi_bool *error) { gamgi_bool output = FALSE; gamgi_expat_export_config_light (window, fp, depth_parent, depth_last, &output, error); if (output == TRUE) static_end (fp, "/>", error); } static void static_config_layer (gamgi_window *window, FILE *fp, int depth_parent, int *depth_last, gamgi_bool *error) { gamgi_bool output = FALSE; gamgi_expat_export_config_layer (window, fp, depth_parent, depth_last, &output, error); if (output == TRUE) static_end (fp, "/>", error); } static void static_config_window (gamgi_window *window, FILE *fp, int depth_parent, int *depth_last, gamgi_bool *error) { gamgi_bool output = FALSE; gamgi_expat_export_config_window (window, fp, depth_parent, depth_last, &output, error); if (output == TRUE) static_end (fp, "/>", error); } static void static_config_gamgi (gamgi_window *window, FILE *fp, int depth_parent, int *depth_last, gamgi_bool *error) { gamgi_bool output = FALSE; int depth; gamgi_expat_export_config_gamgi (window, fp, depth_parent, depth_last, &output, error); depth = depth_parent + 1; static_config_window (window, fp, depth, depth_last, error); static_config_layer (window, fp, depth, depth_last, error); static_config_light (window, fp, depth, depth_last, error); static_config_assembly (window, fp, depth, depth_last, error); static_config_graph (window, fp, depth, depth_last, error); static_config_shape (window, fp, depth, depth_last, error); static_config_arrow (window, fp, depth, depth_last, error); static_config_cell (window, fp, depth, depth_last, error); static_config_cluster (window, fp, depth, depth_last, error); static_config_molecule (window, fp, depth, depth_last, error); static_config_group (window, fp, depth, depth_last, error); static_config_plane (window, fp, depth, depth_last, error); static_config_direction (window, fp, depth, depth_last, error); static_config_atom (window, fp, depth, depth_last, error); gamgi_chem_atom_export (window, fp, depth, depth_last, error); static_config_bond (window, fp, depth, depth_last, error); gamgi_chem_bond_export (window, fp, depth, depth_last, error); static_config_orbital (window, fp, depth, depth_last, error); static_config_text (window, fp, depth, depth_last, error); static_config_help (window, fp, depth, depth_last, error); if (*depth_last == depth) static_end (fp, "/>", error); else if (*depth_last == depth + 1) static_start (fp, "", depth, error); } static void static_config (gamgi_window *window, FILE *fp, int depth_parent, int *depth_last, gamgi_bool *error) { static_config_gamgi (window, fp, depth_parent, depth_last, error); } static void static_bond_add (gamgi_object *parent, gamgi_bond *bond) { gamgi_direction *direction; gamgi_plane *plane; gamgi_group *group; gamgi_molecule *molecule; gamgi_cluster *cluster; gamgi_cell *cell; gamgi_assembly *assembly; gamgi_layer *layer; gamgi_dlist *dlist = NULL; switch (parent->class) { case GAMGI_ENGINE_DIRECTION: direction = GAMGI_CAST_DIRECTION parent; dlist = gamgi_engine_dlist_add_end (direction->bond_end); direction->bond_end = dlist; if (dlist->before == NULL) direction->bond_start = dlist; break; case GAMGI_ENGINE_PLANE: plane = GAMGI_CAST_PLANE parent; dlist = gamgi_engine_dlist_add_end (plane->bond_end); plane->bond_end = dlist; if (dlist->before == NULL) plane->bond_start = dlist; break; case GAMGI_ENGINE_GROUP: group = GAMGI_CAST_GROUP parent; dlist = gamgi_engine_dlist_add_end (group->bond_end); group->bond_end = dlist; if (dlist->before == NULL) group->bond_start = dlist; break; case GAMGI_ENGINE_MOLECULE: molecule = GAMGI_CAST_MOLECULE parent; dlist = gamgi_engine_dlist_add_end (molecule->bond_end); molecule->bond_end = dlist; if (dlist->before == NULL) molecule->bond_start = dlist; break; case GAMGI_ENGINE_CLUSTER: cluster = GAMGI_CAST_CLUSTER parent; dlist = gamgi_engine_dlist_add_end (cluster->bond_end); cluster->bond_end = dlist; if (dlist->before == NULL) cluster->bond_start = dlist; break; case GAMGI_ENGINE_CELL: cell = GAMGI_CAST_CELL parent; dlist = gamgi_engine_dlist_add_end (cell->bond_end); cell->bond_end = dlist; if (dlist->before == NULL) cell->bond_start = dlist; break; case GAMGI_ENGINE_ASSEMBLY: assembly = GAMGI_CAST_ASSEMBLY parent; dlist = gamgi_engine_dlist_add_end (assembly->bond_end); assembly->bond_end = dlist; if (dlist->before == NULL) assembly->bond_start = dlist; break; case GAMGI_ENGINE_LAYER: layer = GAMGI_CAST_LAYER parent; dlist = gamgi_engine_dlist_add_end (layer->bond_end); layer->bond_end = dlist; if (dlist->before == NULL) layer->bond_start = dlist; break; /************************ * Control should never * * reach this point * ************************/ default: break; } dlist->data = bond; } /***************** internal function ********************* * * *********************************************************/ static void static_bond_parent (gamgi_bond *bond, gamgi_window *window, gamgi_object *scope, int *id, gamgi_bool *error) { gamgi_object *parent; if (bond->first == TRUE) { parent = gamgi_engine_find_root (GAMGI_CAST_OBJECT bond->atom1, GAMGI_CAST_OBJECT bond->atom2, scope); if (parent != NULL) { /********************************************** * If the parent is out of range, the second * * atom will not appear and this bond can be * * safely discarded without further action. * * * * If a common parent is found, then the * * second atom must necessarily show up: * * we don't need to care about half bonds. * * * * atom id numbers must be saved in a place * * that the bond can reach, in order to allow * * the bond later on to identify its parent * * atoms, when the bond is actually exported * * (at the end of the common parent block) * * * * the first and second atom ids are saved * * in the unused bond->object.object and * * bond->object.dlist addresses. * * * * atom->mark is used to flag when the atom * * id identifiers must be written. If atoms * * A,B form a bond between atoms B,A, atom A * * is scanned first but marked last, so all * * atoms must be marked in the first scan, * * before their blocks are exported. * **********************************************/ bond->atom1->mark = TRUE; bond->atom2->mark = TRUE; static_bond_add (parent, bond); bond->object.object = GAMGI_INT_TO_POINTER (*id); bond->first = FALSE; } } else { bond->object.dlist = GAMGI_INT_TO_POINTER (*id); bond->first = TRUE; } } /***************** internal function ********************* * * *********************************************************/ static void static_object_text (gamgi_text *text, gamgi_window *window, gamgi_object *scope, FILE *fp, int depth_parent, int *depth_last, int *id, gamgi_bool *error) { gamgi_dlist *dlist; int column, depth; depth = depth_parent + 1; if (depth > *depth_last) gamgi_io_file_fprintf (fp, ">", error); column = strlen ("text_start; while (dlist != NULL) { static_object_text (GAMGI_CAST_TEXT dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } if (depth < *depth_last) static_start (fp, "", depth, error); else static_end (fp, "/>", error); } /***************** internal function ********************* * * *********************************************************/ static void static_object_orbital (gamgi_orbital *orbital, gamgi_window *window, gamgi_object *scope, FILE *fp, int depth_parent, int *depth_last, int *id, gamgi_bool *error) { gamgi_dlist *dlist; int column, depth; depth = depth_parent + 1; if (depth > *depth_last) gamgi_io_file_fprintf (fp, ">", error); column = strlen ("text_start; while (dlist != NULL) { static_object_text (GAMGI_CAST_TEXT dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } if (depth < *depth_last) static_start (fp, "", depth, error); else static_end (fp, "/>", error); } /***************** internal function ********************* * * *********************************************************/ static void static_object_bond (gamgi_bond *bond, gamgi_window *window, gamgi_object *scope, FILE *fp, int depth_parent, int *depth_last, int *id, gamgi_bool *error) { gamgi_dlist *dlist; int column, depth; depth = depth_parent + 1; if (depth > *depth_last) gamgi_io_file_fprintf (fp, ">", error); column = strlen ("object.object = NULL; bond->object.dlist = NULL; /****************** * child elements * ******************/ dlist = bond->orbital_start; while (dlist != NULL) { static_object_orbital (GAMGI_CAST_ORBITAL dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } dlist = bond->text_start; while (dlist != NULL) { static_object_text (GAMGI_CAST_TEXT dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } if (depth < *depth_last) static_start (fp, "", depth, error); else static_end (fp, "/>", error); } static void static_object_atom (gamgi_atom *atom, gamgi_window *window, gamgi_object *scope, FILE *fp, int depth_parent, int *depth_last, int *id, gamgi_bool *error) { gamgi_dlist *dlist; int column, depth; depth = depth_parent + 1; if (depth > *depth_last) gamgi_io_file_fprintf (fp, ">", error); column = strlen ("bond_start; while (dlist != NULL) { static_bond_parent (GAMGI_CAST_BOND dlist->data, window, scope, id, error); dlist = dlist->next; } gamgi_expat_export_object_atom (atom, fp, depth, &column, id, error); /****************** * child elements * ******************/ dlist = atom->orbital_start; while (dlist != NULL) { static_object_orbital (GAMGI_CAST_ORBITAL dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } dlist = atom->text_start; while (dlist != NULL) { static_object_text (GAMGI_CAST_TEXT dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } if (depth < *depth_last) static_start (fp, "", depth, error); else static_end (fp, "/>", error); } /***************** internal function ********************* * * *********************************************************/ static void static_object_direction (gamgi_direction *direction, gamgi_window *window, gamgi_object *scope, FILE *fp, int depth_parent, int *depth_last, int *id, gamgi_bool *error) { gamgi_dlist *dlist; int column, depth; depth = depth_parent + 1; if (depth > *depth_last) gamgi_io_file_fprintf (fp, ">", error); column = strlen ("atom_start; while (dlist != NULL) { static_object_atom (GAMGI_CAST_ATOM dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /******************* * write bond list * *******************/ dlist = direction->bond_start; while (dlist != NULL) { static_object_bond (GAMGI_CAST_BOND dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = gamgi_engine_dlist_remove_start (dlist); } direction->bond_start = NULL; direction->bond_end = NULL; /********************** * write orbital list * **********************/ dlist = direction->orbital_start; while (dlist != NULL) { static_object_orbital (GAMGI_CAST_ORBITAL dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /******************* * write text list * *******************/ dlist = direction->text_start; while (dlist != NULL) { static_object_text (GAMGI_CAST_TEXT dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } if (depth < *depth_last) static_start (fp, "", depth, error); else static_end (fp, "/>", error); } /***************** internal function ********************* * * *********************************************************/ static void static_object_plane (gamgi_plane *plane, gamgi_window *window, gamgi_object *scope, FILE *fp, int depth_parent, int *depth_last, int *id, gamgi_bool *error) { gamgi_dlist *dlist; int column, depth; depth = depth_parent + 1; if (depth > *depth_last) gamgi_io_file_fprintf (fp, ">", error); column = strlen ("direction_start; while (dlist != NULL) { static_object_direction (GAMGI_CAST_DIRECTION dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /******************* * write atom list * *******************/ dlist = plane->atom_start; while (dlist != NULL) { static_object_atom (GAMGI_CAST_ATOM dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /******************* * write bond list * *******************/ dlist = plane->bond_start; while (dlist != NULL) { static_object_bond (GAMGI_CAST_BOND dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = gamgi_engine_dlist_remove_start (dlist); } plane->bond_start = NULL; plane->bond_end = NULL; /********************** * write orbital list * **********************/ dlist = plane->orbital_start; while (dlist != NULL) { static_object_orbital (GAMGI_CAST_ORBITAL dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /******************* * write text list * *******************/ dlist = plane->text_start; while (dlist != NULL) { static_object_text (GAMGI_CAST_TEXT dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /*************************************************** * write cdata: each point has 3 coordinates x,y,z * ***************************************************/ if (plane->model == GAMGI_PHYS_POLYGON) { static_cdata ("points", "double", 3 * plane->n_points, plane->points, window, fp, depth, depth_last, error); static_cdata ("points_driver", "int", plane->n_loops, plane->loops, window, fp, depth, depth_last, error); } if (depth < *depth_last) static_start (fp, "", depth, error); else static_end (fp, "/>", error); } /***************** internal function ********************* * * *********************************************************/ static void static_object_group (gamgi_group *group, gamgi_window *window, gamgi_object *scope, FILE *fp, int depth_parent, int *depth_last, int *id, gamgi_bool *error) { gamgi_dlist *dlist; int column, depth; depth = depth_parent + 1; if (depth > *depth_last) gamgi_io_file_fprintf (fp, ">", error); column = strlen ("group_start; while (dlist != NULL) { static_object_group (GAMGI_CAST_GROUP dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /******************** * write plane list * ********************/ dlist = group->plane_start; while (dlist != NULL) { static_object_plane (GAMGI_CAST_PLANE dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /************************ * write direction list * ************************/ dlist = group->direction_start; while (dlist != NULL) { static_object_direction (GAMGI_CAST_DIRECTION dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /******************* * write atom list * *******************/ dlist = group->atom_start; while (dlist != NULL) { static_object_atom (GAMGI_CAST_ATOM dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /******************* * write bond list * *******************/ dlist = group->bond_start; while (dlist != NULL) { static_object_bond (GAMGI_CAST_BOND dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = gamgi_engine_dlist_remove_start (dlist); } group->bond_start = NULL; group->bond_end = NULL; /********************** * write orbital list * **********************/ dlist = group->orbital_start; while (dlist != NULL) { static_object_orbital (GAMGI_CAST_ORBITAL dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /******************* * write text list * *******************/ dlist = group->text_start; while (dlist != NULL) { static_object_text (GAMGI_CAST_TEXT dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /*************************************************** * write cdata: each point has 3 coordinates x,y,z * ***************************************************/ if (group->reference == GAMGI_CHEM_POLYTOPE) { static_cdata ("points", "double", 3 * group->n_points, group->points, window, fp, depth, depth_last, error); static_cdata ("points_driver", "int", group->n_loops, group->loops, window, fp, depth, depth_last, error); } if (depth < *depth_last) static_start (fp, "", depth, error); else static_end (fp, "/>", error); } /***************** internal function ********************* * * *********************************************************/ static void static_object_molecule (gamgi_molecule *molecule, gamgi_window *window, gamgi_object *scope, FILE *fp, int depth_parent, int *depth_last, int *id, gamgi_bool *error) { gamgi_dlist *dlist; int column, depth; depth = depth_parent + 1; if (depth > *depth_last) gamgi_io_file_fprintf (fp, ">", error); column = strlen ("group_start; while (dlist != NULL) { static_object_group (GAMGI_CAST_GROUP dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /******************** * write plane list * ********************/ dlist = molecule->plane_start; while (dlist != NULL) { static_object_plane (GAMGI_CAST_PLANE dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /************************ * write direction list * ************************/ dlist = molecule->direction_start; while (dlist != NULL) { static_object_direction (GAMGI_CAST_DIRECTION dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /******************* * write atom list * *******************/ dlist = molecule->atom_start; while (dlist != NULL) { static_object_atom (GAMGI_CAST_ATOM dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /******************* * write bond list * *******************/ dlist = molecule->bond_start; while (dlist != NULL) { static_object_bond (GAMGI_CAST_BOND dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = gamgi_engine_dlist_remove_start (dlist); } molecule->bond_start = NULL; molecule->bond_end = NULL; /********************** * write orbital list * **********************/ dlist = molecule->orbital_start; while (dlist != NULL) { static_object_orbital (GAMGI_CAST_ORBITAL dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /******************* * write text list * *******************/ dlist = molecule->text_start; while (dlist != NULL) { static_object_text (GAMGI_CAST_TEXT dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } if (depth < *depth_last) static_start (fp, "", depth, error); else static_end (fp, "/>", error); } /***************** internal function ********************* * * *********************************************************/ static void static_object_cluster (gamgi_cluster *cluster, gamgi_window *window, gamgi_object *scope, FILE *fp, int depth_parent, int *depth_last, int *id, gamgi_bool *error) { gamgi_dlist *dlist; int column, depth; depth = depth_parent + 1; if (depth > *depth_last) gamgi_io_file_fprintf (fp, ">", error); column = strlen ("cluster_start; while (dlist != NULL) { static_object_cluster (GAMGI_CAST_CLUSTER dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /*********************** * write molecule list * ***********************/ dlist = cluster->molecule_start; while (dlist != NULL) { static_object_molecule (GAMGI_CAST_MOLECULE dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /******************** * write group list * ********************/ dlist = cluster->group_start; while (dlist != NULL) { static_object_group (GAMGI_CAST_GROUP dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /******************** * write plane list * ********************/ dlist = cluster->plane_start; while (dlist != NULL) { static_object_plane (GAMGI_CAST_PLANE dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /************************ * write direction list * ************************/ dlist = cluster->direction_start; while (dlist != NULL) { static_object_direction (GAMGI_CAST_DIRECTION dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /******************* * write atom list * *******************/ dlist = cluster->atom_start; while (dlist != NULL) { static_object_atom (GAMGI_CAST_ATOM dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /******************* * write bond list * *******************/ dlist = cluster->bond_start; while (dlist != NULL) { static_object_bond (GAMGI_CAST_BOND dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = gamgi_engine_dlist_remove_start (dlist); } cluster->bond_start = NULL; cluster->bond_end = NULL; /********************** * write orbital list * **********************/ dlist = cluster->orbital_start; while (dlist != NULL) { static_object_orbital (GAMGI_CAST_ORBITAL dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /******************* * write text list * *******************/ dlist = cluster->text_start; while (dlist != NULL) { static_object_text (GAMGI_CAST_TEXT dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /*********************************************** * write cdata: each point has 3 coordinates * * x,y,z and each color has 3 components r,g,b * ***********************************************/ if (cluster->reference == GAMGI_CHEM_POLYTOPE) { if (cluster->points != NULL) static_cdata ("points", "double", 3 * cluster->n_points, cluster->points, window, fp, depth, depth_last, error); if (cluster->loops != NULL) static_cdata ("points_driver", "int", cluster->n_loops, cluster->loops, window, fp, depth, depth_last, error); if (cluster->colors != NULL) static_cdata ("colors", "float", 3 * cluster->n_colors, cluster->colors, window, fp, depth, depth_last, error); if (cluster->paints != NULL) static_cdata ("colors_driver", "int", cluster->n_paints, cluster->paints, window, fp, depth, depth_last, error); } if (depth < *depth_last) static_start (fp, "", depth, error); else static_end (fp, "/>", error); } /***************** internal function ********************* * * *********************************************************/ static void static_object_cell (gamgi_cell *cell, gamgi_window *window, gamgi_object *scope, FILE *fp, int depth_parent, int *depth_last, int *id, gamgi_bool *error) { gamgi_dlist *dlist; int column, depth; depth = depth_parent + 1; if (depth > *depth_last) gamgi_io_file_fprintf (fp, ">", error); column = strlen ("cluster_start; while (dlist != NULL) { static_object_cluster (GAMGI_CAST_CLUSTER dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /*********************** * write molecule list * ***********************/ dlist = cell->molecule_start; while (dlist != NULL) { static_object_molecule (GAMGI_CAST_MOLECULE dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /******************** * write group list * ********************/ dlist = cell->group_start; while (dlist != NULL) { static_object_group (GAMGI_CAST_GROUP dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /******************** * write plane list * ********************/ dlist = cell->plane_start; while (dlist != NULL) { static_object_plane (GAMGI_CAST_PLANE dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /************************ * write direction list * ************************/ dlist = cell->direction_start; while (dlist != NULL) { static_object_direction (GAMGI_CAST_DIRECTION dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /******************* * write atom list * *******************/ dlist = cell->atom_start; while (dlist != NULL) { static_object_atom (GAMGI_CAST_ATOM dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /******************* * write bond list * *******************/ dlist = cell->bond_start; while (dlist != NULL) { static_object_bond (GAMGI_CAST_BOND dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = gamgi_engine_dlist_remove_start (dlist); } cell->bond_start = NULL; cell->bond_end = NULL; /********************** * write orbital list * **********************/ dlist = cell->orbital_start; while (dlist != NULL) { static_object_orbital (GAMGI_CAST_ORBITAL dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /******************* * write text list * *******************/ dlist = cell->text_start; while (dlist != NULL) { static_object_text (GAMGI_CAST_TEXT dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } if (depth < *depth_last) static_start (fp, "", depth, error); else static_end (fp, "/>", error); } /***************** internal function ********************* * * *********************************************************/ static void static_object_arrow (gamgi_arrow *arrow, gamgi_window *window, gamgi_object *scope, FILE *fp, int depth_parent, int *depth_last, int *id, gamgi_bool *error) { gamgi_dlist *dlist; int column, depth; depth = depth_parent + 1; if (depth > *depth_last) gamgi_io_file_fprintf (fp, ">", error); column = strlen ("text_start; while (dlist != NULL) { static_object_text (GAMGI_CAST_TEXT dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } if (depth < *depth_last) static_start (fp, "", depth, error); else static_end (fp, "/>", error); } /***************** internal function ********************* * * *********************************************************/ static void static_object_shape (gamgi_shape *shape, gamgi_window *window, gamgi_object *scope, FILE *fp, int depth_parent, int *depth_last, int *id, gamgi_bool *error) { gamgi_dlist *dlist; int column, depth; depth = depth_parent + 1; if (depth > *depth_last) gamgi_io_file_fprintf (fp, ">", error); column = strlen ("text_start; while (dlist != NULL) { static_object_text (GAMGI_CAST_TEXT dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } if (depth < *depth_last) static_start (fp, "", depth, error); else static_end (fp, "/>", error); } /***************** internal function ********************* * * *********************************************************/ static void static_object_graph (gamgi_graph *graph, gamgi_window *window, gamgi_object *scope, FILE *fp, int depth_parent, int *depth_last, int *id, gamgi_bool *error) { gamgi_dlist *dlist; int column, depth; depth = depth_parent + 1; if (depth > *depth_last) gamgi_io_file_fprintf (fp, ">", error); column = strlen ("text_start; while (dlist != NULL) { static_object_text (GAMGI_CAST_TEXT dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } if (depth < *depth_last) static_start (fp, "", depth, error); else static_end (fp, "/>", error); } /***************** internal function ********************* * * *********************************************************/ static void static_object_assembly (gamgi_assembly *assembly, gamgi_window *window, gamgi_object *scope, FILE *fp, int depth_parent, int *depth_last, int *id, gamgi_bool *error) { gamgi_dlist *dlist; int column, depth; depth = depth_parent + 1; if (depth > *depth_last) gamgi_io_file_fprintf (fp, ">", error); column = strlen ("assembly_start; while (dlist != NULL) { static_object_assembly (GAMGI_CAST_ASSEMBLY dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /******************** * write graph list * ********************/ dlist = assembly->graph_start; while (dlist != NULL) { static_object_graph (GAMGI_CAST_GRAPH dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /******************** * write shape list * ********************/ dlist = assembly->shape_start; while (dlist != NULL) { static_object_shape (GAMGI_CAST_SHAPE dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /******************** * write arrow list * ********************/ dlist = assembly->arrow_start; while (dlist != NULL) { static_object_arrow (GAMGI_CAST_ARROW dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /******************* * write cell list * *******************/ dlist = assembly->cell_start; while (dlist != NULL) { static_object_cell (GAMGI_CAST_CELL dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /********************** * write cluster list * **********************/ dlist = assembly->cluster_start; while (dlist != NULL) { static_object_cluster (GAMGI_CAST_CLUSTER dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /*********************** * write molecule list * ***********************/ dlist = assembly->molecule_start; while (dlist != NULL) { static_object_molecule (GAMGI_CAST_MOLECULE dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /******************** * write group list * ********************/ dlist = assembly->group_start; while (dlist != NULL) { static_object_group (GAMGI_CAST_GROUP dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /******************** * write plane list * ********************/ dlist = assembly->plane_start; while (dlist != NULL) { static_object_plane (GAMGI_CAST_PLANE dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /************************ * write direction list * ************************/ dlist = assembly->direction_start; while (dlist != NULL) { static_object_direction (GAMGI_CAST_DIRECTION dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /******************* * write atom list * *******************/ dlist = assembly->atom_start; while (dlist != NULL) { static_object_atom (GAMGI_CAST_ATOM dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /******************* * write bond list * *******************/ dlist = assembly->bond_start; while (dlist != NULL) { static_object_bond (GAMGI_CAST_BOND dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = gamgi_engine_dlist_remove_start (dlist); } assembly->bond_start = NULL; assembly->bond_end = NULL; /********************** * write orbital list * **********************/ dlist = assembly->orbital_start; while (dlist != NULL) { static_object_orbital (GAMGI_CAST_ORBITAL dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /******************* * write text list * *******************/ dlist = assembly->text_start; while (dlist != NULL) { static_object_text (GAMGI_CAST_TEXT dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } if (depth < *depth_last) static_start (fp, "", depth, error); else static_end (fp, "/>", error); } /***************** internal function ********************* * * *********************************************************/ static void static_object_light (gamgi_light *light, gamgi_window *window, gamgi_object *scope, FILE *fp, int depth_parent, int *depth_last, int *id, gamgi_bool *error) { int column, depth; depth = depth_parent + 1; if (depth > *depth_last) gamgi_io_file_fprintf (fp, ">", error); column = strlen ("", depth, error); else static_end (fp, "/>", error); } /***************** internal function ********************* * * *********************************************************/ static void static_object_layer (gamgi_layer *layer, gamgi_window *window, gamgi_object *scope, FILE *fp, int depth_parent, int *depth_last, int *id, gamgi_bool *error) { gamgi_dlist *dlist; int column, depth; depth = depth_parent + 1; if (depth > *depth_last) gamgi_io_file_fprintf (fp, ">", error); column = strlen ("light_start; while (dlist != NULL) { static_object_light (GAMGI_CAST_LIGHT dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /*********************** * write assembly list * ***********************/ dlist = layer->assembly_start; while (dlist != NULL) { static_object_assembly (GAMGI_CAST_ASSEMBLY dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /******************** * write graph list * ********************/ dlist = layer->graph_start; while (dlist != NULL) { static_object_graph (GAMGI_CAST_GRAPH dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /******************** * write shape list * ********************/ dlist = layer->shape_start; while (dlist != NULL) { static_object_shape (GAMGI_CAST_SHAPE dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /******************** * write arrow list * ********************/ dlist = layer->arrow_start; while (dlist != NULL) { static_object_arrow (GAMGI_CAST_ARROW dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /******************* * write cell list * *******************/ dlist = layer->cell_start; while (dlist != NULL) { static_object_cell (GAMGI_CAST_CELL dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /********************** * write cluster list * **********************/ dlist = layer->cluster_start; while (dlist != NULL) { static_object_cluster (GAMGI_CAST_CLUSTER dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /*********************** * write molecule list * ***********************/ dlist = layer->molecule_start; while (dlist != NULL) { static_object_molecule (GAMGI_CAST_MOLECULE dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /******************** * write group list * ********************/ dlist = layer->group_start; while (dlist != NULL) { static_object_group (GAMGI_CAST_GROUP dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /******************** * write plane list * ********************/ dlist = layer->plane_start; while (dlist != NULL) { static_object_plane (GAMGI_CAST_PLANE dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /************************ * write direction list * ************************/ dlist = layer->direction_start; while (dlist != NULL) { static_object_direction (GAMGI_CAST_DIRECTION dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /******************* * write atom list * *******************/ dlist = layer->atom_start; while (dlist != NULL) { static_object_atom (GAMGI_CAST_ATOM dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /******************* * write bond list * *******************/ dlist = layer->bond_start; while (dlist != NULL) { static_object_bond (GAMGI_CAST_BOND dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = gamgi_engine_dlist_remove_start (dlist); } layer->bond_start = NULL; layer->bond_end = NULL; /********************** * write orbital list * **********************/ dlist = layer->orbital_start; while (dlist != NULL) { static_object_orbital (GAMGI_CAST_ORBITAL dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } /******************* * write text list * *******************/ dlist = layer->text_start; while (dlist != NULL) { static_object_text (GAMGI_CAST_TEXT dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } if (depth < *depth_last) static_start (fp, "", depth, error); else static_end (fp, "/>", error); } /***************** internal function ********************* * * *********************************************************/ static void static_object_window (gamgi_window *window, gamgi_object *scope, FILE *fp, int depth_parent, int *depth_last, int *id, gamgi_bool *error) { gamgi_dlist *dlist; int column, depth; depth = depth_parent + 1; if (depth > *depth_last) gamgi_io_file_fprintf (fp, ">", error); column = strlen ("layer_start; while (dlist != NULL) { static_object_layer (GAMGI_CAST_LAYER dlist->data, window, scope, fp, depth, depth_last, id, error); dlist = dlist->next; } if (depth < *depth_last) static_start (fp, "", depth, error); else static_end (fp, "/>", error); } static void static_bond_atom (gamgi_atom *atom, gamgi_window *window, FILE *fp, int depth_parent, int *depth_last, int *id, gamgi_bool *error) { int mark; /*********************************** * save atom->mark as this is * * reset in static_object_atom * * * * set scope to atom, so bonds are * * ignored in static_object_atom * ***********************************/ if (atom->mark == 0) { mark = atom->mark = *id; static_object_atom (atom, window, GAMGI_CAST_OBJECT atom, fp, depth_parent, depth_last, id, error); atom->mark = mark; } } static void static_bond_id (gamgi_bond *bond, gamgi_window *window, FILE *fp, int depth_parent, int *depth_last, int *id, gamgi_bool *error) { bond->object.object = GAMGI_INT_TO_POINTER (bond->atom1->mark); bond->object.dlist = GAMGI_INT_TO_POINTER (bond->atom2->mark); static_object_bond (bond, window, GAMGI_CAST_OBJECT bond, fp, depth_parent, depth_last, id, error); } static void static_bond_single (gamgi_bond *bond, gamgi_window *window, FILE *fp, int depth_parent, int *depth_last, int *id, gamgi_bool *error) { static_bond_atom (bond->atom1, window, fp, depth_parent, depth_last, id, error); static_bond_atom (bond->atom2, window, fp, depth_parent, depth_last, id, error); static_bond_id (bond, window, fp, depth_parent, depth_last, id, error); bond->atom1->mark = 0; bond->atom2->mark = 0; } static void static_object_text_list (gamgi_window *window, FILE *fp, int depth_parent, int *depth_last, int *id, gamgi_bool *error) { gamgi_text *text; gamgi_dlist *dlist; /******************* * write text list * *******************/ for (dlist = gamgi->texts; dlist != NULL; dlist = dlist->next) gamgi_global_selection_text (GAMGI_CAST_TEXT dlist->data, TRUE); for (dlist = gamgi->texts; dlist != NULL; dlist = dlist->next) { text = GAMGI_CAST_TEXT dlist->data; if (text->mark == FALSE) static_object_text (text, window, GAMGI_CAST_OBJECT text, fp, depth_parent, depth_last, id, error); } for (dlist = gamgi->texts; dlist != NULL; dlist = dlist->next) gamgi_global_selection_text (GAMGI_CAST_TEXT dlist->data, FALSE); } static void static_object_orbital_list (gamgi_window *window, FILE *fp, int depth_parent, int *depth_last, int *id, gamgi_bool *error) { gamgi_dlist *dlist; /********************** * write orbital list * **********************/ for (dlist = gamgi->orbitals; dlist != NULL; dlist = dlist->next) static_object_orbital (GAMGI_CAST_ORBITAL dlist->data, window, GAMGI_CAST_OBJECT dlist->data, fp, depth_parent, depth_last, id, error); } static void static_object_bond_list (gamgi_window *window, FILE *fp, int depth_parent, int *depth_last, int *id, gamgi_bool *error) { gamgi_dlist *dlist; gamgi_bond *bond; /******************* * write bond list * *******************/ /********************************************** * export atoms, saving ids in atom->mark and * * ignoring lists of bonds pointed from atoms * **********************************************/ for (dlist = gamgi->bonds; dlist != NULL; dlist = dlist->next) { bond = GAMGI_CAST_BOND dlist->data; static_bond_atom (bond->atom1, window, fp, depth_parent, depth_last, id, error); static_bond_atom (bond->atom2, window, fp, depth_parent, depth_last, id, error); } /*********************************************** * export bonds, using ids saved in atom->mark * ***********************************************/ for (dlist = gamgi->bonds; dlist != NULL; dlist = dlist->next) static_bond_id (GAMGI_CAST_BOND dlist->data, window, fp, depth_parent, depth_last, id, error); /*************** * clean atoms * ***************/ for (dlist = gamgi->bonds; dlist != NULL; dlist = dlist->next) { bond = GAMGI_CAST_BOND dlist->data; bond->atom1->mark = 0; bond->atom2->mark = 0; } } static void static_object_atom_list (gamgi_window *window, FILE *fp, int depth_parent, int *depth_last, int *id, gamgi_bool *error) { gamgi_dlist *dlist; /******************* * write atom list * *******************/ for (dlist = gamgi->atoms; dlist != NULL; dlist = dlist->next) static_object_atom (GAMGI_CAST_ATOM dlist->data, window, GAMGI_CAST_OBJECT dlist->data, fp, depth_parent, depth_last, id, error); } static void static_object_direction_list (gamgi_window *window, FILE *fp, int depth_parent, int *depth_last, int *id, gamgi_bool *error) { gamgi_dlist *dlist; /************************ * write direction list * ************************/ for (dlist = gamgi->directions; dlist != NULL; dlist = dlist->next) static_object_direction (GAMGI_CAST_DIRECTION dlist->data, window, GAMGI_CAST_OBJECT dlist->data, fp, depth_parent, depth_last, id, error); } static void static_object_plane_list (gamgi_window *window, FILE *fp, int depth_parent, int *depth_last, int *id, gamgi_bool *error) { gamgi_dlist *dlist; /******************** * write plane list * ********************/ for (dlist = gamgi->planes; dlist != NULL; dlist = dlist->next) static_object_plane (GAMGI_CAST_PLANE dlist->data, window, GAMGI_CAST_OBJECT dlist->data, fp, depth_parent, depth_last, id, error); } static void static_object_group_list (gamgi_window *window, FILE *fp, int depth_parent, int *depth_last, int *id, gamgi_bool *error) { gamgi_group *group; gamgi_dlist *dlist; /********************** * write cluster list * **********************/ for (dlist = gamgi->groups; dlist != NULL; dlist = dlist->next) gamgi_global_selection_group (GAMGI_CAST_GROUP dlist->data, TRUE); for (dlist = gamgi->groups; dlist != NULL; dlist = dlist->next) { group = GAMGI_CAST_GROUP dlist->data; if (group->mark == FALSE) static_object_group (group, window, GAMGI_CAST_OBJECT group, fp, depth_parent, depth_last, id, error); } for (dlist = gamgi->groups; dlist != NULL; dlist = dlist->next) gamgi_global_selection_group (GAMGI_CAST_GROUP dlist->data, FALSE); } static void static_object_molecule_list (gamgi_window *window, FILE *fp, int depth_parent, int *depth_last, int *id, gamgi_bool *error) { gamgi_dlist *dlist; /*********************** * write molecule list * ***********************/ for (dlist = gamgi->molecules; dlist != NULL; dlist = dlist->next) static_object_molecule (GAMGI_CAST_MOLECULE dlist->data, window, GAMGI_CAST_OBJECT dlist->data, fp, depth_parent, depth_last, id, error); } static void static_object_cluster_list (gamgi_window *window, FILE *fp, int depth_parent, int *depth_last, int *id, gamgi_bool *error) { gamgi_cluster *cluster; gamgi_dlist *dlist; /********************** * write cluster list * **********************/ for (dlist = gamgi->clusters; dlist != NULL; dlist = dlist->next) gamgi_global_selection_cluster (GAMGI_CAST_CLUSTER dlist->data, TRUE); for (dlist = gamgi->clusters; dlist != NULL; dlist = dlist->next) { cluster = GAMGI_CAST_CLUSTER dlist->data; if (cluster->mark == FALSE) static_object_cluster (cluster, window, GAMGI_CAST_OBJECT cluster, fp, depth_parent, depth_last, id, error); } for (dlist = gamgi->clusters; dlist != NULL; dlist = dlist->next) gamgi_global_selection_cluster (GAMGI_CAST_CLUSTER dlist->data, FALSE); } static void static_object_cell_list (gamgi_window *window, FILE *fp, int depth_parent, int *depth_last, int *id, gamgi_bool *error) { gamgi_dlist *dlist; /******************* * write cell list * *******************/ for (dlist = gamgi->cells; dlist != NULL; dlist = dlist->next) static_object_cell (GAMGI_CAST_CELL dlist->data, window, GAMGI_CAST_OBJECT dlist->data, fp, depth_parent, depth_last, id, error); } static void static_object_arrow_list (gamgi_window *window, FILE *fp, int depth_parent, int *depth_last, int *id, gamgi_bool *error) { gamgi_dlist *dlist; /******************** * write arrow list * ********************/ for (dlist = gamgi->arrows; dlist != NULL; dlist = dlist->next) static_object_arrow (GAMGI_CAST_ARROW dlist->data, window, GAMGI_CAST_OBJECT dlist->data, fp, depth_parent, depth_last, id, error); } static void static_object_shape_list (gamgi_window *window, FILE *fp, int depth_parent, int *depth_last, int *id, gamgi_bool *error) { gamgi_dlist *dlist; /******************** * write shape list * ********************/ for (dlist = gamgi->shapes; dlist != NULL; dlist = dlist->next) static_object_shape (GAMGI_CAST_SHAPE dlist->data, window, GAMGI_CAST_OBJECT dlist->data, fp, depth_parent, depth_last, id, error); } static void static_object_graph_list (gamgi_window *window, FILE *fp, int depth_parent, int *depth_last, int *id, gamgi_bool *error) { gamgi_dlist *dlist; /******************** * write graph list * ********************/ for (dlist = gamgi->graphs; dlist != NULL; dlist = dlist->next) static_object_graph (GAMGI_CAST_GRAPH dlist->data, window, GAMGI_CAST_OBJECT dlist->data, fp, depth_parent, depth_last, id, error); } static void static_object_assembly_list (gamgi_window *window, FILE *fp, int depth_parent, int *depth_last, int *id, gamgi_bool *error) { gamgi_assembly *assembly; gamgi_dlist *dlist; for (dlist = gamgi->assemblys; dlist != NULL; dlist = dlist->next) gamgi_global_selection_assembly (GAMGI_CAST_ASSEMBLY dlist->data, TRUE); for (dlist = gamgi->assemblys; dlist != NULL; dlist = dlist->next) { assembly = GAMGI_CAST_ASSEMBLY dlist->data; if (assembly->mark == FALSE) static_object_assembly (assembly, window, GAMGI_CAST_OBJECT assembly, fp, depth_parent, depth_last, id, error); } for (dlist = gamgi->assemblys; dlist != NULL; dlist = dlist->next) gamgi_global_selection_assembly (GAMGI_CAST_ASSEMBLY dlist->data, FALSE); } static void static_object_light_list (gamgi_window *window, FILE *fp, int depth_parent, int *depth_last, int *id, gamgi_bool *error) { gamgi_dlist *dlist; /******************** * write light list * ********************/ for (dlist = gamgi->lights; dlist != NULL; dlist = dlist->next) static_object_light (GAMGI_CAST_LIGHT dlist->data, window, GAMGI_CAST_OBJECT dlist->data, fp, depth_parent, depth_last, id, error); } static void static_object_layer_list (gamgi_window *window, FILE *fp, int depth_parent, int *depth_last, int *id, gamgi_bool *error) { gamgi_dlist *dlist; /******************** * write layer list * ********************/ for (dlist = gamgi->layers; dlist != NULL; dlist = dlist->next) static_object_layer (GAMGI_CAST_LAYER dlist->data, window, GAMGI_CAST_OBJECT dlist->data, fp, depth_parent, depth_last, id, error); } static void static_object_window_list (FILE *fp, int depth_parent, int *depth_last, int *id, gamgi_bool *error) { gamgi_dlist *dlist; /********************* * write window list * *********************/ for (dlist = gamgi->windows; dlist != NULL; dlist = dlist->next) static_object_window (GAMGI_CAST_WINDOW dlist->data, GAMGI_CAST_OBJECT dlist->data, fp, depth_parent, depth_last, id, error); } static void static_object_gamgi_list (FILE *fp, int depth_parent, int *depth_last, int *id, gamgi_bool *error) { gamgi_window *window; /******************** * write gamgi list * ********************/ for (window = gamgi->window_start; window != NULL; window = window->next) static_object_window (window, GAMGI_CAST_OBJECT window, fp, depth_parent, depth_last, id, error); } void static_object_list (gamgi_window *window, FILE *fp, int depth_parent, int *depth_last, int *id, gamgi_bool *error) { switch (gamgi->focus) { case GAMGI_ENGINE_TEXT: static_object_text_list (window, fp, depth_parent, depth_last, id, error); break; case GAMGI_ENGINE_ORBITAL: static_object_orbital_list (window, fp, depth_parent, depth_last, id, error); break; case GAMGI_ENGINE_BOND: static_object_bond_list (window, fp, depth_parent, depth_last, id, error); break; case GAMGI_ENGINE_ATOM: static_object_atom_list (window, fp, depth_parent, depth_last, id, error); break; case GAMGI_ENGINE_DIRECTION: static_object_direction_list (window, fp, depth_parent, depth_last, id, error); break; case GAMGI_ENGINE_PLANE: static_object_plane_list (window, fp, depth_parent, depth_last, id, error); break; case GAMGI_ENGINE_GROUP: static_object_group_list (window, fp, depth_parent, depth_last, id, error); break; case GAMGI_ENGINE_MOLECULE: static_object_molecule_list (window, fp, depth_parent, depth_last, id, error); break; case GAMGI_ENGINE_CLUSTER: static_object_cluster_list (window, fp, depth_parent, depth_last, id, error); break; case GAMGI_ENGINE_CELL: static_object_cell_list (window, fp, depth_parent, depth_last, id, error); break; case GAMGI_ENGINE_ARROW: static_object_arrow_list (window, fp, depth_parent, depth_last, id, error); break; case GAMGI_ENGINE_SHAPE: static_object_shape_list (window, fp, depth_parent, depth_last, id, error); break; case GAMGI_ENGINE_GRAPH: static_object_graph_list (window, fp, depth_parent, depth_last, id, error); break; case GAMGI_ENGINE_ASSEMBLY: static_object_assembly_list (window, fp, depth_parent, depth_last, id, error); break; case GAMGI_ENGINE_LIGHT: static_object_light_list (window, fp, depth_parent, depth_last, id, error); break; case GAMGI_ENGINE_LAYER: static_object_layer_list (window, fp, depth_parent, depth_last, id, error); break; case GAMGI_ENGINE_WINDOW: static_object_window_list (fp, depth_parent, depth_last, id, error); break; case GAMGI_ENGINE_GAMGI: static_object_gamgi_list (fp, depth_parent, depth_last, id, error); break; default: return; } } static void static_object (gamgi_window *window, FILE *fp, int depth_parent, int *depth_last, gamgi_bool *error) { gamgi_object *object = window->focus; int id = 1; if (gamgi->focus != FALSE) { static_object_list (window, fp, depth_parent, depth_last, &id, error); return; } switch (object->class) { case GAMGI_ENGINE_TEXT: static_object_text (GAMGI_CAST_TEXT object, window, object, fp, depth_parent, depth_last, &id, error); break; case GAMGI_ENGINE_ORBITAL: static_object_orbital (GAMGI_CAST_ORBITAL object, window, object, fp, depth_parent, depth_last, &id, error); break; case GAMGI_ENGINE_BOND: static_bond_single (GAMGI_CAST_BOND object, window, fp, depth_parent, depth_last, &id, error); break; case GAMGI_ENGINE_ATOM: static_object_atom (GAMGI_CAST_ATOM object, window, object, fp, depth_parent, depth_last, &id, error); break; case GAMGI_ENGINE_DIRECTION: static_object_direction (GAMGI_CAST_DIRECTION object, window, object, fp, depth_parent, depth_last, &id, error); break; case GAMGI_ENGINE_PLANE: static_object_plane (GAMGI_CAST_PLANE object, window, object, fp, depth_parent, depth_last, &id, error); break; case GAMGI_ENGINE_GROUP: static_object_group (GAMGI_CAST_GROUP object, window, object, fp, depth_parent, depth_last, &id, error); break; case GAMGI_ENGINE_MOLECULE: static_object_molecule (GAMGI_CAST_MOLECULE object, window, object, fp, depth_parent, depth_last, &id, error); break; case GAMGI_ENGINE_CLUSTER: static_object_cluster (GAMGI_CAST_CLUSTER object, window, object, fp, depth_parent, depth_last, &id, error); break; case GAMGI_ENGINE_CELL: static_object_cell (GAMGI_CAST_CELL object, window, object, fp, depth_parent, depth_last, &id, error); break; case GAMGI_ENGINE_ARROW: static_object_arrow (GAMGI_CAST_ARROW object, window, object, fp, depth_parent, depth_last, &id, error); break; case GAMGI_ENGINE_SHAPE: static_object_shape (GAMGI_CAST_SHAPE object, window, object, fp, depth_parent, depth_last, &id, error); break; case GAMGI_ENGINE_GRAPH: static_object_graph (GAMGI_CAST_GRAPH object, window, object, fp, depth_parent, depth_last, &id, error); break; case GAMGI_ENGINE_ASSEMBLY: static_object_assembly (GAMGI_CAST_ASSEMBLY object, window, object, fp, depth_parent, depth_last, &id, error); break; case GAMGI_ENGINE_LIGHT: static_object_light (GAMGI_CAST_LIGHT object, window, object, fp, depth_parent, depth_last, &id, error); break; case GAMGI_ENGINE_LAYER: static_object_layer (GAMGI_CAST_LAYER object, window, object, fp, depth_parent, depth_last, &id, error); break; case GAMGI_ENGINE_WINDOW: static_object_window (window, object, fp, depth_parent, depth_last, &id, error); break; } } static void static_header_xml (FILE *fp, gamgi_bool *error) { char string[GAMGI_ENGINE_LINE]; int column; /******************************** * first row: XML common header * ********************************/ gamgi_io_file_fprintf (fp, "\n", error); } static void static_header_gml (FILE *fp, gamgi_bool *error) { char string[GAMGI_ENGINE_LINE]; int column; /************* * first row * *************/ static_header_xml (fp, error); /************** * second row * **************/ gamgi_io_file_fprintf (fp, "\n", error); } static void static_header_x3d (FILE *fp, gamgi_bool *error) { char string[GAMGI_ENGINE_LINE]; int column; /************* * first row * *************/ static_header_xml (fp, error); /************** * second row * **************/ gamgi_io_file_fprintf (fp, "\n", error); } int gamgi_expat_export_length (gamgi_text *text) { char *s; int i; /*********************************************** * get buffer size (add 1 to count final '\0') * ***********************************************/ i = 0; for (s = text->string; *s != '\0'; s++) { i++; if (*s == '<' || *s == '>') i += 3; else if (*s == '&') i += 4; else if (*s == '\'' || *s == '\"') i += 5; } return i; } void gamgi_expat_export_string (gamgi_text *text, char *buffer) { char *s; int i; /****************************** * translate string to buffer * ******************************/ i = 0; for (s = text->string; *s != '\0'; s++) { switch (*s) { case '<': buffer[i++] = '&'; buffer[i++] = 'l'; buffer[i++] = 't'; buffer[i++] = ';'; break; case '>': buffer[i++] = '&'; buffer[i++] = 'g'; buffer[i++] = 't'; buffer[i++] = ';'; break; case '&': buffer[i++] = '&'; buffer[i++] = 'a'; buffer[i++] = 'm'; buffer[i++] = 'p'; buffer[i++] = ';'; break; case '\'': buffer[i++] = '&'; buffer[i++] = 'a'; buffer[i++] = 'p'; buffer[i++] = 'o'; buffer[i++] = 's'; buffer[i++] = ';'; break; case '\"': buffer[i++] = '&'; buffer[i++] = 'q'; buffer[i++] = 'u'; buffer[i++] = 'o'; buffer[i++] = 't'; buffer[i++] = ';'; break; default: buffer[i++] = *s; break; } } buffer[i] = '\0'; } void gamgi_expat_export_gml (FILE *fp, gamgi_window *window, gamgi_bool *error) { int depth = GAMGI_EXPAT_DEPTH_MIN; int depth_last = GAMGI_EXPAT_DEPTH_MIN; /******************** * write gml header * ********************/ if (GAMGI_EXPAT_HEADER_GML == TRUE) static_header_gml (fp, error); /*********************** * start gml root node * ***********************/ static_space (fp, depth * GAMGI_EXPAT_START, error); gamgi_io_file_fprintf (fp, "", error); else static_start (fp, "", depth, error); gamgi_io_file_fprintf (fp, "\n", error); } void gamgi_expat_export_x3d (FILE *fp, gamgi_window *window, gamgi_bool *error) { char string[GAMGI_ENGINE_LINE]; int depth = 0; /******************** * write X3D header * ********************/ if (GAMGI_EXPAT_HEADER_X3D == TRUE) static_header_x3d (fp, error); /*********************** * start X3D root node * ***********************/ sprintf (string, "\n", GAMGI_IO_X3D_PROFILE, GAMGI_IO_X3D_VERSION); gamgi_io_file_fprintf (fp, string, error); /******************************************************** * export in X3D format everything in the current layer * ********************************************************/ gamgi_io_x3d (fp, window, error); /********************* * end X3D root node * *********************/ static_start (fp, "", depth, error); gamgi_io_file_fprintf (fp, "\n", error); } gamgi0.17.1g/src/expat/gamgi_expat_import_help.h0000644000175000017500000000711210435070027021255 0ustar carloscarlos/********************************************** * * $GAMGI/src/expat/gamgi_expat_import_help.h * * Copyright (C) 2004 Carlos Pereira * * Distributed under the terms of the GNU * General Public License: $GAMGI/LICENSE * */ /********************** * internal functions * ********************** static gamgi_bool static_html_end (const char *element, gamgi_html *html); static gamgi_bool static_html_start (const char *element, const char **attributes, gamgi_html *html); static gamgi_bool static_head_end (const char *element, gamgi_html *html); static gamgi_bool static_head_start (const char *element, const char **attributes, gamgi_html *html); static gamgi_bool static_title_end (const char *element, gamgi_html *html); static gamgi_bool static_title_start (const char *element, const char **attributes, gamgi_html *html); static gamgi_bool static_link_end (const char *element, gamgi_html *html); static gamgi_bool static_link_start (const char *element, const char **attributes, gamgi_html *html); static gamgi_bool static_body_end (const char *element, gamgi_html *html); static gamgi_bool static_body_start (const char *element, const char **attributes, gamgi_html *html); static gamgi_bool static_div_end (const char *element, gamgi_html *html); static gamgi_bool static_div_start (const char *element, const char **attributes, gamgi_html *html); static gamgi_bool static_span_end (const char *element, gamgi_html *html); static gamgi_bool static_span_start (const char *element, const char **attributes, gamgi_html *html); static gamgi_bool static_ul_end (const char *element, gamgi_html *html); static gamgi_bool static_ul_start (const char *element, const char **attributes, gamgi_html *html); static gamgi_bool static_ol_end (const char *element, gamgi_html *html); static gamgi_bool static_ol_start (const char *element, const char **attributes, gamgi_html *html); static gamgi_bool static_li_end (const char *element, gamgi_html *html); static gamgi_bool static_li_start (const char *element, const char **attributes, gamgi_html *html); static gamgi_bool static_h1_end (const char *element, gamgi_html *html); static gamgi_bool static_h1_start (const char *element, const char **attributes, gamgi_html *html); static gamgi_bool static_h3_end (const char *element, gamgi_html *html); static gamgi_bool static_h3_start (const char *element, const char **attributes, gamgi_html *html); static gamgi_bool static_a_end (const char *element, gamgi_html *html); static gamgi_bool static_a_start (const char *element, const char **attributes, gamgi_html *html); static gamgi_bool static_img_end (const char *element, gamgi_html *html); static gamgi_bool static_img_start (const char *element, const char **attributes, gamgi_html *html); static gamgi_bool static_pre_end (const char *element, gamgi_html *html); static gamgi_bool static_pre_start (const char *element, const char **attributes, gamgi_html *html); static gamgi_bool static_p_end (const char *element, gamgi_html *html); static gamgi_bool static_p_start (const char *element, const char **attributes, gamgi_html *html); static gamgi_bool static_b_end (const char *element, gamgi_html *html); static gamgi_bool static_b_start (const char *element, const char **attributes, gamgi_html *html); ********************** * external functions * **********************/ void gamgi_expat_import_help_end (void *data, const char *element); void gamgi_expat_import_help_start (void *data, const char *element, const char **attributes); /************* * Rationale * ************* Under development. ************* * Rationale * *************/ gamgi0.17.1g/src/expat/gamgi_expat_import.h0000644000175000017500000000573711552333766020275 0ustar carloscarlos/****************************************** * * $GAMGI/src/expat/gamgi_expat_import.h * * Copyright (C) 2004 Carlos Pereira * * Distributed under the terms of the GNU * General Public License: $GAMGI/LICENSE * */ /********************** * internal functions * ********************** static void static_remove (gamgi_gml *gml, gamgi_bool valid); static void static_config (gamgi_gml *gml); static void static_object (gamgi_gml *gml); static void static_doctype_gml (void *data, const char *doctype, const char *system_id, const char *public_id, int internal); static void static_doctype_html (void *data, const char *doctype, const char *system_id, const char *public_id, int internal); static void static_cdata_ml (void *data, const char *cdata, int length); static void static_cdata_gml (void *data, const char *cdata, int length); static void static_cdata_html (void *data, const char *cdata, int length); static gamgi_bool static_parent_gml (gamgi_enum element, gamgi_enum parent); static gamgi_bool static_parent_html (gamgi_enum element, gamgi_enum parent); static char *static_file (char *shortname, gamgi_gml *gml); static gamgi_bool static_import_gml (const char *fullname, gamgi_ml *ml); static gamgi_bool static_import_html (const char *fullname, gamgi_ml *ml); static gamgi_bool static_entity_gml (XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *system_id, const XML_Char *public_id); static gamgi_bool static_entity_html (XML_Parser parser, const XML_Char *context, const XML_Char *base, const XML_Char *system_id, const XML_Char *public_id); static void static_create_ml (gamgi_ml *ml, XML_Parser parser, gamgi_window *window); static gamgi_gml *static_create_gml (XML_Parser parser, gamgi_window *window); static gamgi_html *static_create_html (XML_Parser parser, GtkWidget *vbox, gamgi_window *window); ********************** * external functions * **********************/ gamgi_bool gamgi_expat_import_plane (gamgi_plane *plane, gamgi_object *parent, char *filename, int fileline, gamgi_gml *gml); gamgi_bool gamgi_expat_import_direction (gamgi_direction *direction, gamgi_object *parent, char *filename, int fileline, gamgi_gml *gml); gamgi_dlist *gamgi_expat_import_id_get (char *id, gamgi_gml *gml, unsigned int hash); void gamgi_expat_import_id_add (char *id, gamgi_gml *gml, unsigned int hash); void gamgi_expat_import_ref_add (char *idref, gamgi_gml *gml); gamgi_bool gamgi_expat_import_connect (gamgi_gml *gml); gamgi_bool gamgi_expat_import_file (int fd, char *body, int size, void *data); gamgi_bool gamgi_expat_import_parent_gml (gamgi_enum element, gamgi_gml *gml); gamgi_bool gamgi_expat_import_parent_html (gamgi_enum element, gamgi_html *html); gamgi_bool gamgi_expat_import_gml (char *filename, gamgi_window *window); gamgi_bool gamgi_expat_import_html (char *filename, GtkWidget *vbox, gamgi_window *window); /************* * Rationale * ************* Under development. ************* * Rationale * *************/ gamgi0.17.1g/src/expat/gamgi_expat_import.c0000644000175000017500000016056012254435510020252 0ustar carloscarlos/****************************************** * * $GAMGI/src/expat/gamgi_expat_import.c * * Copyright (C) 2004 Carlos Pereira * * Distributed under the terms of the GNU * General Public License: $GAMGI/LICENSE * */ #include "gamgi_engine.h" #include "gamgi_gtk.h" #include "gamgi_mesa.h" #include "gamgi_expat.h" #include "gamgi_math.h" #include "gamgi_phys.h" #include "gamgi_io.h" #include "gamgi_global.h" #include "gamgi_engine_list.h" #include "gamgi_engine_find.h" #include "gamgi_engine_dlist.h" #include "gamgi_engine_link.h" #include "gamgi_engine_remove.h" #include "gamgi_gtk_dialog.h" #include "gamgi_gtk_object.h" #include "gamgi_gtk_history.h" #include "gamgi_gtk_window_create.h" #include "gamgi_mesa_lists.h" #include "gamgi_mesa_rotate_out.h" #include "gamgi_math_vector.h" #include "gamgi_math_matrix.h" #include "gamgi_math_euler.h" #include "gamgi_math_quaternion.h" #include "gamgi_math_hash.h" #include "gamgi_math_node.h" #include "gamgi_math_position.h" #include "gamgi_chem_bond.h" #include "gamgi_phys_direction.h" #include "gamgi_phys_projection.h" #include "gamgi_phys_reciprocal.h" #include "gamgi_io_token.h" #include "gamgi_io_file.h" #include "gamgi_expat_import.h" #include "gamgi_expat_import_object.h" #include "gamgi_expat_import_config.h" #include "gamgi_expat_import_help.h" #include "gamgi_io_error.h" #include "gamgi_global_remove.h" static void static_remove (gamgi_gml *gml, gamgi_bool valid) { gamgi_slist *slist; gamgi_dlist *dlist; gamgi_object *object; free (gml->id); free (gml->ref); free (gml->id_object); free (gml->ref_object); free (gml->ref_line); free (gml->ref_file); gamgi_math_hash_remove (gml->hash, GAMGI_EXPAT_HASH_SIZE); /***************************** * remove list of file names * *****************************/ slist = gml->files; while (slist != NULL) { free (slist->data); slist = gamgi_engine_slist_remove_start (slist); } /************************************************************* * For well behaved input files, gml->parent will be NULL at * * this stage. Otherwise, gml->parent stack must be removed. * *************************************************************/ slist = gml->ml.parent; while (slist != NULL) slist = gamgi_engine_slist_remove_start (slist); /************************************************* * 1) gml->object_start->data must be NULL, as * * the first dlist node is always for . * * Elsewhere, dlist->data is always non NULL. * * * * 2) gml->object_start will be NULL if an * * error occurs before or inside . * *************************************************/ dlist = gml->object_start; if (dlist != NULL) dlist = gamgi_engine_dlist_remove_start (dlist); /**************** * data cleanup * ****************/ while (dlist != NULL) { object = GAMGI_CAST_OBJECT dlist->data; if (valid == FALSE) gamgi_engine_remove_object (object); dlist = gamgi_engine_dlist_remove_start (dlist); } /****************** * config cleanup * ******************/ object = GAMGI_CAST_OBJECT gamgi->gamgi; if (object->object != NULL) { gamgi_global_remove_gamgi ((gamgi_gamgi_class *) object->object); object->object = NULL; } object = GAMGI_CAST_OBJECT gamgi->window; if (object->object != NULL) { gamgi_global_remove_window ((gamgi_window_class *) object->object); object->object = NULL; } object = GAMGI_CAST_OBJECT gamgi->layer; if (object->object != NULL) { gamgi_global_remove_layer ((gamgi_layer_class *) object->object); object->object = NULL; } object = GAMGI_CAST_OBJECT gamgi->light; if (object->object != NULL) { gamgi_global_remove_light ((gamgi_light_class *) object->object); object->object = NULL; } object = GAMGI_CAST_OBJECT gamgi->assembly; if (object->object != NULL) { gamgi_global_remove_assembly ((gamgi_assembly_class *) object->object); object->object = NULL; } object = GAMGI_CAST_OBJECT gamgi->graph; if (object->object != NULL) { gamgi_global_remove_graph ((gamgi_graph_class *) object->object); object->object = NULL; } object = GAMGI_CAST_OBJECT gamgi->shape; if (object->object != NULL) { gamgi_global_remove_shape ((gamgi_shape_class *) object->object); object->object = NULL; } object = GAMGI_CAST_OBJECT gamgi->arrow; if (object->object != NULL) { gamgi_global_remove_arrow ((gamgi_arrow_class *) object->object); object->object = NULL; } object = GAMGI_CAST_OBJECT gamgi->cell; if (object->object != NULL) { gamgi_global_remove_cell ((gamgi_cell_class *) object->object); object->object = NULL; } object = GAMGI_CAST_OBJECT gamgi->cluster; if (object->object != NULL) { gamgi_global_remove_cluster ((gamgi_cluster_class *) object->object); object->object = NULL; } object = GAMGI_CAST_OBJECT gamgi->molecule; if (object->object != NULL) { gamgi_global_remove_molecule ((gamgi_molecule_class *) object->object); object->object = NULL; } object = GAMGI_CAST_OBJECT gamgi->group; if (object->object != NULL) { gamgi_global_remove_group ((gamgi_group_class *) object->object); object->object = NULL; } object = GAMGI_CAST_OBJECT gamgi->plane; if (object->object != NULL) { gamgi_global_remove_plane ((gamgi_plane_class *) object->object); object->object = NULL; } object = GAMGI_CAST_OBJECT gamgi->direction; if (object->object != NULL) { gamgi_global_remove_direction ((gamgi_direction_class *) object->object); object->object = NULL; } object = GAMGI_CAST_OBJECT gamgi->atom; if (object->object != NULL) { gamgi_global_remove_atom ((gamgi_atom_class *) object->object); object->object = NULL; } object = GAMGI_CAST_OBJECT gamgi->bond; if (object->object != NULL) { gamgi_global_remove_bond ((gamgi_bond_class *) object->object); object->object = NULL; } object = GAMGI_CAST_OBJECT gamgi->orbital; if (object->object != NULL) { gamgi_global_remove_orbital ((gamgi_orbital_class *) object->object); object->object = NULL; } object = GAMGI_CAST_OBJECT gamgi->text; if (object->object != NULL) { gamgi_global_remove_text ((gamgi_text_class *) object->object); object->object = NULL; } object = GAMGI_CAST_OBJECT gamgi->help; if (object->object != NULL) { gamgi_global_remove_help ((gamgi_help_class *) object->object); object->object = NULL; } free (gml); } static void static_config (gamgi_gml *gml) { gamgi_object *object, *object_old; gamgi_atom_class *atom; object = GAMGI_CAST_OBJECT gamgi->gamgi; if (object->object != NULL) { object_old = object; gamgi->gamgi = (gamgi_gamgi_class *) object->object; object->object = object_old; } object = GAMGI_CAST_OBJECT gamgi->window; if (object->object != NULL) { object_old = object; gamgi->window = (gamgi_window_class *) object->object; object->object = object_old; } object = GAMGI_CAST_OBJECT gamgi->layer; if (object->object != NULL) { object_old = object; gamgi->layer = (gamgi_layer_class *) object->object; object->object = object_old; /****************************************** * The number of undo/save allowed levels * * might have changed: remove all levels * * in GAMGI that pass the new limit. * *****************************************/ gamgi_gtk_history_gamgi_reset (); } object = GAMGI_CAST_OBJECT gamgi->light; if (object->object != NULL) { object_old = object; gamgi->light = (gamgi_light_class *) object->object; object->object = object_old; } object = GAMGI_CAST_OBJECT gamgi->assembly; if (object->object != NULL) { object_old = object; gamgi->assembly = (gamgi_assembly_class *) object->object; object->object = object_old; } object = GAMGI_CAST_OBJECT gamgi->graph; if (object->object != NULL) { object_old = object; gamgi->graph = (gamgi_graph_class *) object->object; object->object = object_old; } object = GAMGI_CAST_OBJECT gamgi->shape; if (object->object != NULL) { object_old = object; gamgi->shape = (gamgi_shape_class *) object->object; object->object = object_old; } object = GAMGI_CAST_OBJECT gamgi->arrow; if (object->object != NULL) { object_old = object; gamgi->arrow = (gamgi_arrow_class *) object->object; object->object = object_old; } object = GAMGI_CAST_OBJECT gamgi->cell; if (object->object != NULL) { object_old = object; gamgi->cell = (gamgi_cell_class *) object->object; object->object = object_old; } object = GAMGI_CAST_OBJECT gamgi->cluster; if (object->object != NULL) { object_old = object; gamgi->cluster = (gamgi_cluster_class *) object->object; object->object = object_old; } object = GAMGI_CAST_OBJECT gamgi->molecule; if (object->object != NULL) { object_old = object; gamgi->molecule = (gamgi_molecule_class *) object->object; object->object = object_old; } object = GAMGI_CAST_OBJECT gamgi->group; if (object->object != NULL) { object_old = object; gamgi->group = (gamgi_group_class *) object->object; object->object = object_old; } object = GAMGI_CAST_OBJECT gamgi->plane; if (object->object != NULL) { object_old = object; gamgi->plane = (gamgi_plane_class *) object->object; object->object = object_old; } object = GAMGI_CAST_OBJECT gamgi->direction; if (object->object != NULL) { object_old = object; gamgi->direction = (gamgi_direction_class *) object->object; object->object = object_old; } object = GAMGI_CAST_OBJECT gamgi->atom; if (object->object != NULL) { atom = (gamgi_atom_class *) object->object; /****************************************** * recreate OpenGL pre-compiled shared * * lists with the new width/slices values * ******************************************/ if (atom->width != gamgi->atom->width) { gamgi_mesa_lists_cross (atom->width); gamgi_mesa_lists_line (atom->width); } if (atom->slices != gamgi->atom->slices) { gamgi_mesa_lists_sphere (atom->slices, atom->slices); gamgi_mesa_lists_cylinder_1 (atom->slices, 1); gamgi_mesa_lists_cylinder_3 (atom->slices, 1); gamgi_mesa_lists_cylinder_5 (atom->slices, 1); } object_old = object; gamgi->atom = (gamgi_atom_class *) object->object; object->object = object_old; } object = GAMGI_CAST_OBJECT gamgi->bond; if (object->object != NULL) { object_old = object; gamgi->bond = (gamgi_bond_class *) object->object; object->object = object_old; } object = GAMGI_CAST_OBJECT gamgi->orbital; if (object->object != NULL) { object_old = object; gamgi->orbital = (gamgi_orbital_class *) object->object; object->object = object_old; } object = GAMGI_CAST_OBJECT gamgi->text; if (object->object != NULL) { object_old = object; gamgi->text = (gamgi_text_class *) object->object; object->object = object_old; } object = GAMGI_CAST_OBJECT gamgi->help; if (object->object != NULL) { object_old = object; gamgi->help = (gamgi_help_class *) object->object; object->object = object_old; } } static void static_object (gamgi_gml *gml) { gamgi_window *window; gamgi_layer *layer; gamgi_cell *cell; gamgi_plane *plane; gamgi_direction *direction; gamgi_object *object; gamgi_dlist *dlist; /****************************** * first object is , so * * we start with the next one * ******************************/ for (dlist = gml->object_start->next; dlist != NULL; dlist = dlist->next) { object = GAMGI_CAST_OBJECT dlist->data; switch (object->class) { /************************************************************ * for each new window, window->layer and window->focus * * are updated immediately everytime a new layer is found * * because if an error is found the whole window is removed * ************************************************************/ case GAMGI_ENGINE_WINDOW: window = GAMGI_CAST_WINDOW object; gamgi_gtk_window_create (window, window->layer); break; /***************************************************** * for the current window, window->layer is set only * * here, after error checking, because if an error * * is found we must go back to the initial window * * * * window->focus is kept untouched, to check later * * if the current object is gamgi, the global object * *****************************************************/ case GAMGI_ENGINE_LAYER: layer = GAMGI_CAST_LAYER object; window = GAMGI_CAST_WINDOW object->object; gamgi_engine_link_layer_window (layer, window); if (window == gml->ml.window) window->layer = layer; break; case GAMGI_ENGINE_PLANE: gamgi_engine_link_object_object (object, object->object); plane = GAMGI_CAST_PLANE object; if (plane->reference == GAMGI_ENGINE_CELL) { /************************** * crystallographic plane * **************************/ cell = GAMGI_CAST_CELL object->object; if (cell->model == GAMGI_PHYS_PROJECTION) { gamgi_phys_projection_create (plane->model, &plane->points, &plane->n_points, &plane->loops, &plane->n_loops); gamgi_mesa_rotate_out_plane (plane, NULL, NULL, NULL); } if (plane->model == GAMGI_PHYS_VECTOR) gamgi_phys_reciprocal_points (plane); } break; case GAMGI_ENGINE_DIRECTION: gamgi_engine_link_object_object (object, object->object); direction = GAMGI_CAST_DIRECTION object; if (direction->reference == GAMGI_ENGINE_CELL) { /****************************** * crystallographic direction * ******************************/ cell = GAMGI_CAST_CELL object->object; if (cell->model == GAMGI_PHYS_PROJECTION) { gamgi_phys_projection_create (direction->model, &direction->points, &direction->n_points, &direction->loops, &direction->n_loops); gamgi_mesa_rotate_out_direction (direction, NULL, NULL, NULL); } } break; default: gamgi_engine_link_object_object (object, object->object); break; } } /************************************************************ * Update current window: when this point is reached, the * * top layer (that existed before or was created by the * * importing operation) is always equal to window->layer * * and window->focus retains the original value. When this * * value is gamgi->gamgi, the other windows statusbars must * * be updated again. Unless this happens, the other windows * * already show the right data when created. * ************************************************************/ window = gml->ml.window; gamgi_gtk_object_layer_local (window->layer, window); gamgi_gtk_object_focus_local (GAMGI_CAST_OBJECT window->layer, window); } static void static_doctype_gml (void *data, const char *doctype, const char *system_id, const char *public_id, int internal) { gamgi_ml *ml = GAMGI_CAST_ML data; int fileline; /****************************************** * used only in error messages: file line * * indicates where current header starts * ******************************************/ fileline = XML_GetCurrentLineNumber (ml->parser); if (strcmp (doctype, "gml") != 0) { ml->valid = gamgi_io_error_header (doctype, ml->filename, fileline, ml->window); } else if (system_id != NULL && strcmp (system_id, GAMGI_IO_GML_SYSTEM) != 0) { ml->valid = gamgi_io_error_header (system_id, ml->filename, fileline, ml->window); } else if (public_id != NULL && strcmp (public_id, GAMGI_IO_GML_PUBLIC) != 0) { ml->valid = gamgi_io_error_header (public_id, ml->filename, fileline, ml->window); } } static void static_doctype_html (void *data, const char *doctype, const char *system_id, const char *public_id, int internal) { gamgi_ml *ml = GAMGI_CAST_ML data; int fileline; /****************************************** * used only in error messages: file line * * indicates where current header starts * ******************************************/ fileline = XML_GetCurrentLineNumber (ml->parser); if (strcmp (doctype, "html") != 0) { ml->valid = gamgi_io_error_header (doctype, ml->filename, fileline, ml->window); } else if (system_id != NULL && strcmp (system_id, GAMGI_IO_HTML_SYSTEM) != 0) { ml->valid = gamgi_io_error_header (system_id, ml->filename, fileline, ml->window); } else if (public_id != NULL && strcmp (public_id, GAMGI_IO_HTML_PUBLIC) != 0) { ml->valid = gamgi_io_error_header (public_id, ml->filename, fileline, ml->window); } } static void static_cdata_ml (void *data, const char *cdata, int length) { gamgi_ml *ml = GAMGI_CAST_ML data; char line[GAMGI_ENGINE_LINE]; int fileline; /****************************************** * used only in error messages: file line * * indicates where current cdata starts * ******************************************/ fileline = XML_GetCurrentLineNumber (ml->parser); /*************************************************** * Adding 1 to length is needed because cdata * * is NOT NULL terminated, so its size is one * * char larger than reported by EXPAT callback. * * * * If the number of (ignored) char in element * * content cannot fit in a GAMGI line string, * * an error is immediately reported without * * even checking whether the char are good or not. * * This test is not as stringent as it looks, * * because EXPAT feeds GAMGI with a new cdata * * batch every time a new line char is found, this * * way resetting the char count and allowing an * * unlimited number of delimiter char in element * * content, as long as each line is not larger * * than GAMGI_ENGINE_LINE. * ***************************************************/ if (length + 1 > GAMGI_ENGINE_LINE) ml->valid = gamgi_io_error_cdata (ml->filename, fileline, ml->window); else { gamgi_io_token_cut (cdata, line, length + 1); /*********************************** * Only delimiter char (by default * * defined by GAMGI_IO_DELIMITERS) * * are allowed in element content. * ***********************************/ if (gamgi_io_token_check (line) == TRUE) ml->valid = gamgi_io_error_cdata (ml->filename, fileline, ml->window); } } static void static_cdata_gml (void *data, const char *cdata, int length) { gamgi_gml *gml = GAMGI_CAST_GML data; char *token, *string; double dvalue; float fvalue; int ivalue; int n, fileline; /****************************************** * used only in error messages: file line * * indicates where current cdata starts * ******************************************/ fileline = XML_GetCurrentLineNumber (gml->ml.parser); /******************************************************* * For most elements, only delimiter char (defined by * * GAMGI_IO_DELIMITERS) are allowed as character data. * *******************************************************/ if (gml->type == FALSE) { static_cdata_ml (data, cdata, length); return; } /******************************************************************* * Character data in Expat is handled like this: * * 1) when cdata continues, cdata[length] == '\0' * * 2) when cdata ends and a element starts, cdata[length] == '<' * * 3) when cdata ends and a new line starts cdata[length] == '\n' * * in cases 2 and 3, a new callback is issued, reporting only a * * end of line. In Linux, length = 1, and cdata[length - 1] = '\n' * * * * The whole strategy is: concatenate line until a end * * of line is found, then parse the line and restart again * * * * To catch ends of line, looking for Char 10 (Linux), Char 13 * * (Mac OS X) or Char 10 + Char 13 (Windows) should be enough * * * * Make sure there is space to end line with a '\0' character * *******************************************************************/ if (gml->used + length + 1 > GAMGI_ENGINE_LINE) { gml->ml.valid = gamgi_io_error_cdata (gml->ml.filename, fileline, gml->ml.window); return; } strncpy (gml->line + gml->used, cdata, length); gml->used += length; if (cdata[length - 1] != 10 && cdata[length - 1] != 13) return; /********************************************* * parse line looking for tokens that can be * * converted into doubles, floats or ints * *********************************************/ gml->line[gml->used] = '\0'; for (string = gml->line; (token = strtok (string, GAMGI_IO_DELIMITERS)) != NULL; string = NULL) { if (gml->count == gml->size) { gml->ml.valid = gamgi_io_error_incompatible (gml->ml.filename, fileline, gml->ml.window); return; } n = 0; if (gml->type == GAMGI_EXPAT_DOUBLE) n = sscanf (token, "%lf", &dvalue); if (gml->type == GAMGI_EXPAT_FLOAT) n = sscanf (token, "%f", &fvalue); if (gml->type == GAMGI_EXPAT_INT) n = sscanf (token, "%d", &ivalue); if (n != 1) { gml->ml.valid = gamgi_io_error_cdata (gml->ml.filename, fileline, gml->ml.window); return; } if (gml->type == GAMGI_EXPAT_DOUBLE) ((double *) gml->array)[gml->count] = dvalue; if (gml->type == GAMGI_EXPAT_FLOAT) ((float *) gml->array)[gml->count] = fvalue; if (gml->type == GAMGI_EXPAT_INT) ((int *) gml->array)[gml->count] = ivalue; gml->count += 1; } gml->used = 0; } static void static_cdata_html (void *data, const char *cdata, int length) { gamgi_html *html = GAMGI_CAST_HTML data; gamgi_enum parent; int i, fileline; char character; /****************************************** * used only in error messages: file line * * indicates where current cdata starts * ******************************************/ fileline = XML_GetCurrentLineNumber (html->ml.parser); /******************************************************* * For most elements, only delimiter char (defined by * * GAMGI_IO_DELIMITERS) are allowed as character data. * *******************************************************/ parent = GAMGI_POINTER_TO_INT (html->ml.parent->data); if (parent == GAMGI_EXPAT_HTML || parent == GAMGI_EXPAT_HEAD || parent == GAMGI_EXPAT_LINK || parent == GAMGI_EXPAT_UL || parent == GAMGI_EXPAT_OL || parent == GAMGI_EXPAT_BR) { static_cdata_ml (data, cdata, length); return; } /***************************************************** * insert data, line by line instead of char by char * *****************************************************/ for (i = 0; i < length; i++) { character = cdata[i]; /********************************************** * make sure that every character belongs to * * ISO-8859-1 standard (basically ASCII with * * accents), even if cdata comes from outside * * a contents block and thus will be ignored. * **********************************************/ if (strchr (GAMGI_IO_FONT_88591, character) == NULL) { html->ml.valid = gamgi_io_error_cdata (html->ml.filename, fileline, html->ml.window); return; } /*********************************************************** * if character is outside a