public int getCharge()
	{
		if(isIon())
		{
			int pos = 0;
			for(int i = 0; i < ions.length; i++)
			{
				if(this.equals(new MiniCompound(ions[i])))
				{
					pos = i;
					break;
				}
			}
			return ionCharges[pos];
//			System.err.println("getCharge - this is an ion, but there isn't a corresponding charge");
		}
		
		int overAllCharge = 0;
		for(int i = 0; i < elements.length; i++)
			overAllCharge += elements[i].getCharge();
		return overAllCharge;
	}