Skip to content

Commit 32ab236

Browse files
Added methods that take SCOP Ids rather than SCOPDomains.
1 parent 31617ac commit 32ab236

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

  • biojava3-structure/src/main/java/org/biojava/bio/structure/align/util

biojava3-structure/src/main/java/org/biojava/bio/structure/align/util/AtomCache.java

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,32 @@ public void setStrictSCOP(boolean strictSCOP) {
322322
public Structure getStructureForDomain(ScopDomain domain) throws IOException, StructureException{
323323
return getStructureForDomain(domain, scopInstallation);
324324
}
325+
326+
/** Returns the representation of a ScopDomain as a BioJava Structure object.
327+
*
328+
* @param domain A SCOP Id
329+
* @return a Structure object.
330+
* @throws IOException
331+
* @throws StructureException
332+
*/
333+
public Structure getStructureForDomain(String scopId, ScopDatabase scopInstallation) throws IOException, StructureException{
334+
if ( scopInstallation == null) {
335+
scopInstallation = ScopFactory.getSCOP();
336+
}
337+
ScopDomain domain = scopInstallation.getDomainByScopID(scopId);
338+
return getStructureForDomain(domain, scopInstallation);
339+
}
340+
341+
/** Returns the representation of a ScopDomain as a BioJava Structure object.
342+
*
343+
* @param domain A Scop Id
344+
* @return a Structure object.
345+
* @throws IOException
346+
* @throws StructureException
347+
*/
348+
public Structure getStructureForDomain(String scopId) throws IOException, StructureException{
349+
return getStructureForDomain(scopId, ScopFactory.getSCOP());
350+
}
325351

326352
/** Returns the representation of a ScopDomain as a BioJava Structure object
327353
*

0 commit comments

Comments
 (0)