Exemplo n.º 1
0
 public bool SetBondCountWithSpecialUnknownHandling(PotentialBond potentialBond, BondCount bondCount)
 {
     if (!atoms.ContainsKey(potentialBond.coords) || !atoms.ContainsKey(potentialBond.getCoordsOfOtherBonder()))
     {
         return(false);
     }
     if (bondCount > (BondCount)GetBondCountAsInt(potentialBond))
     {
         Atom sourceAtom = atoms[potentialBond.coords];
         if (sourceAtom.element != Element.Unknown &&
             (GetTotalBondsAt(potentialBond.coords) - GetBondCountAsInt(potentialBond) + bondCount > (BondCount)sourceAtom.GetMaxBonds()))
         {
             // source atom would be over max. bonds
             return(false);
         }
         Atom targetAtom = atoms[potentialBond.getCoordsOfOtherBonder()];
         if (targetAtom.element != Element.Unknown &&
             (GetTotalBondsAt(potentialBond.getCoordsOfOtherBonder()) - GetBondCountAsInt(potentialBond) + bondCount > (BondCount)targetAtom.GetMaxBonds()))
         {
             // target atom would be over max. bonds
             return(false);
         }
     }
     SetBondCount(potentialBond, new BondCount?(bondCount));
     return(true);
 }
Exemplo n.º 2
0
 public bool SetBondCountWithoutMaxBondsCheck(PotentialBond potentialBond, BondCount bondCount)
 {
     if (!atoms.ContainsKey(potentialBond.coords) || !atoms.ContainsKey(potentialBond.getCoordsOfOtherBonder()))
     {
         return(false);
     }
     SetBondCount(potentialBond, new BondCount?(bondCount));
     return(true);
 }
Exemplo n.º 3
0
 private int GetBondCountAsInt(PotentialBond bond)
 {
     return(0);
 }
Exemplo n.º 4
0
 public bool RemoveBond(PotentialBond potentialBond)
 {
     return(false);
 }
Exemplo n.º 5
0
 public void SetBondCount(PotentialBond potentialBond, BondCount?bondCount)
 {
 }
Exemplo n.º 6
0
 public static IEnumerable <MoleculeDefinition> BreakBond(MoleculeDefinition moleculeDefinition, PotentialBond bondToRemove)
 {
     return(null);
 }
Exemplo n.º 7
0
 public bool SetBondCountWithMaxBondsCheck(PotentialBond potentialBond, BondCount bondCount)
 {
     return(false);
 }
Exemplo n.º 8
0
 public BondCount?GetBondCount(PotentialBond potentialBond)
 {
     return(null);
 }