Skip to content

Commit 4bdd304

Browse files
committed
Updating dssp urls to latest RCSB convention
1 parent 714649c commit 4bdd304

File tree

1 file changed

+6
-2
lines changed
  • biojava-structure/src/main/java/org/biojava/nbio/structure/secstruc

1 file changed

+6
-2
lines changed

biojava-structure/src/main/java/org/biojava/nbio/structure/secstruc/DSSPParser.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import java.net.URL;
3232
import java.util.ArrayList;
3333
import java.util.List;
34+
import java.util.zip.GZIPInputStream;
3435

3536
import org.biojava.nbio.structure.Group;
3637
import org.biojava.nbio.structure.ResidueNumber;
@@ -95,8 +96,11 @@ public static List<SecStrucState> fetch(String pdb,
9596
Structure structure, boolean assign)
9697
throws IOException, StructureException {
9798

98-
InputStream in = new URL("http://www.rcsb.org/pdb/files/"+
99-
pdb+".dssp").openStream();
99+
URL url = new URL("http://files.rcsb.org/dssp/" +
100+
pdb.toLowerCase().substring(1, 3) + "/" +
101+
pdb.toLowerCase() + "/" +
102+
pdb + ".dssp.gz");
103+
InputStream in = new GZIPInputStream(url.openStream());
100104
Reader read = new InputStreamReader(in);
101105
BufferedReader reader = new BufferedReader(read);
102106
return generalParse(reader, structure, assign);

0 commit comments

Comments
 (0)