Skip to content

Commit

Permalink
constrain all atoms (#928)
Browse files Browse the repository at this point in the history
Signed-off-by: albert <92109627+Albkat@users.noreply.github.com>
  • Loading branch information
Albkat committed Jan 25, 2024
1 parent 10de8e0 commit 803bc69
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions src/constrain_param.f90
Original file line number Diff line number Diff line change
Expand Up @@ -452,12 +452,19 @@ subroutine set_constr(env,key,val,nat,at,idMap,xyz)
potset%pos%n = size(list)
case('atoms')
call atl%new(val)
if (atl%get_error()) then
call env%warning('something is wrong in the fixing list',source)
return
if (val.eq."all") then
allocate(list(nat))
do i=1,nat
list(i)=i
enddo
else
if (atl%get_error()) then
call env%warning('something is wrong in the fixing list',source)
return
endif
if (potset%pos%n > 0) call atl%add(potset%pos%atoms(:potset%pos%n))
call atl%to_list(list)
endif
if (potset%pos%n > 0) call atl%add(potset%pos%atoms(:potset%pos%n))
call atl%to_list(list)
potset%pos%atoms = list
potset%pos%n = size(list)

Expand Down

0 comments on commit 803bc69

Please sign in to comment.