# Copyright (c) 2002-08 Peter Guntert. All rights reserved. ## 7MACROS: calc_all - CYANA macro ## ## Parameters: structures= (default: 0) ## command= (default: anneal) ## serial ## broadcast ## ## Calculates a group of structures using the given command (with optional ## parameters) for each individual conformer. If the number of structures n ## is specified, the calculation will be performed starting from n random ## start conformers; otherwise the calculation is performed for all selected ## structures. Structure calculations are performed in parallel, if ## possible. var i info print_info echo t params name syntax $macro:structures=0<=@i=0 command=*=anneal ** serial broadcast t = walltime echo := off info := minimal print_info := minimal if (structures.gt.0) random_all $structures if (nstruct.eq.0) error "No structures selected." params:= do i 1 nparam params:=$params $p$i end do if (serial) then forall save skip $command $params else if (broadcast) then name := d$getpid if (master) write ang $name.ang all info=none synchronize read ang $name.ang info=none synchronize if (master) remove $name.ang end if forall parallel save skip $command $params end if if (structures.gt.0 .and. nstruct.lt.structures) then do i 1 nstruct structure copy istruct(i) i end do structures select 1..$nstruct info=full end if t=walltime-t print " $nstruct structures finished in $t s (${t/nstruct} s/structure)."