おいも貴婦人ブログ

生物系博士課程満期退学をしたAIエンジニアのブログ。

GROMACS4.6.5のコードリード(code reading)(1)

どのようにpdbファイルを読み込むかを中心にreadingしていく。引数は省略。
ディレクトリ gromacs-4.6.5/src/kernel

pdb2gmx.c

  • cmain()
    • read_pdball()
      • get_str_coordnum()
      • init_t_atoms():typedef.c(atomを初期化)
      • snew()
      • /src/gmxlib/confio.c:read_stx_conf()
        • /src/gmxlib/pdbio.c:read_pdb_conf()
          • /src/gmxlib/pdbio.c:read_pdbfile()
            • /src/gmxlib/string2.c:fgets2()
            • /src/gmxlib/string2.c:ltrim()   //空白文字を削除
            • /src/gmxlib/string2.c:rtrim()   //空白文字を削除
            • /src/gmxlib/string2.c:trim()    //空白文字を削除
            • /src/gmxlib/typedefs.c:t_atoms_set_resinfo()
              • /src/gmxlib/symtab.c:put_symtab()
                • /src/gmxlib/symtab.c:enter_buf()
                  • /src/gmxlib/symtab.c:new_symbuf()
                    • /include/smalloc.h:snew() //領域確保
      • fn2ftp()
      • get_pdb_atomnumber()
      • copy_rvec()
      • rename_pdbres()
      • rename_atoms()
      • write_sto_conf()

icnlude/pdbio.h:pdbのフォーマット

static const char *pdbformat  = "%-6s%5u  %-4.4s%3.3s %c%4d%c   %8.3f%8.3f%8.3f";

原子の構造体の定義場所:include/types/atoms.h