예제 #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);
 }