Skip to content

Refactor/implement by Claude#2

Open
th2ch-g wants to merge 10 commits intomainfrom
dev_claude
Open

Refactor/implement by Claude#2
th2ch-g wants to merge 10 commits intomainfrom
dev_claude

Conversation

@th2ch-g
Copy link
Owner

@th2ch-g th2ch-g commented Mar 5, 2026

No description provided.

th2ch-g and others added 3 commits March 5, 2026 18:35
refactor: モジュール再編成とCLIディスパッチのargs.func方式への移行

- src/utils/ 配下を build/, analysis/, trajectory/ サブパッケージに整理
- cli.py の長大な if-elif チェーンを args.func(args) 方式に置き換え
- 全サブコマンドに parser.set_defaults(func=run) を追加
- CLAUDE.md をリポジトリに追加
- .claude/skills/new-subcmd/ スキルを追加(サブコマンド追加テンプレート)
- example/mbar/ スクリプトを argparse ベースに整理・関数化
- example/wham/ のコメントアウトコードを削除
- densmap の MDtraj バックエンドを実装
- pca.py の atom_indices/ref_atom_indices の引数順序バグを修正
- extract_ave_str.py の mdtraj 平均構造計算を修正
- calc_ion_conc.py に optimize メソッドの実装を追加
- gen_resp.py の obabel フォーマット指定を修正 (gout)
- setup_reus_dist.sh を各レプリカディレクトリのファイルを参照するよう修正

Co-authored-by: Claude <noreply@anthropic.com>
```
test: テストスイート追加とドキュメント更新

- pytest を依存関係に追加し pixi run test / test-fast コマンドを追加
- tests/ ディレクトリを新設: conftest.py, fixtures, 各モジュールのユニットテスト
  - test_utils: mod_mdp, parse_top, rmfile, atom_selection_parser
  - test_build: calc_ion_conc, gen_temperatures
  - test_trajectory: fit
  - test_analysis: extract_str
  - test_cv: comdist, rmsd
  - test_cli: 全サブコマンドの登録確認
- CLAUDE.md にテスト構造・コマンド・サブコマンド登録パターンを追記
- new-subcmd スキルにテスト作成ステップ(ステップ4)を追加し全カテゴリを明示

Co-authored-by: Claude <noreply@anthropic.com>
```
cv/xyz, comvec, mindist, rmsf, pca, densmap, analysis/extract_ave_str,
trajectory/print_perf, build/gen_posres, build/add_ndx,
utils/partial_tempering, utils/shell_hook, utils/show_npy をカバー。
236テストが全てパス、ruff lint/format エラーなし。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@th2ch-g th2ch-g changed the title Refactor/implement by Caude Refactor/implement by Claude Mar 5, 2026
th2ch-g and others added 7 commits March 6, 2026 10:37
…ings

List all subcommands and utilities in each directory, and note unregistered
modules that still need to be added to cli.py.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implement new build subcommands:
- addh: Add hydrogen atoms to structures (reduce or PyMOL)
- build_vacuum: Build vacuum systems without water/ions/box
- place_solvent: Place solvent molecules using 3D-RISM

Enhance existing subcommands:
- find_bond: Add --output-pdb option to rename CYS→CYM for disulfide bonds

Register subcommands in CLI:
- Import and register addh, build_vacuum, place_solvent

Implement all-atom example scripts:
- protein.sh: Vacuum system construction
- protein_water.sh: Protein+water system with ion concentration
- protein_water_membrane.sh: Protein+water+membrane system
- protein_water_membrane_glycan.sh: Protein+water+membrane+glycan system
- protein_water_ligand_membrane_glycan.sh: With ligand parameters

Add SS-bond detection and handling in all workflows.

Update TODO.md with detailed specifications and completion status.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
… extraction

- Add support for automatic 1D-RISM xvv file generation via _run_rism1d()
- Implement both rism3d.snglpnt and sander 3D-RISM interfaces
- Implement Placevent-style greedy peak extraction algorithm
- Add parameters: --xvv, --solvent-model, --closure, --grdspc, --tolerance, --buffer, --solvcut, --exclusion-radius, --max-sites, --use-sander
- Improve DX file parsing with validation and error handling
- Use temporary working directory for safer file management
- Store g(r) values in PDB output for post-analysis
- Organize code into logical sections with clear comments

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Add 8 CV calculation example scripts (comdist, comvec, densmap, mindist, pca, rmsd, rmsf, xyz)
- Add distance restraint generation example (gen_distres)
- Add 3D-RISM water placement example (place_solvent)
- Add REMD temperature generation example (gen_temperatures)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Clear completed task list from version control and add TODO.md to
.gitignore to simplify project maintenance.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Add reference links to AMBER tutorials 34 and 40 (3D-RISM and 1D-RISM
solvation methods) at the top of place_solvent.py for better documentation.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant