Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from crest-lab:master #24

Merged
merged 1 commit into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/algos/ConfSolv.F90
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ subroutine confsolv_dump_gsoln(nall,ncol,gsoln,mapping,headers)
real(wp) :: dum
open(newunit=ich,file='confsolv.dat')
do i = 1,nall
k = mapping(i)+2
k = mapping(i)+1
write(ich,'(f15.8,1x,a)') gsoln(i),trim(headers(k))
end do
close(ich)
Expand Down Expand Up @@ -479,6 +479,7 @@ subroutine confsolv_request(ensname,nall,ncpus,gsoln,io)
!> pass the user-defined solvents-csv, or do a single solvent
if (allocated(cs_solvfile)) then
write (stdout,'(2x,a,a)') 'Requested ΔΔGsoln for solvents in ',cs_solvfile
call parse_csv_file_column(cs_solvfile,1,headers)
else
if (allocated(cs_solvent).and.allocated(cs_smiles)) then
write (stdout,'(2x,a,a,3a)') 'Requested ΔΔGsoln for ',cs_solvent,' (SMILES: ',trim(cs_smiles),')'
Expand All @@ -487,6 +488,7 @@ subroutine confsolv_request(ensname,nall,ncpus,gsoln,io)
write (stdout,'(2x,a,a,a)') 'Requested ΔΔGsoln for ',cs_solvent,' (trying to find SMILES ...)'
call cs_write_solvent_csv(cs_solvent)
end if
allocate(headers(2), source=trim(cs_solvent))
end if
write (stdout,'(2x,a,a)') 'Processing ensemble file ',trim(ensname)

Expand Down Expand Up @@ -533,9 +535,8 @@ subroutine confsolv_request(ensname,nall,ncpus,gsoln,io)
call parse_csv_allcolumns('confsolv.csv',data,cols=ncol,rows=nrow)
write (stdout,*) 'done.'
if (nrow == nall) then
allocate(mapping(nall))
if(.not.allocated(mapping)) allocate(mapping(nall))
call confsolv_select_gsoln(nall,ncol,data,gsoln,mapping)
call parse_csv_file_row('confsolv.csv',1,headers)
call confsolv_dump_gsoln(nall,ncol,gsoln,mapping,headers)
else
write (stdout,'(a)') '**ERROR** dimension mismatch in confsolv_request'
Expand Down
5 changes: 3 additions & 2 deletions src/parsing/parse_csv.f90
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,10 @@ subroutine parse_csv_file_rownumber(fname,getrow,row)

if (debug) write (*,*) 'trying to get row elements',getrow
if (getrow > 0.and.getrow <= nrow) then
write(*,*) ncol,l
do i = 1,ncol
!if (debug) write(*,*) file%line(i)
row(i) = get_column_element(file%line(getrow),i)
write(*,*) trim(get_column_element(file%line(getrow),i) )
!row(i) = get_column_element(file%line(getrow),i)
if (debug) write (*,*) trim(row(i))
end do
end if
Expand Down
Loading