pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/biojava/biojava/commit/4617c33305e4831816d9e35369dd5da4e2798530

stylesheet" href="https://github.githubassets.com/assets/global-d18f184ea1a06a2c.css" /> Merge pull request #1111 from josemduarte/safeguard-polchain · biojava/biojava@4617c33 · GitHub
Skip to content

Commit 4617c33

Browse files
authored
Merge pull request #1111 from josemduarte/safeguard-polchain
Adding safeguards when requesting chains from structure
2 parents fe85d30 + 7217ee8 commit 4617c33

2 files changed

Lines changed: 63 additions & 149 deletions

File tree

biojava-structure/src/main/java/org/biojava/nbio/structure/Structure.java

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,10 @@ public interface Structure extends Cloneable, Serializable {
178178
/**
179179
* Return number of chains of model.
180180
*
181-
* @param modelnr an int specifying the number of the Model that should be used
181+
* @param modelIdx an int specifying the index of the Model that should be used
182182
* @return an int representing the number of Chains in this Model
183183
*/
184-
int size(int modelnr);
184+
int size(int modelIdx);
185185

186186
/**
187187
* Return the number of models .
@@ -232,10 +232,10 @@ public interface Structure extends Cloneable, Serializable {
232232
* Retrieve all Chains belonging to a model .
233233
* @see #getChains(int modelnr)
234234
*
235-
* @param modelnr an int
235+
* @param modelIdx the model index
236236
* @return a List object containing the Chains of Model nr. modelnr
237237
*/
238-
List<Chain> getModel(int modelnr);
238+
List<Chain> getModel(int modelIdx);
239239

240240
/**
241241
* Retrieve all chains for the first model.
@@ -261,17 +261,17 @@ public interface Structure extends Cloneable, Serializable {
261261
* Retrieve all chains of a model.
262262
* @see #getModel
263263
*
264-
* @param modelnr an int
264+
* @param modelIdx the model index
265265
* @return a List object containing the Chains of Model nr. modelnr
266266
*/
267-
List<Chain> getChains(int modelnr);
267+
List<Chain> getChains(int modelIdx);
268268

269269
/**
270270
* Set the chains for a model
271271
* @param chains the chains for a model
272-
* @param modelnr the number of the model
272+
* @param modelIdx the model index
273273
*/
274-
void setChains( int modelnr, List<Chain> chains);
274+
void setChains(int modelIdx, List<Chain> chains);
275275

276276
/**
277277
* Return all polymeric chains for the first model
@@ -315,7 +315,7 @@ public interface Structure extends Cloneable, Serializable {
315315

316316
/**
317317
* Return all water chains for the given model index
318-
* @param modelIdx
318+
* @param modelIdx the model index
319319
* @return
320320
* @since 5.0
321321
*/
@@ -332,9 +332,9 @@ public interface Structure extends Cloneable, Serializable {
332332
* Add a new chain to the model specified by the given index
333333
*
334334
* @param chain a Chain object
335-
* @param modelnr an int specifying to which model the Chain should be added
335+
* @param modelIdx an int specifying to which model the Chain should be added
336336
*/
337-
void addChain(Chain chain, int modelnr);
337+
void addChain(Chain chain, int modelIdx);
338338

339339
/**
340340
* Retrieve a chain by its index within the Structure .
@@ -348,10 +348,10 @@ public interface Structure extends Cloneable, Serializable {
348348
* Retrieve a chain by its indices within the Structure and model.
349349
*
350350
* @param chainIndex the index of the desired chain in the structure
351-
* @param modelnr the model the desired chain is in
351+
* @param modelIdx the model index
352352
* @return a Chain object
353353
*/
354-
Chain getChainByIndex(int modelnr, int chainIndex);
354+
Chain getChainByIndex(int modelIdx, int chainIndex);
355355

356356
/**
357357
* Check if a chain with the chainId aymId is contained in this structure.
@@ -394,11 +394,11 @@ public interface Structure extends Cloneable, Serializable {
394394
* considers only model nr X. count starts with 0.
395395
* @param authId the chain name of the chain to use
396396
* @param pdbResnum the PDB residue number of the requested group
397-
* @param modelnr the number of the model to use
397+
* @param modelIdx the model index
398398
* @return Group the requested Group
399399
* @throws StructureException
400400
*/
401-
Group findGroup(String authId, String pdbResnum, int modelnr) throws StructureException;
401+
Group findGroup(String authId, String pdbResnum, int modelIdx) throws StructureException;
402402

403403
/**
404404
* Retrieve a Chain (polymeric, non-polymeric or water) based on

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy