コード例 #1
0
ファイル: ChemicalStandard.cs プロジェクト: lulzzz/PDIndexer
 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);
 }
コード例 #2
0
ファイル: ChemicalStandard.cs プロジェクト: lulzzz/PDIndexer
 /// <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);
     }
 }
コード例 #3
0
ファイル: BondsAndPolyhedra.cs プロジェクト: lulzzz/PDIndexer
        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();
        }
コード例 #4
0
ファイル: BondsAndPolyhedra.cs プロジェクト: lulzzz/PDIndexer
 /// <summary>
 /// Vesta標準のボンドを生成. 入力形式は、原子番号の配列
 /// </summary>
 /// <param name="atomicNumbers"></param>
 /// <returns></returns>
 public static Bonds[] GetVestaBonds(IEnumerable <int> atomicNumbers) => GetVestaBonds(atomicNumbers.Select(n => $"{n}: {AtomConstants.AtomicName(n)}"));