org.biojava.nbio.structure.io.cif.CifChainSupplierImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of biojava-structure Show documentation
Show all versions of biojava-structure Show documentation
The protein structure modules of BioJava.
package org.biojava.nbio.structure.io.cif;
import org.biojava.nbio.structure.Chain;
import org.rcsb.cif.model.CifFile;
import java.util.ArrayList;
import java.util.List;
/**
* Convert a chain to a {@link CifFile}.
* @author Sebastian Bittrich
*/
public class CifChainSupplierImpl extends AbstractCifFileSupplier {
@Override
public CifFile get(Chain container) {
return getInternal(container.getStructure(), collectWrappedAtoms(container));
}
private List collectWrappedAtoms(Chain chain) {
List wrappedAtoms = new ArrayList<>();
handleChain(chain, 1, wrappedAtoms);
return wrappedAtoms;
}
}