# Set up bulk configuration
bulk_configuration = BulkConfiguration(
    bravais_lattice=FaceCenteredCubic(5.4306*Angstrom),
    elements=[Silicon, Silicon],
    fractional_coordinates=[[ 0.  ,  0.  ,  0.  ],
                            [ 0.25,  0.25,  0.25]])

# Define the calculator
calculator = TremoloXCalculator(parameters=StillingerWeber_Si_1985())
bulk_configuration.setCalculator(calculator)
bulk_configuration.update()

# Calculate the elastic constants
elastic = ElasticConstants(bulk_configuration,
                           optimizer=LBFGS(),
                           max_forces=0.001*eV/Angstrom,
                           eta_max=0.002,
                           n_eta=3,
                           enable_symmetry=True,
                           fit_order=1)
# Print the results
nlprint(elastic)
# Save the elastic constants analysis object
nlsave('elastic_constants.nc', elastic)