Ejemplo n.º 1
0
                a_new.xyz.put_as_list(mtx.do_to_array(a.xyz.get_as_list()))
                r_aa.push_atom(a_new)
            """ Adjust the position of P to be exactly identical """
            if args.flg_Pexact:
                aaP = Coord()
                nP = 0
                for a in r_aa.atoms:
                    if a.name.strip() in ("P", "OP1", "OP2", "O1P", "O2P"):
                        aaP = aaP + a.xyz
                        nP += 1
                if nP != 3:
                    print('Error: nP != 3, ir=,', ir)
                    f_log.write('Error: nP != 3, ir=%i' % ir)
                    sys.exit(2)
                aaP = aaP / float(3)
                trans = xyzP2 - aaP.get_as_ndarray()
                mtx.reset()
                mtx.translation(trans[0], trans[1], trans[2])
                for a in r_aa.atoms:
                    a.xyz.put_as_list(mtx.do_to_array(a.xyz.get_as_list()))

            c_aa.push_residue(r_aa)
        """ The last residue """
        if not args.circ:
            xyzSPSB_ref = np.array(
                [xyzs_S[-2], xyzs_P[-1], xyzs_S[-1], xyzs_B[-1]])
            best_rmsd = 9999.9
            best_lib = 0
            best_mtx = None
            for ilib in range(nlib):
                p = PdbFile('%s/%06i_%s.pdb' % (LIBPDBCG, ilib + 1, seq[-1]))