Exemplo n.º 1
0
        public static Selection GetCnInterAsuContacts(IStructure cnAsymmetricUnit, int multiplicity, Vector3 axis)
        {
            AxisPattern <IStructure> pattern = new AxisPattern <IStructure>(axis, multiplicity, cnAsymmetricUnit);

            IStructure[] others    = pattern[1, multiplicity - 1].ToArray(); // CxUtilities.Pattern(cnAsymmetricUnit, axis, multiplicity, new int[] { 0 }, true);
            Selection    selection = Clash.GetContactSelectionInFocusSet(new IStructure[] { cnAsymmetricUnit }, others);

            return(selection);
        }
Exemplo n.º 2
0
        public static Selection GetCnInterAsuContacts(IStructure cnAsymmetricUnit, int multiplicity, Line axis, Clash.ContactType contactType = Clash.ContactType.Atomic)
        {
            IStructure mirror = cnAsymmetricUnit.GetMirroredElement(true, null);
            AxisPattern <IStructure> pattern = new AxisPattern <IStructure>(axis.Point, axis.Direction, multiplicity, mirror, new int[] { 0 });

            IStructure[] others    = pattern.ToArray();//[1, multiplicity - 1].ToArray(); // CxUtilities.Pattern(cnAsymmetricUnit, axis, multiplicity, new int[] { 0 }, true);
            Selection    selection = Clash.GetContactSelectionInFocusSet(new IStructure[] { cnAsymmetricUnit }, others, contactType);

            return(selection);
        }
Exemplo n.º 3
0
        public static bool[][] GetCnInterAsuContactBools(IStructure asu, int multiplicity, Vector3 axis)
        {
            asu = (IStructure)asu.DeepCopy();
            IStructure mirror = asu.GetMirroredElement(true, null);
            AxisPattern <IStructure> pattern = new AxisPattern <IStructure>(axis, multiplicity, mirror, new int[] { 0 });

            IStructure[] neighbors = pattern.ToArray();

            //IStructure[] neighbors = CxUtilities.Pattern(asu, axis, multiplicity, new int[] { 0 }, true);

            Selection contactAas = Clash.GetContactSelectionInFocusSet(new IStructure[] { asu }, neighbors, Clash.ContactType.Atomic);

            bool[][] contacts = asu.Select(chain => chain.Select(aa => contactAas.Aas.Contains(aa)).ToArray()).ToArray();
            return(contacts);
        }