2828
2929import org .biojava .nbio .structure .Atom ;
3030import org .biojava .nbio .structure .StructureException ;
31+ import org .biojava .nbio .structure .StructureIdentifier ;
3132import org .biojava .nbio .structure .align .ce .CeMain ;
33+ import org .biojava .nbio .structure .align .client .StructureName ;
3234import org .biojava .nbio .structure .align .multiple .MultipleAlignment ;
3335import org .biojava .nbio .structure .align .multiple .mc .MultipleMcMain ;
3436import 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