public static final int getNrGroups(Structure s) {
		int nrGroups = 0;

		List<Chain> chains = s.getChains(0);
		for (Chain c : chains) {
			nrGroups += c.getAtomLength();
		}
		return nrGroups;
	}
public static final int getNrGroups ( Structure s ) { int nrGroups = 0 ; List < Chain > chains = s . getChains ( 0 ) ; for ( Chain c : chains ) { nrGroups += c . getAtomLength ( ) ; } return nrGroups ; }
Count how many groups are contained within a structure object.

@param s
the structure object
@return the number of groups in the structure