Proteome Informatics Group > Java Proteomic Library
 

Recipe 2.1.4. Creating a ionizable molecule

Problem

You want to create a molecule with ionizable group(s).

Solution

Molecule acetate =
	IonizableMolecule.newInstance(ChemicalFacade
		.getMolecule("CH3COOH"), new IonizableGroup.Builder(4.74,
			NeutralMoleculeType.ACID).build());

// get the average charge at specific pH
Assert.assertEquals(-0.5, acetate.getAvgCharge(4.74));
Assert.assertEquals(-0.99, acetate.getAvgCharge(8));

// get the number of ionizable group
Assert.assertEquals(1, acetate.getPkaNumber());

Discussion

See Also