fn lammps_CC() -> TricubicGrid {
        let mut input = tricubic::Input::default();

        // Comments with fitting species are from Brenner's table.

        input.value.assign((1, 1, 1), 0.05250); // Acetylene
        input.value.assign((1, 1, 2), -0.002088750); // H2C=C=CH
        input.value.assign((1, 1, 3..=9), -0.00804280); // C4
        input.value.assign((2, 2, 1), 0.0472247850);  // (CH3)2C=C(CH3)2
        input.value.assign((2, 2, 2), 0.0110); // Benzene

        // !!!!!!!!!!!!
        // NOTE: The correctness of these lines is uncertain, but they are
        //       consistent between Brenner, Stuart, and the LAMMPS implementation.
        //
        // The comments in Brenner's table describes them as the
        // "average from difference F(2, 2, 2) to difference F(2, 2, 9)".
        //
        // They do have a constant difference, but if we were really starting from
        // the value of F[2][2][2], then that difference should be around 0.00314, not 0.00662.
        // (notice how F[2][2][3] > F[2][2][2])
        //
        // My best guess is that the comment is mistaken, and F[2][2][3] was fit
        // to a species.                                           -ML
        // !!!!!!!!!!!!
        input.value.assign((2, 2, 3), 0.0198529350);
        input.value.assign((2, 2, 4), 0.01654411250);
        input.value.assign((2, 2, 5), 0.013235290);
        input.value.assign((2, 2, 6), 0.00992646749999);
        input.value.assign((2, 2, 7), 0.006617644999);
        input.value.assign((2, 2, 8), 0.00330882250);
        input.dk.assign((2, 2, 4..=8), -0.0033090);

        input.value.assign((0, 1, 1), 0.021693495);  // C2H
        input.value.assign((0, 1, 2..=9), 0.0049586079); // C3 (NOTE: Different from Brenner)
        input.value.assign((0, 2, 1), 0.024698831850); // CCH2
        input.value.assign((0, 2, 2), -0.00597133450); // CCH(CH2)
        input.value.assign((0, 3, 1..=2), -0.05989946750); // H3CC
        input.value.assign((0, 3, 3..=9), 0.0049586079); // (NOTE: Different from Brenner)

        input.value.assign((1, 2, 1), 0.00482478490); // H2CCH
        input.value.assign((1, 2, 2), 0.0150); // H2C=C=CH2
        input.value.assign((1, 2, 3), -0.010); // C6H5

        // !!!!!!!!!!!!
        // NOTE: The correctness of these lines is uncertain. They are consistent
        //       between Brenner, Stuart, and the LAMMPS implementation, but
        //       unfortunately it seems they might all be incorrect.
        //
        // The comment in Brenner's table is "Average from F(1,2,3) to F(1,2,6)".
        // This time, the comment is correct; these elements do form a line.
        // But the explicitly assigned derivative is wrong, likely causing
        // 'S' shapes to appear in the shape of F.
        //
        // Because changing these params might invalidate the work done to fit
        // other parameters by the authors of the REBO paper, I'm leaving them as is.
        // !!!!!!!!!!!!
        input.value.assign((1, 2, 4), -0.01168893870);
        input.value.assign((1, 2, 5), -0.013377877400);
        input.dk.assign((1, 2, 4..=5), -0.0100220);

        input.value.assign((1, 2, 6..=9), -0.015066816000); // Graphite vacancy
        input.value.assign((1, 3, 2..=9), -0.0624183760); // H3C–CCH
        input.value.assign((2, 3, 1..=9), -0.02235469150); // Diamond vacancy

        // NOTE: These are present in Stuart but not in Brenner.
        //       I didn't see any explanation for them.
        input.value.assign((0, 0, 3..=9), 0.0049586079);
        input.value.assign((0, 2, 3..=9), 0.0049586079);

        //-----------
        // derivatives

        input.di.assign((2, 1, 1), -0.026250);
        input.di.assign((2, 1, 5..=9), -0.0271880);
        input.di.assign((1, 3, 2), 0.0187723882);
        input.di.assign((2, 3, 2..=9), 0.031209);

        // NOTE: mind that two of the dk derivatives were written above
        input.dk.assign((1, 1, 2), -0.0302715);
        // NOTE: dk(1, 2, 4..=5) is written above
        // NOTE: dk(2, 2, 4..=8) is written above

        // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
        // NOTE: At this point, LAMMPS also does this thing where it copies values from the knots
        //       at i=3 to i=4 and from j=3 to j=4 in an attempt to satisfy the rules that
        //       F(>3,j,k) = F(3,j,k) and F(i,>3,k) = F(i,3,k).
        //
        // There are a couple of things to say about this:
        //
        // * We don't need to do this because we clip points to i<=3, j<=3 before evaluation.
        //   In other words, we never use the curves defined on `3 <= i <= 4` or `3 <= j <= 4` for
        //   the F spline.
        //
        // * The manner in which Lammps does this as of the 10Oct2018 version is bugged, anyways.
        //   It only copies the value when it should also be copying the perpendicular derivatives.
        //   (this causes some df/di derivatives to be lost at j=4 and vice versa).
        // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

        let input = input.symmetrize();
        input.solve().unwrap()
    }
/// Verified to be identical to the grid used by LAMMPS.
///
/// (not counting one bug in LAMMPS which was found to be a nuisance to replicate;
///  see the comment at the end of the source function body)
///
/// It is probably similar to Stuart's Table IX.
Verified to be identical to the grid used by LAMMPS.
(not counting one bug in LAMMPS which was found to be a nuisance to replicate;
see the comment at the end of the source function body)

It is probably similar to Stuart's Table IX.
Verified to be identical to the grid used by LAMMPS . ( not counting one bug in LAMMPS which was found to be a nuisance to replicate ; see the comment at the end of the source function body ) It is probably similar to Stuart ' s Table IX .
fn lammps_CC() -> TricubicGrid {
        let mut input = tricubic::Input::default();
        // Comments with fitting species are from Brenner's table.
        input.value.assign((1, 1, 1), 0.05250); // Acetylene
        input.value.assign((1, 1, 2), -0.002088750); // H2C=C=CH
        input.value.assign((1, 1, 3..=9), -0.00804280); // C4
        input.value.assign((2, 2, 1), 0.0472247850);  // (CH3)2C=C(CH3)2
        input.value.assign((2, 2, 2), 0.0110); // Benzene
        // !!!!!!!!!!!!
        // NOTE: The correctness of these lines is uncertain, but they are
        //       consistent between Brenner, Stuart, and the LAMMPS implementation.
        //
        // The comments in Brenner's table describes them as the
        // "average from difference F(2, 2, 2) to difference F(2, 2, 9)".
        //
        // They do have a constant difference, but if we were really starting from
        // the value of F[2][2][2], then that difference should be around 0.00314, not 0.00662.
        // (notice how F[2][2][3] > F[2][2][2])
        //
        // My best guess is that the comment is mistaken, and F[2][2][3] was fit
        // to a species.                                           -ML
        // !!!!!!!!!!!!
        input.value.assign((2, 2, 3), 0.0198529350);
        input.value.assign((2, 2, 4), 0.01654411250);
        input.value.assign((2, 2, 5), 0.013235290);
        input.value.assign((2, 2, 6), 0.00992646749999);
        input.value.assign((2, 2, 7), 0.006617644999);
        input.value.assign((2, 2, 8), 0.00330882250);
        input.dk.assign((2, 2, 4..=8), -0.0033090);
        input.value.assign((0, 1, 1), 0.021693495);  // C2H
        input.value.assign((0, 1, 2..=9), 0.0049586079); // C3 (NOTE: Different from Brenner)
        input.value.assign((0, 2, 1), 0.024698831850); // CCH2
        input.value.assign((0, 2, 2), -0.00597133450); // CCH(CH2)
        input.value.assign((0, 3, 1..=2), -0.05989946750); // H3CC
        input.value.assign((0, 3, 3..=9), 0.0049586079); // (NOTE: Different from Brenner)
        input.value.assign((1, 2, 1), 0.00482478490); // H2CCH
        input.value.assign((1, 2, 2), 0.0150); // H2C=C=CH2
        input.value.assign((1, 2, 3), -0.010); // C6H5
        // !!!!!!!!!!!!
        // NOTE: The correctness of these lines is uncertain. They are consistent
        //       between Brenner, Stuart, and the LAMMPS implementation, but
        //       unfortunately it seems they might all be incorrect.
        //
        // The comment in Brenner's table is "Average from F(1,2,3) to F(1,2,6)".
        // This time, the comment is correct; these elements do form a line.
        // But the explicitly assigned derivative is wrong, likely causing
        // 'S' shapes to appear in the shape of F.
        //
        // Because changing these params might invalidate the work done to fit
        // other parameters by the authors of the REBO paper, I'm leaving them as is.
        // !!!!!!!!!!!!
        input.value.assign((1, 2, 4), -0.01168893870);
        input.value.assign((1, 2, 5), -0.013377877400);
        input.dk.assign((1, 2, 4..=5), -0.0100220);
        input.value.assign((1, 2, 6..=9), -0.015066816000); // Graphite vacancy
        input.value.assign((1, 3, 2..=9), -0.0624183760); // H3C–CCH
        input.value.assign((2, 3, 1..=9), -0.02235469150); // Diamond vacancy
        // NOTE: These are present in Stuart but not in Brenner.
        //       I didn't see any explanation for them.
        input.value.assign((0, 0, 3..=9), 0.0049586079);
        input.value.assign((0, 2, 3..=9), 0.0049586079);
        //-----------
        // derivatives
        input.di.assign((2, 1, 1), -0.026250);
        input.di.assign((2, 1, 5..=9), -0.0271880);
        input.di.assign((1, 3, 2), 0.0187723882);
        input.di.assign((2, 3, 2..=9), 0.031209);
        // NOTE: mind that two of the dk derivatives were written above
        input.dk.assign((1, 1, 2), -0.0302715);
        // NOTE: dk(1, 2, 4..=5) is written above
        // NOTE: dk(2, 2, 4..=8) is written above
        // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
        // NOTE: At this point, LAMMPS also does this thing where it copies values from the knots
        //       at i=3 to i=4 and from j=3 to j=4 in an attempt to satisfy the rules that
        //       F(>3,j,k) = F(3,j,k) and F(i,>3,k) = F(i,3,k).
        //
        // There are a couple of things to say about this:
        //
        // * We don't need to do this because we clip points to i<=3, j<=3 before evaluation.
        //   In other words, we never use the curves defined on `3 <= i <= 4` or `3 <= j <= 4` for
        //   the F spline.
        //
        // * The manner in which Lammps does this as of the 10Oct2018 version is bugged, anyways.
        //   It only copies the value when it should also be copying the perpendicular derivatives.
        //   (this causes some df/di derivatives to be lost at j=4 and vice versa).
        // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
        let input = input.symmetrize();
        input.solve().unwrap()
    }
fn lammps_CC ( ) -> TricubicGrid { let mut input = tricubic :: Input :: default ( ) ; // Comments with fitting species are from Brenner's table. input . value . assign ( ( 1 , 1 , 1 ) , 0.05250 ) ; // Acetylene input . value . assign ( ( 1 , 1 , 2 ) , - 0.002088750 ) ; // H2C=C=CH input . value . assign ( ( 1 , 1 , 3 ..= 9 ) , - 0.00804280 ) ; // C4 input . value . assign ( ( 2 , 2 , 1 ) , 0.0472247850 ) ; // (CH3)2C=C(CH3)2 input . value . assign ( ( 2 , 2 , 2 ) , 0.0110 ) ; // Benzene // !!!!!!!!!!!! // NOTE: The correctness of these lines is uncertain, but they are //       consistent between Brenner, Stuart, and the LAMMPS implementation. // // The comments in Brenner's table describes them as the // "average from difference F(2, 2, 2) to difference F(2, 2, 9)". // // They do have a constant difference, but if we were really starting from // the value of F[2][2][2], then that difference should be around 0.00314, not 0.00662. // (notice how F[2][2][3] > F[2][2][2]) // // My best guess is that the comment is mistaken, and F[2][2][3] was fit // to a species.                                           -ML // !!!!!!!!!!!! input . value . assign ( ( 2 , 2 , 3 ) , 0.0198529350 ) ; input . value . assign ( ( 2 , 2 , 4 ) , 0.01654411250 ) ; input . value . assign ( ( 2 , 2 , 5 ) , 0.013235290 ) ; input . value . assign ( ( 2 , 2 , 6 ) , 0.00992646749999 ) ; input . value . assign ( ( 2 , 2 , 7 ) , 0.006617644999 ) ; input . value . assign ( ( 2 , 2 , 8 ) , 0.00330882250 ) ; input . dk . assign ( ( 2 , 2 , 4 ..= 8 ) , - 0.0033090 ) ; input . value . assign ( ( 0 , 1 , 1 ) , 0.021693495 ) ; // C2H input . value . assign ( ( 0 , 1 , 2 ..= 9 ) , 0.0049586079 ) ; // C3 (NOTE: Different from Brenner) input . value . assign ( ( 0 , 2 , 1 ) , 0.024698831850 ) ; // CCH2 input . value . assign ( ( 0 , 2 , 2 ) , - 0.00597133450 ) ; // CCH(CH2) input . value . assign ( ( 0 , 3 , 1 ..= 2 ) , - 0.05989946750 ) ; // H3CC input . value . assign ( ( 0 , 3 , 3 ..= 9 ) , 0.0049586079 ) ; // (NOTE: Different from Brenner) input . value . assign ( ( 1 , 2 , 1 ) , 0.00482478490 ) ; // H2CCH input . value . assign ( ( 1 , 2 , 2 ) , 0.0150 ) ; // H2C=C=CH2 input . value . assign ( ( 1 , 2 , 3 ) , - 0.010 ) ; // C6H5 // !!!!!!!!!!!! // NOTE: The correctness of these lines is uncertain. They are consistent //       between Brenner, Stuart, and the LAMMPS implementation, but //       unfortunately it seems they might all be incorrect. // // The comment in Brenner's table is "Average from F(1,2,3) to F(1,2,6)". // This time, the comment is correct; these elements do form a line. // But the explicitly assigned derivative is wrong, likely causing // 'S' shapes to appear in the shape of F. // // Because changing these params might invalidate the work done to fit // other parameters by the authors of the REBO paper, I'm leaving them as is. // !!!!!!!!!!!! input . value . assign ( ( 1 , 2 , 4 ) , - 0.01168893870 ) ; input . value . assign ( ( 1 , 2 , 5 ) , - 0.013377877400 ) ; input . dk . assign ( ( 1 , 2 , 4 ..= 5 ) , - 0.0100220 ) ; input . value . assign ( ( 1 , 2 , 6 ..= 9 ) , - 0.015066816000 ) ; // Graphite vacancy input . value . assign ( ( 1 , 3 , 2 ..= 9 ) , - 0.0624183760 ) ; // H3C–CCH input . value . assign ( ( 2 , 3 , 1 ..= 9 ) , - 0.02235469150 ) ; // Diamond vacancy // NOTE: These are present in Stuart but not in Brenner. //       I didn't see any explanation for them. input . value . assign ( ( 0 , 0 , 3 ..= 9 ) , 0.0049586079 ) ; input . value . assign ( ( 0 , 2 , 3 ..= 9 ) , 0.0049586079 ) ; //----------- // derivatives input . di . assign ( ( 2 , 1 , 1 ) , - 0.026250 ) ; input . di . assign ( ( 2 , 1 , 5 ..= 9 ) , - 0.0271880 ) ; input . di . assign ( ( 1 , 3 , 2 ) , 0.0187723882 ) ; input . di . assign ( ( 2 , 3 , 2 ..= 9 ) , 0.031209 ) ; // NOTE: mind that two of the dk derivatives were written above input . dk . assign ( ( 1 , 1 , 2 ) , - 0.0302715 ) ; // NOTE: dk(1, 2, 4..=5) is written above // NOTE: dk(2, 2, 4..=8) is written above // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! // NOTE: At this point, LAMMPS also does this thing where it copies values from the knots //       at i=3 to i=4 and from j=3 to j=4 in an attempt to satisfy the rules that //       F(>3,j,k) = F(3,j,k) and F(i,>3,k) = F(i,3,k). // // There are a couple of things to say about this: // // * We don't need to do this because we clip points to i<=3, j<=3 before evaluation. //   In other words, we never use the curves defined on `3 <= i <= 4` or `3 <= j <= 4` for //   the F spline. // // * The manner in which Lammps does this as of the 10Oct2018 version is bugged, anyways. //   It only copies the value when it should also be copying the perpendicular derivatives. //   (this causes some df/di derivatives to be lost at j=4 and vice versa). // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! let input = input . symmetrize ( ) ; input . solve ( ) . unwrap ( ) }
Verified to be identical to the grid used by LAMMPS.
Verified to be identical to the grid used by LAMMPS .