The ReaxFF interatomic potential, used for organic materials, involves more than 600 adjustable parameters, the best-fit values of which must be determined for different materials. A new method of determining the set of best-fit parameters for specific molecules containing carbon, hydrogen, nitrogen and oxygen is presented, based on a parameter reduction technique followed by genetic algorithm (GA) minimization. This work has two novel features. The first is the use of a parameter reduction technique to determine which subset of parameters plays a significant role for the species of interest; this is necessary to reduce the optimization space to manageable levels. The second is the application of the GA technique to a complex potential (ReaxFF) with a very large number of adjustable parameters, which implies a large parameter space for optimization. In this work, GA has been used to optimize the parameter set to determine best-fit parameters that can reproduce molecular properties to within a given accuracy. As a test problem, the use of the algorithm has been demonstrated for nitromethane and its decomposition products.