@@ -64,13 +64,14 @@ public interface Group extends Serializable {
6464 public int size ();
6565
6666 /**
67- * Return true or false, depending if this group has 3D coordinates or not.
67+ * Return true or false, depending if this group has 3D coordinates or not.
6868 *
6969 * @return true if Group has 3D coordinates
7070 */
7171 public boolean has3D ();
7272
73- /** Flag if group has 3D data .
73+ /**
74+ * Flag if group has 3D data .
7475 *
7576 * @param flag true to set flag that this Group has 3D coordinates
7677 */
@@ -84,21 +85,24 @@ public interface Group extends Serializable {
8485 */
8586 public GroupType getType ();
8687
87- /** Add an atom to this group.
88+ /**
89+ * Add an atom to this group.
8890 *
8991 * @param atom an Atom object
9092 */
9193 public void addAtom (Atom atom );
9294
93- /** Get list of atoms.
95+ /**
96+ * Get list of atoms.
9497 *
9598 * @return a List object representing the atoms
9699 * @see #setAtoms(List)
97100 */
98101 public List <Atom > getAtoms () ;
99102
100103
101- /** Set the atoms of this group.
104+ /**
105+ * Set the atoms of this group.
102106 * @see {@link Atom}
103107 * @param atoms a list of atoms
104108 */
@@ -180,21 +184,24 @@ public interface Group extends Serializable {
180184 public boolean hasAminoAtoms () ;
181185
182186
183- /** tests in the Chemical Component Dictionary, if this group is a polymeric group
187+ /**
188+ * Check if this group is a polymeric group, from the definition in Chemical Component Dictionary
184189 *
185190 * @return true if a polymeric group
186191 */
187192 public boolean isPolymeric ();
188193
189194
190- /** Tests in the Chemical Component Dictionary, if this group is an amino acid
195+ /**
196+ * Check if this group is an aminoacid group, from the definition in Chemical Component Dictionary
191197 *
192198 * @return true if an amino acid
193199 */
194200 public boolean isAminoAcid ();
195201
196202
197- /** Tests in the Chemical Component Dictionary, if this group is a nucleotide
203+ /**
204+ * Check if this group is a nucleotide group, from the definition in Chemical Component Dictionary
198205 *
199206 * @return true if a nucleotide
200207 */
@@ -213,38 +220,42 @@ public interface Group extends Serializable {
213220 */
214221 public void setProperties (Map <String ,Object > properties ) ;
215222
216- /** return properties.
223+ /**
224+ * Return properties.
217225 * @see #setProperties
218226 *
219227 * @return a HashMap object representing the properties value
220228 */
221229 public Map <String ,Object > getProperties () ;
222230
223- /** set a single property .
231+ /**
232+ * Set a single property .
224233 *
225234 * @param key a String
226235 * @param value an Object
227236 * @see #getProperty
228-
229237 */
230238 public void setProperty (String key , Object value ) ;
231239
232- /** get a single property .
240+ /**
241+ * Get a single property .
233242 *
234243 * @param key a String
235244 * @return an Object
236245 * @see #setProperty
237246 */
238247 public Object getProperty (String key ) ;
239248
240- /** get an Atom Iterator.
249+ /**
250+ * Get an Atom Iterator.
241251 *
242252 * @return an Iterator object
243253 */
244254 public Iterator <Atom > iterator () ;
245255
246256
247- /** returns and identical copy of this Group object .
257+ /**
258+ * Returns and identical copy of this Group object .
248259 * @return and identical copy of this Group object
249260 */
250261 public Object clone ();
@@ -267,7 +278,7 @@ public interface Group extends Serializable {
267278 public Chain getChain () ;
268279
269280 /**
270- * returns a dynamically created ResidueNumber for the group - this
281+ * Returns a dynamically created ResidueNumber for the group - this
271282 * contains the chainId, resNum and insCode of the group.
272283 * @see ResidueNumber
273284 * @return ResidueNumber for the group.
@@ -276,13 +287,15 @@ public interface Group extends Serializable {
276287 public ResidueNumber getResidueNumber ();
277288
278289
279- /** sets the ResidueNumber for this Group
290+ /**
291+ * Sets the ResidueNumber for this Group
280292 *
281293 * @param residueNumber the PDB residueNumber
282294 */
283295 public void setResidueNumber (ResidueNumber residueNumber );
284296
285- /** Utility method to temporarily set a chainID for a group, if a parent chain object does not exist yet.
297+ /**
298+ * Utility method to temporarily set a chainID for a group, if a parent chain object does not exist yet.
286299 * Not recommended for general use other than parsing.
287300 *
288301 * @param chainId
@@ -301,41 +314,66 @@ public interface Group extends Serializable {
301314 */
302315 public String getChainId ();
303316
304- /** Set the Chemical Component that closer describes this group.
317+ /**
318+ * Set the Chemical Component that closer describes this group.
305319 *
306320 * @param cc the chemical component
307321 */
308322 public void setChemComp (ChemComp cc );
309323
310- /** Get the chemical component that closer describes this group. If the information does not exist yet, fetches the information from PDB web site.
324+ /**
325+ * Get the chemical component that closer describes this group. If the information does not exist yet, fetches the information from PDB web site.
311326 *
312327 * @return the Chemical Component definition for this Group.
313328 */
314329 public ChemComp getChemComp ();
315330
316331
317- /** Test if this group has alternate locations.
332+ /**
333+ * Check if this group has alternate location groups.
318334 *
319335 * @return boolean flag if there are alternate locations.
336+ * @see #getAltLocs()
320337 */
321338 public boolean hasAltLoc ();
322339
323340
324- /** Get the list of alternate locations.
341+ /**
342+ * Get the list of other alternate location groups.
343+ * <p>
344+ * The main group (this group) will contain the first altloc (be it the default '.' or 'A' or a mix of '.' and 'A').
345+ * <p>
346+ * This method will return the altloc groups that are not the main group, e.g.:
347+ *
348+ * <li> if '.' (default), 'A' and 'B' altlocs are present in file, the main group will contain
349+ * the default '.' and this method will return 2 altloc groups
350+ * </li>
351+ *
352+ * <li> if 'A' and 'B' are present in file without a default '.' group, then the main group will contain the 'A'
353+ * location whilst this method will return only 1 altloc group with the 'B' location
354+ * </li>
355+ *
356+ * <p>
357+ * Note that atoms with the default altloc (.) are included in all groups. Atoms with other altlocs (typically A, B, etc)
358+ * will be sorted into groups by altloc.
359+ * <p>
360+ * Thus it can happen that an altloc group duplicate the contents of the main group.
325361 *
326362 * @return List of other groups that are on alternate locations
327363 */
328364 public List <Group > getAltLocs ();
329365
330- /** Add a group that is an alternate location for this group.
366+ /**
367+ * Add a group that is an alternate location for this group.
331368 *
369+ * @param g the altloc group to add
332370 */
333371 public void addAltLoc (Group g );
334372
335373 /**
336374 * Determines if this group is water.
337375 *
338- * @see {@link GroupType#WATERNAMES}
376+ * @see GroupType#WATERNAMES
339377 * @return true if it's water, false otherwise.
340378 */
341379 public boolean isWater ();
@@ -349,7 +387,8 @@ public interface Group extends Serializable {
349387 public Group getAltLocGroup (Character altLoc );
350388
351389
352- /** attempts to reduce the memory imprint of this group by trimming
390+ /**
391+ * Attempts to reduce the memory imprint of this group by trimming
353392 * all internal Collection objects to the required size.
354393 *
355394 */
0 commit comments