コード例 #1
0
 internal virtual void addStructure(Structure structure)
 {
     if (structureCount == structures.Length)
     {
         structures = (Structure[])AtomSetCollectionReader.setLength(structures, structureCount + 32);
     }
     structures[structureCount++] = structure;
 }
コード例 #2
0
        ////////////////////////////////////////////////////////////////
        // atomSet stuff
        ////////////////////////////////////////////////////////////////

        internal virtual void newAtomSet()
        {
            //    System.out.println("newAtomSet()");
            currentAtomSetIndex = atomSetCount++;
            if (atomSetCount > atomSetNumbers.Length)
            {
                atomSetNumbers    = AtomSetCollectionReader.doubleLength(atomSetNumbers);
                atomSetNames      = AtomSetCollectionReader.doubleLength(atomSetNames);
                atomSetAtomCounts = AtomSetCollectionReader.doubleLength(atomSetAtomCounts);
                //UPGRADE_ISSUE: Class hierarchy differences between 'java.util.Properties' and 'System.Collections.Specialized.NameValueCollection' may cause compilation errors. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1186'"
                atomSetProperties = (System.Collections.Specialized.NameValueCollection[])AtomSetCollectionReader.doubleLength(atomSetProperties);
            }
            atomSetNumbers[currentAtomSetIndex] = atomSetCount;
        }
コード例 #3
0
 internal virtual void addBond(Bond bond)
 {
     /*
      * System.out.println("I see a bond:" + bond.atomIndex1 + "-" +
      * bond.atomIndex2 + ":" + bond.order);
      */
     if (bond.atomIndex1 < 0 || bond.atomIndex2 < 0 || bond.order <= 0)
     {
         /*
          * System.out.println(">>>>>>BAD BOND:" + bond.atomIndex1 + "-" +
          * bond.atomIndex2 + ":" + bond.order);
          */
         return;
     }
     if (bondCount == bonds.Length)
     {
         bonds = (Bond[])AtomSetCollectionReader.setLength(bonds, bondCount + 1024);
     }
     bonds[bondCount++] = bond;
 }
コード例 #4
0
        internal virtual void addAtom(Atom atom)
        {
            if (atomCount == atoms.Length)
            {
                atoms = (Atom[])AtomSetCollectionReader.doubleLength(atoms);
            }
            atoms[atomCount++] = atom;
            if (atomSetCount == 0)
            {
                atomSetCount        = 1;
                currentAtomSetIndex = 0;
                atomSetNumbers[0]   = 1;
            }
            atom.atomSetIndex = currentAtomSetIndex;
            ++atomSetAtomCounts[currentAtomSetIndex];

            /*
             * System.out.println("addAtom ... after" +
             * "\natomCount=" + atomCount +
             * "\natomSetCount=" + atomSetCount +
             * "\natomSetAtomCounts[" + (currentAtomSetIndex) + "]=" +
             * atomSetAtomCounts[atomSetIndex]);
             */
        }