TW = Thrust / (Mass*g) Thrust is in newtons, not kilo-newtons like the parts file, make sure to convert accordingly. Seeing you are taking just straight mass from the parts file you need to convert to weight, hence multiplying by g (9.80665 for Kerbin) Example of vanilla engine: Thrust: 200000n Mass: 2000 kg Weight: 2000*9.80665=19613.3 Thrust to weight ratio: 200000/19613.3=10.1