Пример #1
0
 internal virtual void addStructure(Structure structure)
 {
     if (structureCount == structures.Length)
     {
         structures = (Structure[])AtomSetCollectionReader.setLength(structures, structureCount + 32);
     }
     structures[structureCount++] = structure;
 }
Пример #2
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;
 }