Graph neural networks are becoming increasingly popular in deep learning due to their ability to process data in irregular structures and graphs thus preserving additional spatial dependencies due to the arrangement of nodes. This network allows for better accuracy results in classification problems, where information from neighbors is also crucial. However, training such a model is complex and time-consuming and challenging. To date, some metaheuristic algorithms have been used primarily to optimize convolutional networks and find suitable hyperparameters, these are: genetic algorithm, particle swarm optimization, differential evolution or covariance matrix adaptation evolution strategy. In this paper, we propose a metaheuristic algorithm of Simulated Annealing with Uniform distribution for optimization of weights in GCNs, as a hybrid in combination with gradient optimizers. The performance of our technique was tested on the QM7 Dataset, where it was split into two datasets: imbalanced and balanced. Experimental results confirm that our proposed optimization method outperformed other standalone SOTA optimization models, including gradient and heuristics methods, demonstrating in each case to lower loss function values, higher accuracy values for balanced dataset and higher AUC (macro) values for imbalanced dataset.