|
| 1 | +package org.biojava.nbio.structure.test.io; |
| 2 | + |
| 3 | +//import static org.junit.Assert.*; |
| 4 | + |
| 5 | +import java.io.IOException; |
| 6 | + |
| 7 | + |
| 8 | +import org.biojava.nbio.structure.StructureException; |
| 9 | +import org.biojava.nbio.structure.StructureIO; |
| 10 | +import org.biojava.nbio.structure.align.util.AtomCache; |
| 11 | +import org.biojava.nbio.structure.io.FileParsingParameters; |
| 12 | +import org.junit.Ignore; |
| 13 | +import org.junit.Test; |
| 14 | + |
| 15 | +/** |
| 16 | + * Test for a difficult large mmCIF file (a ribosome) with many 2-letter chain ids. |
| 17 | + * Both tests are set to Ignore because the parsing of the file takes too long. |
| 18 | + * |
| 19 | + * @author Jose Duarte |
| 20 | + * |
| 21 | + */ |
| 22 | +public class Test4v5a { |
| 23 | + |
| 24 | + @Test @Ignore |
| 25 | + public void test4v5a() throws StructureException, IOException { |
| 26 | + AtomCache cache = new AtomCache(); |
| 27 | + |
| 28 | + FileParsingParameters params = cache.getFileParsingParams(); |
| 29 | + params.setUseInternalChainId(false); |
| 30 | + params.setCreateAtomBonds(true); |
| 31 | + StructureIO.setAtomCache(cache); |
| 32 | + |
| 33 | + StructureIO.getStructure("4v5a"); |
| 34 | + |
| 35 | + |
| 36 | + } |
| 37 | + |
| 38 | + @Test @Ignore |
| 39 | + public void test4v5aInternalChainIds() throws StructureException, IOException { |
| 40 | + AtomCache cache = new AtomCache(); |
| 41 | + |
| 42 | + FileParsingParameters params = cache.getFileParsingParams(); |
| 43 | + params.setUseInternalChainId(true); |
| 44 | + params.setCreateAtomBonds(true); |
| 45 | + StructureIO.setAtomCache(cache); |
| 46 | + |
| 47 | + |
| 48 | + // this would throw an exception when making ss bonds from struct_conn because |
| 49 | + // chain id "AD" is both an author chain id and an asym chain id and the chains were |
| 50 | + // getting mixed |
| 51 | + StructureIO.getStructure("4v5a"); |
| 52 | + |
| 53 | + //for (Chain c : s.getChains()) { |
| 54 | + // System.out.println(c.getChainID()+" "+c.getInternalChainID()+" "+c.getAtomLength()); |
| 55 | + //} |
| 56 | + |
| 57 | + |
| 58 | + } |
| 59 | +} |
0 commit comments