The conformational properties of charge-balanced polyampholytes described by the end-to-end distance or radius of gyration depend on parameters such as the temperature and pH as well as on the detailed charge distribution along the backbone. In this work we present a method to determine the charge distribution along a semi-stiff polyampholyte backbone which will result in a thermodynamically stable structure for the compactness of interest, from several loops to an uncoiled structure, performed in a single computer experiment.