예제 #1
0
        public static HessRTB GetHessRTBByBlockAsResidue(HessMatrix hess, Vector[] coords, double[] masses, Universe.Atom[] atoms, string opt)
        {
            int leng = coords.Length;

            HDebug.Exception
                (leng == hess.ColBlockSize
                , leng == hess.RowBlockSize
                , leng == coords.Length
                , leng == masses.Length
                , leng == atoms.Length
                , "length does not match"
                );

            List <int[]> blocks = new List <int[]>();

            foreach (var group in atoms.GroupByResidue())
            {
                List <int> block = new List <int>();
                foreach (var atom in group)
                {
                    block.Add(atom.ID);
                }
                blocks.Add(block.ToArray());
            }

            return(BuilderHessRTB.GetHessRTB(hess, coords, masses, blocks, opt));
        }
예제 #2
0
 public static HessRTB GetHessRTB(HessMatrix hess, Vector[] coords, double[] masses, IList <int[]> blocks, string opt)
 {
     return(BuilderHessRTB.GetHessRTB(hess, coords, masses, blocks, opt));
 }