Skip to content

Commit

Permalink
Add toml-f branch specification, update read_force_field
Browse files Browse the repository at this point in the history
  • Loading branch information
naotohori committed Apr 19, 2023
1 parent 90d3978 commit be10525
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[submodule "subprojects/toml-f"]
path = subprojects/toml-f
url = https://github.com/hori-lab/toml-f
branch = sis
14 changes: 6 additions & 8 deletions check/input_T2S2HP.toml
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
title = "sis input"

[job]
[Job]
type = "MD"
#type = "CHECK_FORCE"

[files]
[files.in]
#ff = "./rna_cg1_triplet.ff"
[Files]
[Files.In]
ff = "./sis_dih_ReB_NN.ff"
fasta = "T2S2HP.fasta"
pdb_ini = "T2S2HP_folded.pdb"
#xyz_ini = "T2S2HP_random.xyz"
xyz_ini = "T2S2HP_random.xyz"

[files.out]
[Files.Out]
types = ["bp", "bpe", "bpall"]
prefix = "./test_T2S2HP"

[condition]
[Condition]
#tempK = 348.15
tempK = 300.00
rng_seed = 123
Expand Down
10 changes: 9 additions & 1 deletion src/read_force_field.F90
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ subroutine read_force_field(stat)
type(toml_table), allocatable :: table
type(toml_table), pointer :: group, node, subnode
!type(toml_array), pointer :: array
type(toml_context) :: context
type(toml_error), allocatable :: tm_err
!=======

stat = .False.
Expand All @@ -42,11 +44,17 @@ subroutine read_force_field(stat)
error stop
endif

call toml_parse(table, hdl)
call toml_load(table, hdl, context=context, error=tm_err)

close(hdl)
iopen_hdl = iopen_hdl - 1

if (allocated(tm_err)) then
print '(a)', tm_err%message
flush(6)
return
endif

call get_value(table, "title", cline)
print '(2a)', '# title: ', trim(cline)
flush(6)
Expand Down

0 comments on commit be10525

Please sign in to comment.