Search in sources :

Example 1 with MultiplicativeSwitch

use of ffx.potential.nonbonded.MultiplicativeSwitch in project ffx by mjschnie.

the class SwitchFunctionTest method multSwitchTest.

/**
 * Tests multiplicative switch functions.
 */
@Test
public void multSwitchTest() {
    logger.info(" Testing multiplicative switch functionality");
    MultiplicativeSwitch sf = new MultiplicativeSwitch();
    standardTest(sf);
    assertEquals("Default multiplicative switch zero bound != 0.0", 0.0, sf.getZeroBound(), ULP_ZERO_2);
    assertEquals("Default power-switch one bound != 1.0", 1.0, sf.getOneBound(), ULP_ONE_2);
    assertFalse("Power switches are not constant outside the bounds.", sf.constantOutsideBounds());
    assertFalse("Power switches are not valid outside the bounds.", sf.validOutsideBounds());
    assertEquals("Default power-switch max-zero-derivative should return 2", 2, sf.getHighestOrderZeroDerivative());
    assertTrue("Default power-switch should be equal unity with symmetric inputs", sf.symmetricToUnity());
    sf = new MultiplicativeSwitch(1.0, 0.0);
    standardTest(sf);
    sf = new MultiplicativeSwitch(9.0, 7.2);
    standardTest(sf, LOOSE_TOLERANCE);
}
Also used : MultiplicativeSwitch(ffx.potential.nonbonded.MultiplicativeSwitch) Test(org.junit.Test)

Aggregations

MultiplicativeSwitch (ffx.potential.nonbonded.MultiplicativeSwitch)1 Test (org.junit.Test)1