A global nonlinear simulation code for the time evolution of ion-temperature-gradient-driven modes in theta-pinch geometry as a first approximation to the stellarator Wendelstein 7-X (W7-X) [Grieger , Proceedings of the 13th International Conference on Plasma Physics and Controlled Nuclear Fusion Research, Washington, DC, 1990 (International Atomic Energy Agency, Vienna, 1991), Vol. 3, p. 525] has been developed. A deltaf particle-in-cell (PIC) method is used to solve the coupled system of gyrokinetic equations for the ions, in the electrostatic approximation, and the quasineutrality equation, assuming adiabatically responding electrons. The focus has been on adherence to conservation laws, i.e., particle number and energy conservation. Besides other improvements it has been shown that a well-chosen initial distribution of the markers in reduced phase space makes optimal use of the deltaf PIC method to reduce the statistical noise for a given number of markers. In a model including all (1351) physically relevant modes, it has been possible to achieve energy conservation beyond the saturation of the instability. (C) 2002 American Institute of Physics.