示例#1
0
        public int GetMultiplicity(string axis)
        {
            SymmetryDescriptor descriptor = SymmetryBuilderFactory.GetDescriptor(this.GetType());

            for (int i = 0; i < descriptor.Units.Length; i++)
            {
                if (descriptor.Units[i].Equals(axis, StringComparison.InvariantCultureIgnoreCase))
                {
                    return(descriptor.Multiplicities[i]);
                }
            }
            throw new ArgumentException(String.Format("{0} has no unit {1}", descriptor.Architecture, axis));
        }
示例#2
0
        public IList <string> GetAxesWithMultiplicity(int multiplicity)
        {
            List <string>      axes       = new List <string>();
            SymmetryDescriptor descriptor = SymmetryBuilderFactory.GetDescriptor(this.GetType());

            for (int i = 0; i < descriptor.Units.Length; i++)
            {
                if (descriptor.Multiplicities[i] == multiplicity)
                {
                    axes.Add(descriptor.Units[i]);
                }
            }
            return(axes);
        }
示例#3
0
 public string GetArchitecture()
 {
     return(SymmetryBuilderFactory.GetDescriptor(this.GetType()).Architecture);
 }
示例#4
0
 // unused
 public string[] GetUnits()
 {
     return(SymmetryBuilderFactory.GetDescriptor(this.GetType()).Units);
 }