Пример #1
0
        public OrbitalBond(
            AtomWithOrbitals atom1,
            Orbital orbital1,
            AtomWithOrbitals atom2,
            Orbital orbital2)
            : base(atom1, atom2)
        {
            if (orbital1.AssociatedBond != null ||
                orbital2.AssociatedBond != null)
            {
                throw new ChemistryException("Cannot create bond between orbits which are already assicated to a bond");
            }
            if (orbital1.IsEmpty || orbital2.IsEmpty)
            {
                throw new ChemistryException("Cannot create bond between orbitals if any is empty");
            }
            if (orbital1.IsFull || orbital2.IsFull)
            {
                throw new ChemistryException("Cannot create bond between orbitals if any is full");
            }
            Orbital1 = orbital1;
            Orbital2 = orbital2;

            ShareElectrons(Orbital1, Orbital2);
        }
Пример #2
0
 public Orbital(AtomWithOrbitals atom, int period, OrbitalType type)
 {
     Atom   = atom;
     Period = period;
     Type   = type;
 }