! Module file: coord_to_sdb ! ! CNS module ! ********** ! ! Authors: Axel Brunger and Paul Adams ! ! copyright Yale University ! ! Function: ! Converts internal coordinate and molecular topology ! information to a site database ! ! Requirements: ! The molecular topology and coordinates must be defined ! The selection of which sites are active must be provided ! module {coord_to_sdb} ( sitedb; use_array; fix_array; selection=(all); ) set message ? end evaluate ($message_old=$result) set echo ? end evaluate ($echo_old=$result) if ( $log_level = verbose ) then set echo=on message=normal end else set echo=off message=off end end if set display=? end evaluate ($curr_display=$result) checkversion 1.3 evaluate ($counter=1) for $id in id ( &selection ) loop coor show (x) ( id $id ) evaluate (&sitedb.x_$counter=$result) show (y) ( id $id ) evaluate (&sitedb.y_$counter=$result) show (z) ( id $id ) evaluate (&sitedb.z_$counter=$result) show (b) ( id $id ) evaluate (&sitedb.b_$counter=$result) show (q) ( id $id ) evaluate (&sitedb.q_$counter=$result) show (chemical) ( id $id ) evaluate (&sitedb.type_$counter=$result) show (segid) ( id $id ) evaluate (&sitedb.segid_$counter=$result) show (resid) ( id $id ) evaluate (&sitedb.g_$counter=$result) show sum(1) ( segid &sitedb.segid_$counter and resid &sitedb.g_$counter ) if ( $result <= 1 ) then evaluate (&sitedb.g_$counter="") end if show sum(1) ( &use_array and ( id $id ) ) if ( $result = 1 ) then show sum(1) ( &fix_array and ( id $id ) ) if ( $result = 1 ) then evaluate (&sitedb.action_$counter="fix") else evaluate (&sitedb.action_$counter="refine") end if else evaluate (&sitedb.action_$counter="ignore") end if evaluate (&sitedb.counter = $counter) evaluate ($counter=$counter+1) end loop coor set message=$message_old echo=$echo_old end