Skip to content

Commit 35102f5

Browse files
committed
Update demo because of StructureIdentifier
1 parent 8d6b13e commit 35102f5

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

biojava-structure/src/main/java/demo/DemoMultipleMC.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@
2828

2929
import org.biojava.nbio.structure.Atom;
3030
import org.biojava.nbio.structure.StructureException;
31+
import org.biojava.nbio.structure.StructureIdentifier;
3132
import org.biojava.nbio.structure.align.ce.CeMain;
33+
import org.biojava.nbio.structure.align.client.StructureName;
3234
import org.biojava.nbio.structure.align.multiple.MultipleAlignment;
3335
import org.biojava.nbio.structure.align.multiple.mc.MultipleMcMain;
3436
import org.biojava.nbio.structure.align.multiple.mc.MultipleMcParameters;
@@ -91,8 +93,11 @@ public static void main(String[] args) throws IOException, StructureException, I
9193
//Load the CA atoms of the structures
9294
AtomCache cache = new AtomCache();
9395
List<Atom[]> atomArrays = new ArrayList<Atom[]>();
96+
List<StructureIdentifier> ids = new ArrayList<StructureIdentifier>();
9497
for (String name:names) {
95-
atomArrays.add(cache.getAtoms(name));
98+
StructureIdentifier id = new StructureName(name);
99+
ids.add(id);
100+
atomArrays.add(cache.getAtoms(id));
96101
}
97102

98103
//Here the multiple structural alignment algorithm comes in place to generate the alignment object
@@ -102,7 +107,7 @@ public static void main(String[] args) throws IOException, StructureException, I
102107
params.setMinAlignedStructures(10);
103108

104109
MultipleAlignment result = algorithm.align(atomArrays);
105-
result.getEnsemble().setStructureNames(names);
110+
result.getEnsemble().setStructureIdentifiers(ids);
106111

107112
//Information about the alignment
108113
result.getEnsemble().setAlgorithmName(algorithm.getAlgorithmName());

0 commit comments

Comments
 (0)