# Copyright (c) 2002-08 Peter Guntert. All rights reserved. ## 7MACROS: readdata - CYANA macro ## ## Parameters: ## append ## ## Reads input data files with the given name. If name has an extension (i.e. ## if it contains a "."), a file with the corresponding format (as given by ## the extension) is read. Otherwise, the sequence file "name.seq" and, if ## available, the upper limits distance restraints file "name.upl", the ## lower limits distance restraints file "name.lol" and the angle ## restraints file "name.aco" are read. If no residue library is present, ## the standard Cyana library ("cyana.lib") is read in advance. var echo i j k name ext syntax $macro:** append echo:=off if (nparam.eq.0) error "Missing filename(s)." do i 1 nparam name='$p$i' j=indexr(name,'.') k=indexr(name,'/') if (k.gt.j) j=0 if (j.gt.0) then ext=name(j+1:) if (ext.eq.'cya') then $name(1:j-1) else if (ext.ne.'lib' .and. naa.eq.0) read lib $cyanadir/lib/cyana.lib read $ext $name $if(append,'append',' ') end if else if (naa.eq.0) read lib $cyanadir/lib/cyana.lib read seq $name.seq if (existfile('$name.upl')) read upl $name.upl if (existfile('$name.lol')) read lol $name.lol if (existfile('$name.aco')) read aco $name.aco end if end do