Beispiel #1
0
/*
 *	bXAUERelaxCallback
 *
 *	Author:	Christian Schafmeister (1991)
 *
 *	Callback to redisplay the UNIT every step of a minimization.
 *	Return TRUE to indicate that the minimization should continue.
 */
static BOOL
bXAUERelaxCallback( Widget wTank )
{
    XEvent		xeEvent;
    BOOL		bContinue;

    /* Redisplay the UNIT in the TANK */


    TankFastRedisplayUnit((TANK) wTank );

    /* If there is an event pending then handle it */

    bContinue = TRUE;
    while ( XtAppPending( SxtacApp ) ) {
        MESSAGE(( "There is an event pending\n" ));
        XtAppNextEvent( SxtacApp, &xeEvent );
        if ( bBasicsInterrupt() ) {
            bContinue = FALSE;
            BasicsResetInterrupt();
        }
        XtDispatchEvent( &xeEvent );
    }

    return(bContinue);
}
Beispiel #2
0
/*
 *      ResidueDescribe
 *
 *	Author:	Christian Schafmeister (1991)
 *
 *      Call the specific routine for the class to print a description 
 *      of the RESIDUE to the file fOut.
 *
 *      Arguments:
 *      oObject -       The object to describe.
 *
 */
void
ResidueDescribe( RESIDUE rResidue )
{
int             i;
LOOP            lContents;
OBJEKT          oObj;
STRING          sTemp;

    VP0(( "RESIDUE name: %s\n", rResidue->cHeader.sName ));
    if ( bResidueFlagsSet( rResidue, RESIDUEUNKNOWN ) ) 
        VP0(( "!!!This is an unknown residue!\n" ));
    VP0(( "RESIDUE sequence number: %d\n", 
                        iContainerSequence(rResidue) ));
    VP0(( "RESIDUE PDB sequence number: %d\n",
			iResiduePdbSequence(rResidue) ));
    VP0(( "Type: %s\n", 
	  sResidueTypeNameFromChar(cResidueType(rResidue)) ));
    if ( cResidueType(rResidue) == RESTYPESOLVENT ) {
	VP0(( "Solvent imaging atom: " ));
	if ( aResidueImagingAtom(rResidue) == NULL ) {
	    VP0(( "None.\n" ));
	} else {
	    VP0(( "%s\n", 
		sContainerDescriptor((CONTAINER)aResidueImagingAtom(rResidue),sTemp) ));
	}
    }	
    VP0(( "Connection atoms:\n" ));
     for ( i=0; i<MAXCONNECT; i++ ) {
        if ( bResidueConnectUsed(rResidue,i) ) {
            VP0(( " Connect atom %d: %s\n", i, 
                sContainerDescriptor( (CONTAINER)rResidue->aaConnect[i], sTemp ) ));
        }
    }
    if ( rResidue->vaImpropers ) {
	VP0(( "No improper torsions\n" ));
    } else {
	VP0(( "Improper torsions:\n" ));
    }
    BasicsResetInterrupt();
    VP0(( "Contents: \n" ));
    lContents = lLoop( (OBJEKT)rResidue, DIRECTCONTENTS );
    while ( oObj = oNext(&lContents ) ) {
        VP0(( "%s\n", sContainerDescriptor( (CONTAINER)oObj, sTemp ) ));
	if ( bBasicsInterrupt() ) {
	    BasicsResetInterrupt();
	    VP0(( "Interrupted\n" ));
	    break;
	}
    }
}