public Element(int atomicNumber, double valence, double molarAbundance = 1, XrayLine line = XrayLine.Ka, double count = 0, double countTime = 1) { Z = atomicNumber; AtomicName = AtomConstants.AtomicName(Z); MolarAbundance = molarAbundance; Valence = valence; // Isotopes = AtomConstants.IsotopeAbundance[Z]; MolarWeight = AtomConstants.AtomicWeight(Z); }
/// <summary> /// 単原子分子のコンストラクタ /// </summary> /// <param name="z">原子番号</param> /// <param name="valence">価数</param> /// <param name="weightRatio">重量比</param> public Molecule(int z, double valence = 0, double weightRatio = 0, double molarAbundance = 0) { if (z != 0) { Element e = new Element(z, 0); Elements = new List <Element>(); Elements.Add(e); e.MolarAbundance = 1; MolarWeight = e.MolarWeight; Valence = valence; WeightRatio = weightRatio; MolarAbundance = molarAbundance; Formula = AtomConstants.AtomicName(z); } }
static Bonds() { var anionNum = new List <int> { 8, 9, 16, 17, 34, 35, 52, 53 }; Anions = anionNum.Select(n => $"{n}: {AtomConstants.AtomicName(n)}").ToList(); var cationNum = new List <int>(); cationNum.AddRange(Enumerable.Range(3, 5)); cationNum.AddRange(Enumerable.Range(11, 5)); cationNum.AddRange(Enumerable.Range(19, 15)); cationNum.AddRange(Enumerable.Range(37, 15)); cationNum.AddRange(Enumerable.Range(55, 20)); Cations = cationNum.Select(n => $"{n}: {AtomConstants.AtomicName(n)}").ToList(); }
/// <summary> /// Vesta標準のボンドを生成. 入力形式は、原子番号の配列 /// </summary> /// <param name="atomicNumbers"></param> /// <returns></returns> public static Bonds[] GetVestaBonds(IEnumerable <int> atomicNumbers) => GetVestaBonds(atomicNumbers.Select(n => $"{n}: {AtomConstants.AtomicName(n)}"));