public void setType(String type) { this.type = type; residueType = ResidueType.getResidueTypeFromString(type); if (residueType != null) { polymerType = residueType.polymerType; } }