apos){
this.apos = apos;
- if ( apos.size() == 0)
+ if (apos.isEmpty())
return;
AlignedPosition last = apos.get(apos.size()-1);
diff --git a/biojava-structure/pom.xml b/biojava-structure/pom.xml
index 72b76cbed9..7fbc64a3c1 100644
--- a/biojava-structure/pom.xml
+++ b/biojava-structure/pom.xml
@@ -4,7 +4,7 @@
biojava
org.biojava
- 7.2.1
+ 7.2.5-SNAPSHOT
biojava-structure
biojava-structure
@@ -51,13 +51,13 @@
org.biojava
biojava-alignment
- 7.2.1
+ 7.2.5-SNAPSHOT
compile
org.biojava
biojava-core
- 7.2.1
+ 7.2.5-SNAPSHOT
compile
diff --git a/biojava-structure/src/main/java/org/biojava/nbio/structure/Author.java b/biojava-structure/src/main/java/org/biojava/nbio/structure/Author.java
index b0d7253507..bd5a01b885 100644
--- a/biojava-structure/src/main/java/org/biojava/nbio/structure/Author.java
+++ b/biojava-structure/src/main/java/org/biojava/nbio/structure/Author.java
@@ -62,7 +62,7 @@ public boolean equals(Object obj) {
if ((this.surname == null) ? (other.surname != null) : !this.surname.equals(other.surname)) {
return false;
}
- return !((this.initials == null) ? (other.initials != null) : !this.initials.equals(other.initials));
+ return (this.initials == null) ? other.initials == null : this.initials.equals(other.initials);
}
@Override
diff --git a/biojava-structure/src/main/java/org/biojava/nbio/structure/Element.java b/biojava-structure/src/main/java/org/biojava/nbio/structure/Element.java
index 2f534b2828..4e2d3e340a 100644
--- a/biojava-structure/src/main/java/org/biojava/nbio/structure/Element.java
+++ b/biojava-structure/src/main/java/org/biojava/nbio/structure/Element.java
@@ -424,7 +424,7 @@ public boolean isHeavyAtom() {
* @return true if Element is not Hydrogen and not Carbon.
*/
public boolean isHeteroAtom() {
- return !(this == C || this == H);
+ return this != C && this != H;
}
/**
diff --git a/biojava-structure/src/main/java/org/biojava/nbio/structure/EntityType.java b/biojava-structure/src/main/java/org/biojava/nbio/structure/EntityType.java
index de8b5ca4d1..b4978fc582 100644
--- a/biojava-structure/src/main/java/org/biojava/nbio/structure/EntityType.java
+++ b/biojava-structure/src/main/java/org/biojava/nbio/structure/EntityType.java
@@ -21,8 +21,7 @@
package org.biojava.nbio.structure;
/**
- *
- * The type of entity (polymer, non-polymer, water, macrolide)
+ * The type of entity (polymer, non-polymer, water, macrolide, branched)
* as defined in the mmCIF dictionary:
*
* Entities are of four types: polymer, non-polymer, macrolide and water.
@@ -76,10 +75,8 @@ public enum EntityType {
/**
* @param entType the type of the Entity
*/
- private EntityType(String entType) {
-
+ EntityType(String entType) {
this.setEntityType(entType);
-
}
/**
@@ -101,19 +98,15 @@ private void setEntityType(String entityType) {
* Returns null if entityType is null or not one of the supported
* standard types.
*
- * @param entityType String value , should be one of "polymer","non-polymer","water","macrolide"
- * @return an EntityType object
+ * @param entityType should be one of "polymer", "non-polymer", "water", "macrolide", "branched" (case insensitive)
+ * @return an EntityType object or null if the input string doesn't correspond to a known entity
*/
- public static EntityType entityTypeFromString(String entityType)
- {
-
- if ( entityType == null)
+ public static EntityType entityTypeFromString(String entityType) {
+ if (entityType == null)
return null;
- for(EntityType et : EntityType.values())
- {
- if(entityType.equals(et.entityType))
- {
+ for(EntityType et : EntityType.values()) {
+ if (entityType.equalsIgnoreCase(et.entityType)) {
return et;
}
}
diff --git a/biojava-structure/src/main/java/org/biojava/nbio/structure/Structure.java b/biojava-structure/src/main/java/org/biojava/nbio/structure/Structure.java
index 51d69234c7..05bd0ba859 100644
--- a/biojava-structure/src/main/java/org/biojava/nbio/structure/Structure.java
+++ b/biojava-structure/src/main/java/org/biojava/nbio/structure/Structure.java
@@ -178,10 +178,10 @@ public interface Structure extends Cloneable, Serializable {
/**
* Return number of chains of model.
*
- * @param modelnr an int specifying the number of the Model that should be used
+ * @param modelIdx an int specifying the index of the Model that should be used
* @return an int representing the number of Chains in this Model
*/
- int size(int modelnr);
+ int size(int modelIdx);
/**
* Return the number of models .
@@ -232,10 +232,10 @@ public interface Structure extends Cloneable, Serializable {
* Retrieve all Chains belonging to a model .
* @see #getChains(int modelnr)
*
- * @param modelnr an int
+ * @param modelIdx the model index
* @return a List object containing the Chains of Model nr. modelnr
*/
- List getModel(int modelnr);
+ List getModel(int modelIdx);
/**
* Retrieve all chains for the first model.
@@ -261,17 +261,17 @@ public interface Structure extends Cloneable, Serializable {
* Retrieve all chains of a model.
* @see #getModel
*
- * @param modelnr an int
+ * @param modelIdx the model index
* @return a List object containing the Chains of Model nr. modelnr
*/
- List getChains(int modelnr);
+ List getChains(int modelIdx);
/**
* Set the chains for a model
* @param chains the chains for a model
- * @param modelnr the number of the model
+ * @param modelIdx the model index
*/
- void setChains( int modelnr, List chains);
+ void setChains(int modelIdx, List chains);
/**
* Return all polymeric chains for the first model
@@ -315,7 +315,7 @@ public interface Structure extends Cloneable, Serializable {
/**
* Return all water chains for the given model index
- * @param modelIdx
+ * @param modelIdx the model index
* @return
* @since 5.0
*/
@@ -332,9 +332,9 @@ public interface Structure extends Cloneable, Serializable {
* Add a new chain to the model specified by the given index
*
* @param chain a Chain object
- * @param modelnr an int specifying to which model the Chain should be added
+ * @param modelIdx an int specifying to which model the Chain should be added
*/
- void addChain(Chain chain, int modelnr);
+ void addChain(Chain chain, int modelIdx);
/**
* Retrieve a chain by its index within the Structure .
@@ -348,10 +348,10 @@ public interface Structure extends Cloneable, Serializable {
* Retrieve a chain by its indices within the Structure and model.
*
* @param chainIndex the index of the desired chain in the structure
- * @param modelnr the model the desired chain is in
+ * @param modelIdx the model index
* @return a Chain object
*/
- Chain getChainByIndex(int modelnr, int chainIndex);
+ Chain getChainByIndex(int modelIdx, int chainIndex);
/**
* Check if a chain with the chainId aymId is contained in this structure.
@@ -394,11 +394,11 @@ public interface Structure extends Cloneable, Serializable {
* considers only model nr X. count starts with 0.
* @param authId the chain name of the chain to use
* @param pdbResnum the PDB residue number of the requested group
- * @param modelnr the number of the model to use
+ * @param modelIdx the model index
* @return Group the requested Group
* @throws StructureException
*/
- Group findGroup(String authId, String pdbResnum, int modelnr) throws StructureException;
+ Group findGroup(String authId, String pdbResnum, int modelIdx) throws StructureException;
/**
* Retrieve a Chain (polymeric, non-polymeric or water) based on
diff --git a/biojava-structure/src/main/java/org/biojava/nbio/structure/StructureImpl.java b/biojava-structure/src/main/java/org/biojava/nbio/structure/StructureImpl.java
index ae00c8f7f3..0a697e2d7b 100644
--- a/biojava-structure/src/main/java/org/biojava/nbio/structure/StructureImpl.java
+++ b/biojava-structure/src/main/java/org/biojava/nbio/structure/StructureImpl.java
@@ -123,20 +123,15 @@ public Structure clone() {
n.setDBRefs(this.getDBRefs());
n.setSites(getSites());
-
// go through each chain and clone chain
for (int i=0;i cloned_model = new ArrayList<>();
for (int j=0;j models.size())
- throw new StructureException(" no model nr " + modelnr +
+ if ( modelIdx > models.size())
+ throw new StructureException(" no model nr " + modelIdx +
" in this structure. (contains "+models.size()+")");
-
// first we need to gather all groups with the author id chainName: polymers, non-polymers and waters
- Chain polyChain = getPolyChainByPDB(chainName, modelnr);
+ Chain polyChain = getPolyChainByPDB(chainName, modelIdx);
if(polyChain != null) {
- List groups = new ArrayList<>();
-
- groups.addAll(polyChain.getAtomGroups());
+ List groups = new ArrayList<>(polyChain.getAtomGroups());
// there can be more than one non-poly chain for a given author id
- for (Chain chain: getNonPolyChainsByPDB(chainName, modelnr)) {
+ for (Chain chain: getNonPolyChainsByPDB(chainName, modelIdx)) {
groups.addAll(chain.getAtomGroups());
}
- Chain water = getWaterChainByPDB(chainName, modelnr);
+ Chain water = getWaterChainByPDB(chainName, modelIdx);
if (water!=null)
groups.addAll(water.getAtomGroups());
-
-
// now iterate over all groups
// in order to find the amino acid that has this pdbRenum.
@@ -254,13 +243,12 @@ public void setStructureIdentifier(StructureIdentifier structureIdentifier) {
/** {@inheritDoc} */
@Override
public void addChain(Chain chain) {
- int modelnr = 0 ;
- addChain(chain,modelnr);
+ addChain(chain, 0);
}
/** {@inheritDoc} */
@Override
- public void addChain(Chain chain, int modelnr) {
+ public void addChain(Chain chain, int modelIdx) {
// if model has not been initialized, init it!
chain.setStructure(this);
if (models.isEmpty()) {
@@ -271,37 +259,25 @@ public void addChain(Chain chain, int modelnr) {
models.add(model);
} else {
- Model model = models.get(modelnr);
+ Model model = models.get(modelIdx);
model.addChain(chain);
}
-
-
-
}
-
-
/** {@inheritDoc} */
@Override
public Chain getChainByIndex(int number) {
-
- int modelnr = 0 ;
-
- return getChainByIndex(modelnr,number);
+ return getChainByIndex(0, number);
}
/** {@inheritDoc} */
@Override
- public Chain getChainByIndex(int modelnr,int number) {
-
- Model model = models.get(modelnr);
-
+ public Chain getChainByIndex(int modelIdx, int number) {
+ Model model = models.get(modelIdx);
return model.getChains().get(number);
}
-
-
/** {@inheritDoc} */
@Override
public void addModel(List modelChains){
@@ -313,16 +289,12 @@ public void addModel(List modelChains){
models.add(model);
}
-
/** {@inheritDoc} */
@Override
public void setChains(List chains){
-
- setModel(0,chains);
+ setModel(0, chains);
}
-
-
/** {@inheritDoc} */
@Override
public void setModel(int position, List modelChains){
@@ -333,8 +305,6 @@ public void setModel(int position, List modelChains){
c.setStructure(this);
//System.out.println("model size:" + models.size());
-
-
Model model = new Model();
model.setChains(modelChains);
@@ -345,12 +315,9 @@ public void setModel(int position, List modelChains){
}
}
- /** String representation.
- *
- */
@Override
public String toString(){
- String newline = System.getProperty("line.separator");
+ String newline = System.lineSeparator();
StringBuilder str = new StringBuilder();
str.append("structure ");
str.append(name);
@@ -384,17 +351,13 @@ public String toString(){
List hgr = cha.getAtomGroups(GroupType.HETATM);
List ngr = cha.getAtomGroups(GroupType.NUCLEOTIDE);
-
-
-
str.append("chain ")
.append(j).append(": asymId:")
.append(cha.getId())
.append(" authId:")
.append(cha.getName()).append(" ");
-
- if ( cha.getEntityInfo() != null){
+ if (cha.getEntityInfo() != null){
EntityInfo comp = cha.getEntityInfo();
String molName = comp.getDescription();
if ( molName != null){
@@ -406,7 +369,6 @@ public String toString(){
.append(")");
}
-
str.append(newline);
str.append(" length SEQRES: ").append(cha.getSeqResLength());
str.append(" length ATOM: ").append(cha.getAtomLength());
@@ -425,32 +387,21 @@ public String toString(){
str.append(mol).append(newline);
}
-
return str.toString() ;
}
@Override
public int size() {
- int modelnr = 0 ;
-
if (!models.isEmpty()) {
- return models.get(modelnr).getPolyChains().size();
- }
- else {
+ return models.get(0).getPolyChains().size();
+ } else {
return 0 ;
}
-
}
- /** return number of chains of model.
- *
- */
@Override
- public int size(int modelnr) { return models.get(modelnr).size(); }
+ public int size(int modelIdx) { return models.get(modelIdx).size(); }
- // some NMR stuff :
-
- /** return number of models. */
@Override
public int nrModels() {
return models.size() ;
@@ -520,16 +471,15 @@ public List getChains(int modelIdx){
/** {@inheritDoc} */
@Override
public List getChains(){
- if (models.size()==0) {
+ if (models.isEmpty()) {
return new ArrayList<>(0);
}
return getChains(0);
-
}
@Override
public List getPolyChains() {
- if (models.size()==0) {
+ if (models.isEmpty()) {
return new ArrayList<>(0);
}
return getPolyChains(0);
@@ -542,7 +492,7 @@ public List getPolyChains(int modelIdx) {
@Override
public List getNonPolyChains() {
- if (models.size()==0) {
+ if (models.isEmpty()) {
return new ArrayList<>(0);
}
return getNonPolyChains(0);
@@ -555,7 +505,7 @@ public List getNonPolyChains(int modelIdx) {
@Override
public List getWaterChains() {
- if (models.size()==0) {
+ if (models.isEmpty()) {
return new ArrayList<>(0);
}
return getWaterChains(0);
@@ -566,55 +516,46 @@ public List getWaterChains(int modelIdx) {
return models.get(modelIdx).getWaterChains();
}
-
-
/** {@inheritDoc} */
@Override
- public void setChains(int modelnr, List chains){
+ public void setChains(int modelIdx, List chains){
for (Chain c: chains){
c.setStructure(this);
}
- if (models.size()>modelnr) {
- models.remove(modelnr);
+ if (models.size()> modelIdx) {
+ models.remove(modelIdx);
}
Model model = new Model();
model.setChains(chains);
- models.add(modelnr, model);
-
+ models.add(modelIdx, model);
}
- /** Retrieve all Chains belonging to a model .
- *
- * @param modelnr an int
- * @return a List object
+ /**
+ * {@inheritDoc}
*/
@Override
- public List getModel(int modelnr) {
-
- return models.get(modelnr).getChains();
+ public List getModel(int modelIdx) {
+ if (models.isEmpty()) return new ArrayList<>();
+ return models.get(modelIdx).getChains();
}
/** {@inheritDoc} */
@Override
- public Chain getChain(String asymId, int modelnr) {
-
- List chains = getChains(modelnr);
+ public Chain getChain(String asymId, int modelIdx) {
+ List chains = getChains(modelIdx);
for (Chain c : chains) {
if (c.getId().equals(asymId)) {
return c;
}
}
return null;
-
}
/** {@inheritDoc} */
@Override
public Chain getChain(String asymId) {
-
return getChain(asymId,0);
-
}
@Override
@@ -625,6 +566,8 @@ public Chain getPolyChain(String asymId) {
@Override
public Chain getPolyChain(String asymId, int modelIdx) {
+ if (models.isEmpty()) return null;
+
Model model = models.get(modelIdx);
if (model==null) {
return null;
@@ -637,7 +580,6 @@ public Chain getPolyChain(String asymId, int modelIdx) {
return null;
}
-
@Override
public Chain getNonPolyChain(String asymId) {
return getNonPolyChain(asymId, 0);
@@ -655,7 +597,6 @@ public Chain getNonPolyChain(String asymId, int modelIdx) {
if (c.getId().equals(asymId))
return c;
}
-
return null;
}
@@ -693,7 +634,6 @@ public List getNonPolyChainsByPDB(String authId, int modelIdx) {
return chains;
}
-
List nonpolyChains = model.getNonPolyChains();
for (Chain c : nonpolyChains){
if (c.getName().equals(authId))
@@ -708,7 +648,6 @@ public Chain getWaterChain(String asymId) {
return getWaterChain(asymId, 0);
}
-
@Override
public Chain getWaterChain(String asymId, int modelIdx) {
Model model = models.get(modelIdx);
@@ -729,7 +668,6 @@ public Chain getWaterChainByPDB(String authId) {
return getWaterChainByPDB(authId, 0);
}
-
@Override
public Chain getWaterChainByPDB(String authId, int modelIdx) {
Model model = models.get(modelIdx);
@@ -745,8 +683,6 @@ public Chain getWaterChainByPDB(String authId, int modelIdx) {
return null;
}
-
-
/** {@inheritDoc} */
@Override
public String toPDB() {
@@ -835,7 +771,6 @@ public EntityInfo getEntityById(int entityId) {
return null;
}
-
/** {@inheritDoc} */
@Override
public List getDBRefs() {
@@ -855,7 +790,6 @@ public void setDBRefs(List dbrefs) {
this.dbrefs = dbrefs;
}
-
/** {@inheritDoc} */
@Override
public PDBHeader getPDBHeader() {
@@ -872,7 +806,6 @@ public void setPDBHeader(PDBHeader pdbHeader){
@Override
public List getSSBonds(){
return ssbonds;
-
}
/** {@inheritDoc} */
@@ -882,9 +815,7 @@ public void setSSBonds(List ssbonds){
}
/**
- * Adds a single disulfide Bond to this structure
- *
- * @param ssbond the SSBond.
+ * {@inheritDoc}
*/
@Override
public void addSSBond(Bond ssbond){
@@ -892,10 +823,7 @@ public void addSSBond(Bond ssbond){
}
/**
- * Return whether or not the entry has an associated journal article
- * or publication. The JRNL section is not mandatory and thus may not be
- * present.
- * @return flag if a JournalArticle could be found.
+ * R{@inheritDoc}
*/
@Override
public boolean hasJournalArticle() {
@@ -903,9 +831,7 @@ public boolean hasJournalArticle() {
}
/**
- * get the associated publication as defined by the JRNL records in a PDB
- * file.
- * @return a JournalArticle
+ * {@inheritDoc}
*/
@Override
public JournalArticle getJournalArticle() {
@@ -913,9 +839,7 @@ public JournalArticle getJournalArticle() {
}
/**
- * set the associated publication as defined by the JRNL records in a PDB
- * file.
- * @param journalArticle the article
+ * {@inheritDoc}
*/
@Override
public void setJournalArticle(JournalArticle journalArticle) {
@@ -923,29 +847,21 @@ public void setJournalArticle(JournalArticle journalArticle) {
}
/**
- * @return the sites contained in this structure
+ * {@inheritDoc}
*/
-
@Override
public List getSites() {
return sites;
}
/**
- * @param sites the sites to set in the structure
+ * {@inheritDoc}
*/
-
@Override
public void setSites(List sites) {
this.sites = sites;
}
- /** Caution: we should probably remove this to avoid confusion. Currently this is always an empty list!
- *
- * @return a list of Groups listed in the HET records - this will not
- * include any waters.
- */
-
/**
* Sets a flag to indicate if this structure is a biological assembly
* @param biologicalAssembly true if biological assembly, otherwise false
@@ -1026,19 +942,17 @@ public void setPDBCode(String pdb_id){
pdbId = new PdbId(pdb_id);
}
}
-
-
- /** {@inheritDoc}
- * @since 6.0.0
- * */
+ /**
+ * {@inheritDoc}
+ **/
public PdbId getPdbId() {
return this.pdbId;
}
- /** {@inheritDoc}
- * @since 6.0.0
- * */
+ /**
+ * {@inheritDoc}
+ **/
public void setPdbId(PdbId pdbId) {
this.pdbId = pdbId;
}
diff --git a/biojava-structure/src/main/java/org/biojava/nbio/structure/align/ClusterAltAligs.java b/biojava-structure/src/main/java/org/biojava/nbio/structure/align/ClusterAltAligs.java
index 373bcf1611..0933198d7b 100644
--- a/biojava-structure/src/main/java/org/biojava/nbio/structure/align/ClusterAltAligs.java
+++ b/biojava-structure/src/main/java/org/biojava/nbio/structure/align/ClusterAltAligs.java
@@ -102,7 +102,7 @@ public static void cluster(AlternativeAlignment[] aligs, int cutoff){
}
clusters.add(currentCluster);
- if ( remainList.size() == 0) {
+ if ( remainList.isEmpty()) {
break;
}
}
diff --git a/biojava-structure/src/main/java/org/biojava/nbio/structure/align/ce/CECalculator.java b/biojava-structure/src/main/java/org/biojava/nbio/structure/align/ce/CECalculator.java
index 6c045ba48e..83f16b7982 100644
--- a/biojava-structure/src/main/java/org/biojava/nbio/structure/align/ce/CECalculator.java
+++ b/biojava-structure/src/main/java/org/biojava/nbio/structure/align/ce/CECalculator.java
@@ -1450,7 +1450,7 @@ private int optimizeSuperposition(AFPChain afpChain, int nse1, int nse2, int str
//afpChain.setTotalRmsdOpt(rmsd);
//System.out.println("rmsd: " + rmsd);
- if(!(nAtom= strLen * 0.95 && !isRmsdLenAssigned) {
rmsdLen=rmsd;
isRmsdLenAssigned=true;
}
diff --git a/biojava-structure/src/main/java/org/biojava/nbio/structure/align/ce/CeCalculatorEnhanced.java b/biojava-structure/src/main/java/org/biojava/nbio/structure/align/ce/CeCalculatorEnhanced.java
index 4f57161268..cab98b0113 100644
--- a/biojava-structure/src/main/java/org/biojava/nbio/structure/align/ce/CeCalculatorEnhanced.java
+++ b/biojava-structure/src/main/java/org/biojava/nbio/structure/align/ce/CeCalculatorEnhanced.java
@@ -1455,7 +1455,7 @@ private int optimizeSuperposition(AFPChain afpChain, int nse1, int nse2, int str
//afpChain.setTotalRmsdOpt(rmsd);
//System.out.println("rmsd: " + rmsd);
- if(!(nAtom= strLen * 0.95 && !isRmsdLenAssigned) {
rmsdLen=rmsd;
isRmsdLenAssigned=true;
}
diff --git a/biojava-structure/src/main/java/org/biojava/nbio/structure/align/multiple/BlockImpl.java b/biojava-structure/src/main/java/org/biojava/nbio/structure/align/multiple/BlockImpl.java
index e0423b6f8f..43da1d7c06 100644
--- a/biojava-structure/src/main/java/org/biojava/nbio/structure/align/multiple/BlockImpl.java
+++ b/biojava-structure/src/main/java/org/biojava/nbio/structure/align/multiple/BlockImpl.java
@@ -127,7 +127,7 @@ public void setAlignRes(List> alignRes) {
public int length() {
if (alignRes == null)
return 0;
- if (alignRes.size() == 0)
+ if (alignRes.isEmpty())
return 0;
return alignRes.get(0).size();
}
diff --git a/biojava-structure/src/main/java/org/biojava/nbio/structure/align/multiple/BlockSetImpl.java b/biojava-structure/src/main/java/org/biojava/nbio/structure/align/multiple/BlockSetImpl.java
index cbbb3ae895..344ee3c239 100644
--- a/biojava-structure/src/main/java/org/biojava/nbio/structure/align/multiple/BlockSetImpl.java
+++ b/biojava-structure/src/main/java/org/biojava/nbio/structure/align/multiple/BlockSetImpl.java
@@ -179,7 +179,7 @@ public int size() {
// Get the size from the variables that can contain the information
if (parent != null)
return parent.size();
- else if (getBlocks().size() == 0) {
+ else if (getBlocks().isEmpty()) {
throw new IndexOutOfBoundsException(
"Empty BlockSet: number of Blocks == 0.");
} else
@@ -194,7 +194,7 @@ public int getCoreLength() {
}
protected void updateLength() {
- if (getBlocks().size() == 0) {
+ if (getBlocks().isEmpty()) {
throw new IndexOutOfBoundsException(
"Empty BlockSet: number of Blocks == 0.");
}
@@ -207,7 +207,7 @@ protected void updateLength() {
}
protected void updateCoreLength() {
- if (getBlocks().size() == 0) {
+ if (getBlocks().isEmpty()) {
throw new IndexOutOfBoundsException(
"Empty BlockSet: number of Blocks == 0.");
}
diff --git a/biojava-structure/src/main/java/org/biojava/nbio/structure/align/multiple/MultipleAlignmentImpl.java b/biojava-structure/src/main/java/org/biojava/nbio/structure/align/multiple/MultipleAlignmentImpl.java
index 738eee30c5..06c93a4403 100644
--- a/biojava-structure/src/main/java/org/biojava/nbio/structure/align/multiple/MultipleAlignmentImpl.java
+++ b/biojava-structure/src/main/java/org/biojava/nbio/structure/align/multiple/MultipleAlignmentImpl.java
@@ -207,7 +207,7 @@ public int getCoreLength() {
* lengths.
*/
protected void updateLength() {
- if (getBlockSets().size() == 0) {
+ if (getBlockSets().isEmpty()) {
throw new IndexOutOfBoundsException(
"Empty MultipleAlignment: blockSets size == 0.");
} // Otherwise try to calculate it from the BlockSet information
@@ -223,7 +223,7 @@ protected void updateLength() {
* BlockSet core lengths.
*/
protected void updateCoreLength() {
- if (getBlockSets().size() == 0) {
+ if (getBlockSets().isEmpty()) {
throw new IndexOutOfBoundsException(
"Empty MultipleAlignment: blockSets size == 0.");
} // Otherwise try to calculate it from the BlockSet information
diff --git a/biojava-structure/src/main/java/org/biojava/nbio/structure/align/multiple/mc/MultipleMcOptimizer.java b/biojava-structure/src/main/java/org/biojava/nbio/structure/align/multiple/mc/MultipleMcOptimizer.java
index 052f147fc6..29c7012801 100644
--- a/biojava-structure/src/main/java/org/biojava/nbio/structure/align/multiple/mc/MultipleMcOptimizer.java
+++ b/biojava-structure/src/main/java/org/biojava/nbio/structure/align/multiple/mc/MultipleMcOptimizer.java
@@ -153,7 +153,7 @@ public MultipleMcOptimizer(MultipleAlignment seedAln,
for (Block b : toDelete) {
for (BlockSet bs : msa.getBlockSets()) {
bs.getBlocks().remove(b);
- if (bs.getBlocks().size() == 0)
+ if (bs.getBlocks().isEmpty())
emptyBs.add(bs);
}
}
diff --git a/biojava-structure/src/main/java/org/biojava/nbio/structure/align/quaternary/QsAlignResult.java b/biojava-structure/src/main/java/org/biojava/nbio/structure/align/quaternary/QsAlignResult.java
index 7ac77a602e..fe1c9c411b 100644
--- a/biojava-structure/src/main/java/org/biojava/nbio/structure/align/quaternary/QsAlignResult.java
+++ b/biojava-structure/src/main/java/org/biojava/nbio/structure/align/quaternary/QsAlignResult.java
@@ -117,7 +117,7 @@ public void setSubunitMap(Map subunitMap) {
"Subunit Map index higher than Subunit List size.");
// Update the relation enum
- if (subunitMap.size() == 0) {
+ if (subunitMap.isEmpty()) {
relation = QsRelation.DIFFERENT;
} else if (subunitMap.keySet().size() == subunits1.size()) {
if (subunitMap.values().size() == subunits2.size()) {
diff --git a/biojava-structure/src/main/java/org/biojava/nbio/structure/align/util/AtomCache.java b/biojava-structure/src/main/java/org/biojava/nbio/structure/align/util/AtomCache.java
index 1435191c2c..71b8a3da22 100644
--- a/biojava-structure/src/main/java/org/biojava/nbio/structure/align/util/AtomCache.java
+++ b/biojava-structure/src/main/java/org/biojava/nbio/structure/align/util/AtomCache.java
@@ -228,7 +228,7 @@ public Structure getBiologicalAssembly(String pdbId, int bioAssemblyId, boolean
throws StructureException, IOException {
return getBiologicalAssembly(new PdbId(pdbId), bioAssemblyId, multiModel);
}
-
+
/**
* Returns the biological assembly for a given PDB ID and bioAssemblyId, by building the
* assembly from the biounit annotations found in {@link Structure#getPDBHeader()}
@@ -284,7 +284,7 @@ public Structure getBiologicalAssembly(PdbId pdbId, int bioAssemblyId, boolean m
asymUnit.getPDBHeader().getBioAssemblies().get(bioAssemblyId).getTransforms();
- if (transformations == null || transformations.size() == 0) {
+ if (transformations == null || transformations.isEmpty()) {
throw new StructureException("Could not load transformations to recreate biological assembly id " + bioAssemblyId + " of " + pdbId);
}
@@ -339,7 +339,7 @@ public Structure getBiologicalAssembly(String pdbId, boolean multiModel) throws
asymUnit.getPDBHeader().getBioAssemblies().get(bioAssemblyId).getTransforms();
- if (transformations == null || transformations.size() == 0) {
+ if (transformations == null || transformations.isEmpty()) {
throw new StructureException("Could not load transformations to recreate biological assembly id " + bioAssemblyId + " of " + pdbId);
}
@@ -385,7 +385,7 @@ public List getBiologicalAssemblies(String pdbId, boolean multiModel)
List transformations =
asymUnit.getPDBHeader().getBioAssemblies().get(bioAssemblyId).getTransforms();
- if (transformations == null || transformations.size() == 0) {
+ if (transformations == null || transformations.isEmpty()) {
logger.info("Could not load transformations to recreate biological assembly id {} of {}. Assembly " +
"id will be missing in biological assemblies.", bioAssemblyId, pdbId);
continue;
@@ -807,7 +807,7 @@ public Structure getStructureForPdbId(String id) throws IOException, StructureEx
public Structure getStructureForPdbId(PdbId pdbId) throws IOException {
if (pdbId == null)
return null;
-
+
while (checkLoading(pdbId)) {
// waiting for loading to be finished...
try {
@@ -833,7 +833,7 @@ public Structure getStructureForPdbId(PdbId pdbId) throws IOException {
protected Structure loadStructureFromCifByPdbId(String pdbId) throws IOException {
return loadStructureFromCifByPdbId(new PdbId(pdbId));
}
-
+
protected Structure loadStructureFromCifByPdbId(PdbId pdbId) throws IOException {
logger.debug("Loading structure {} from mmCIF file {}.", pdbId, path);
Structure s;
diff --git a/biojava-structure/src/main/java/org/biojava/nbio/structure/chem/ZipChemCompProvider.java b/biojava-structure/src/main/java/org/biojava/nbio/structure/chem/ZipChemCompProvider.java
index 4fe19aca58..a68019efb7 100644
--- a/biojava-structure/src/main/java/org/biojava/nbio/structure/chem/ZipChemCompProvider.java
+++ b/biojava-structure/src/main/java/org/biojava/nbio/structure/chem/ZipChemCompProvider.java
@@ -120,7 +120,7 @@ public ChemComp getChemComp(String recordName) {
}
// If a null record or an empty chemcomp, return a default ChemComp and blacklist.
- if (cc == null || (null == cc.getName() && cc.getAtoms().size() == 0)) {
+ if (cc == null || (null == cc.getName() && cc.getAtoms().isEmpty())) {
s_logger.info("Unable to find or download {} - excluding from future searches.", recordName);
unavailable.add(recordName);
return getEmptyChemComp(recordName);
diff --git a/biojava-structure/src/main/java/org/biojava/nbio/structure/cluster/SubunitCluster.java b/biojava-structure/src/main/java/org/biojava/nbio/structure/cluster/SubunitCluster.java
index 9a87e92f88..87c3c06e3c 100644
--- a/biojava-structure/src/main/java/org/biojava/nbio/structure/cluster/SubunitCluster.java
+++ b/biojava-structure/src/main/java/org/biojava/nbio/structure/cluster/SubunitCluster.java
@@ -331,7 +331,7 @@ public boolean mergeIdenticalByEntityId(SubunitCluster other) {
}
}
- if (thisAligned.size() == 0 && otherAligned.size() == 0) {
+ if (thisAligned.isEmpty() && otherAligned.isEmpty()) {
logger.warn("No equivalent aligned atoms found between SubunitClusters {}-{} via entity SEQRES alignment. Is FileParsingParameters.setAlignSeqRes() set?", thisName, otherName);
}
@@ -507,27 +507,24 @@ public boolean mergeStructure(SubunitCluster other, SubunitClustererParameters p
}
}
- AFPChain afp = aligner.align(this.subunits.get(this.representative)
- .getRepresentativeAtoms(),
- other.subunits.get(other.representative)
- .getRepresentativeAtoms());
+ AFPChain afp = aligner.align(this.subunits.get(this.representative).getRepresentativeAtoms(),
+ other.subunits.get(other.representative).getRepresentativeAtoms());
+ String pairName = this.subunits.get(this.representative).getName() + "-" + other.subunits.get(other.representative).getName();
if (afp.getOptLength() < 1) {
// alignment failed (eg if chains were too short)
throw new StructureException(
- String.format("Subunits failed to align using %s", params.getSuperpositionAlgorithm()));
+ String.format("Subunits %s failed to align using %s", pairName, params.getSuperpositionAlgorithm()));
}
// Convert AFPChain to MultipleAlignment for convenience
MultipleAlignment msa = new MultipleAlignmentEnsembleImpl(
afp,
this.subunits.get(this.representative).getRepresentativeAtoms(),
- other.subunits.get(other.representative)
- .getRepresentativeAtoms(), false)
- .getMultipleAlignment(0);
+ other.subunits.get(other.representative).getRepresentativeAtoms(),
+ false).getMultipleAlignment(0);
- double structureCoverage = Math.min(msa.getCoverages().get(0), msa
- .getCoverages().get(1));
+ double structureCoverage = Math.min(msa.getCoverages().get(0), msa.getCoverages().get(1));
if(params.isUseStructureCoverage() && structureCoverage < params.getStructureCoverageThreshold()) {
return false;
@@ -543,8 +540,7 @@ public boolean mergeStructure(SubunitCluster other, SubunitClustererParameters p
return false;
}
- logger.info(String.format("SubunitClusters are structurally similar with "
- + "%.2f RMSD %.2f coverage", rmsd, structureCoverage));
+ logger.info("SubunitClusters {} are structurally similar with [ {} ] RMSD and [ {} ] coverage", pairName, String.format("%.2f", rmsd), String.format("%.2f", structureCoverage));
// Merge clusters
List> alignedRes = msa.getBlock(0).getAlignRes();
@@ -565,13 +561,18 @@ public boolean mergeStructure(SubunitCluster other, SubunitClustererParameters p
// Only consider residues that are part of the SubunitCluster
if (this.subunitEQR.get(this.representative).contains(thisIndex)
- && other.subunitEQR.get(other.representative).contains(
- otherIndex)) {
+ && other.subunitEQR.get(other.representative).contains(otherIndex)) {
thisAligned.add(thisIndex);
otherAligned.add(otherIndex);
}
}
+ // this can happen in very rare cases, e.g. 9y9z when merging E_1 into the cluster D_1, OM_1, Y_1
+ if (thisAligned.isEmpty() && otherAligned.isEmpty()) {
+ logger.warn("No equivalent aligned atoms found between SubunitClusters {} via structure alignment. Will not merge the second one into the first.", pairName);
+ return false;
+ }
+
updateEquivResidues(other, thisAligned, otherAligned);
this.method = SubunitClustererMethod.STRUCTURE;
@@ -602,18 +603,12 @@ private void updateEquivResidues(SubunitCluster other, List thisAligned
Collections.sort(otherRemove);
Collections.reverse(otherRemove);
- for (int t = 0; t < thisRemove.size(); t++) {
- for (List eqr : this.subunitEQR) {
- int column = thisRemove.get(t);
- eqr.remove(column);
- }
+ for (int column : thisRemove) {
+ this.subunitEQR.forEach(eqr -> eqr.remove(column));
}
- for (int t = 0; t < otherRemove.size(); t++) {
- for (List eqr : other.subunitEQR) {
- int column = otherRemove.get(t);
- eqr.remove(column);
- }
+ for (int column : otherRemove) {
+ other.subunitEQR.forEach(eqr -> eqr.remove(column));
}
// The representative is the longest sequence
diff --git a/biojava-structure/src/main/java/org/biojava/nbio/structure/cluster/SubunitClusterer.java b/biojava-structure/src/main/java/org/biojava/nbio/structure/cluster/SubunitClusterer.java
index 6295f8fdf0..fa63b96d96 100644
--- a/biojava-structure/src/main/java/org/biojava/nbio/structure/cluster/SubunitClusterer.java
+++ b/biojava-structure/src/main/java/org/biojava/nbio/structure/cluster/SubunitClusterer.java
@@ -58,7 +58,7 @@ public static Stoichiometry cluster(Structure structure,
public static Stoichiometry cluster(List subunits, SubunitClustererParameters params) {
List clusters = new ArrayList<>();
- if (subunits.size() == 0)
+ if (subunits.isEmpty())
return new Stoichiometry(clusters);
// First generate a new cluster for each Subunit
@@ -83,8 +83,7 @@ public static Stoichiometry cluster(List subunits, SubunitClustererPara
}
} catch (CompoundNotFoundException e) {
- logger.warn("Could not merge by Sequence. {}",
- e.getMessage());
+ logger.info("Could not merge by Sequence. {}", e.getMessage());
}
}
}
@@ -100,7 +99,7 @@ public static Stoichiometry cluster(List subunits, SubunitClustererPara
clusters.remove(c2);
}
} catch (StructureException e) {
- logger.warn("Could not merge by Structure. {}", e.getMessage());
+ logger.info("Could not merge by Structure. {}", e.getMessage());
}
}
}
@@ -112,8 +111,7 @@ public static Stoichiometry cluster(List subunits, SubunitClustererPara
try {
clusters.get(c).divideInternally(params);
} catch (StructureException e) {
- logger.warn("Error analyzing internal symmetry. {}",
- e.getMessage());
+ logger.info("Error analyzing internal symmetry. {}", e.getMessage());
}
}
@@ -125,8 +123,7 @@ public static Stoichiometry cluster(List subunits, SubunitClustererPara
if (clusters.get(c1).mergeStructure(clusters.get(c2), params))
clusters.remove(c2);
} catch (StructureException e) {
- logger.warn("Could not merge by Structure. {}",
- e.getMessage());
+ logger.info("Could not merge by Structure. {}", e.getMessage());
}
}
}
diff --git a/biojava-structure/src/main/java/org/biojava/nbio/structure/geometry/MomentsOfInertia.java b/biojava-structure/src/main/java/org/biojava/nbio/structure/geometry/MomentsOfInertia.java
index 8cfd032daa..5a6e69c4cf 100644
--- a/biojava-structure/src/main/java/org/biojava/nbio/structure/geometry/MomentsOfInertia.java
+++ b/biojava-structure/src/main/java/org/biojava/nbio/structure/geometry/MomentsOfInertia.java
@@ -72,7 +72,7 @@ public void addPoint(Point3d point, double mass) {
public Point3d getCenterOfMass() {
- if (points.size() == 0) {
+ if (points.isEmpty()) {
throw new IllegalStateException(
"MomentsOfInertia: no points defined");
}
diff --git a/biojava-structure/src/main/java/org/biojava/nbio/structure/io/PDBFileParser.java b/biojava-structure/src/main/java/org/biojava/nbio/structure/io/PDBFileParser.java
index 176459bbf2..58e4ee6625 100644
--- a/biojava-structure/src/main/java/org/biojava/nbio/structure/io/PDBFileParser.java
+++ b/biojava-structure/src/main/java/org/biojava/nbio/structure/io/PDBFileParser.java
@@ -1970,7 +1970,7 @@ private Group getCorrectAltLocGroup( Character altLoc,
// build it up.
if ( groupCode3.equals(currentGroup.getPDBName())) {
- if ( currentGroup.getAtoms().size() == 0) {
+ if ( currentGroup.getAtoms().isEmpty()) {
//System.out.println("current group is empty " + current_group + " " + altLoc);
return currentGroup;
}
@@ -2762,7 +2762,7 @@ private void makeCompounds(List compoundList,
}
// System.out.println("[makeCompounds] adding sources to compounds from sourceLines");
// since we're starting again from the first compound, reset it here
- if ( entities.size() == 0){
+ if ( entities.isEmpty()){
current_compound = new EntityInfo();
} else {
current_compound = entities.get(0);
diff --git a/biojava-structure/src/main/java/org/biojava/nbio/structure/io/cif/AbstractCifFileSupplier.java b/biojava-structure/src/main/java/org/biojava/nbio/structure/io/cif/AbstractCifFileSupplier.java
index 826d9588ef..7e9d8ad7ac 100644
--- a/biojava-structure/src/main/java/org/biojava/nbio/structure/io/cif/AbstractCifFileSupplier.java
+++ b/biojava-structure/src/main/java/org/biojava/nbio/structure/io/cif/AbstractCifFileSupplier.java
@@ -308,7 +308,12 @@ public void accept(WrappedAtom wrappedAtom) {
}
}
labelEntityId.add(entityId);
- labelSeqId.add(seqId);
+ // see https://github.com/biojava/biojava/issues/1116
+ if (chain.getEntityInfo().getType() == EntityType.POLYMER) {
+ labelSeqId.add(seqId);
+ } else {
+ labelSeqId.markNextNotPresent();
+ }
String insCode = "";
if (group.getResidueNumber().getInsCode() != null) {
insCode = Character.toString(group.getResidueNumber().getInsCode());
diff --git a/biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmtf/MmtfStructureReader.java b/biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmtf/MmtfStructureReader.java
index c2830c1685..21ef8bb64c 100644
--- a/biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmtf/MmtfStructureReader.java
+++ b/biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmtf/MmtfStructureReader.java
@@ -396,7 +396,7 @@ private Group getCorrectAltLocGroup(Character altLoc) {
}
// no matching altLoc group found.
// build it up.
- if (group.getAtoms().size() == 0) {
+ if (group.getAtoms().isEmpty()) {
return group;
}
Group altLocG = (Group) group.clone();
diff --git a/biojava-structure/src/main/java/org/biojava/nbio/structure/quaternary/BioAssemblyTools.java b/biojava-structure/src/main/java/org/biojava/nbio/structure/quaternary/BioAssemblyTools.java
index 7c359121de..8f76b2ae61 100644
--- a/biojava-structure/src/main/java/org/biojava/nbio/structure/quaternary/BioAssemblyTools.java
+++ b/biojava-structure/src/main/java/org/biojava/nbio/structure/quaternary/BioAssemblyTools.java
@@ -55,7 +55,7 @@ public static boolean isUnaryExpression(String expression) {
if (first < 0 || last < 0) {
return true;
}
- return ! (first == 0 && last > first);
+ return first != 0 || last <= first;
}
public static List parseUnaryOperatorExpression(String operatorExpression) {
@@ -279,7 +279,7 @@ public static double[] getBiologicalMoleculeCentroid( final Structure asymUnit,
return centroid;
}
- if ( transformations.size() == 0) {
+ if ( transformations.isEmpty()) {
return Calc.getCentroid(atoms).getCoords();
}
diff --git a/biojava-structure/src/main/java/org/biojava/nbio/structure/quaternary/BiologicalAssemblyBuilder.java b/biojava-structure/src/main/java/org/biojava/nbio/structure/quaternary/BiologicalAssemblyBuilder.java
index c6ec6bc8ff..9edb8f404c 100644
--- a/biojava-structure/src/main/java/org/biojava/nbio/structure/quaternary/BiologicalAssemblyBuilder.java
+++ b/biojava-structure/src/main/java/org/biojava/nbio/structure/quaternary/BiologicalAssemblyBuilder.java
@@ -205,7 +205,7 @@ private void addChainMultiModel(Structure s, Chain newChain, String transformId)
// multi-model bioassembly
- if ( modelIndex.size() == 0)
+ if (modelIndex.isEmpty())
modelIndex.add("PLACEHOLDER FOR ASYM UNIT");
int modelCount = modelIndex.indexOf(transformId);
diff --git a/biojava-structure/src/main/java/org/biojava/nbio/structure/secstruc/SecStrucTools.java b/biojava-structure/src/main/java/org/biojava/nbio/structure/secstruc/SecStrucTools.java
index 7732c04b80..42191d682d 100644
--- a/biojava-structure/src/main/java/org/biojava/nbio/structure/secstruc/SecStrucTools.java
+++ b/biojava-structure/src/main/java/org/biojava/nbio/structure/secstruc/SecStrucTools.java
@@ -57,7 +57,7 @@ public static List getSecStrucInfo(Structure s) {
Group g = iter.next();
if (g.hasAminoAtoms()) {
Object p = g.getProperty(Group.SEC_STRUC);
- if (!(p == null)) {
+ if (p != null) {
SecStrucInfo ss = (SecStrucInfo) p;
listSSI.add(ss);
}
diff --git a/biojava-structure/src/main/java/org/biojava/nbio/structure/symmetry/core/HelicalRepeatUnit.java b/biojava-structure/src/main/java/org/biojava/nbio/structure/symmetry/core/HelicalRepeatUnit.java
index ff9c77cf13..cd16aa5f87 100644
--- a/biojava-structure/src/main/java/org/biojava/nbio/structure/symmetry/core/HelicalRepeatUnit.java
+++ b/biojava-structure/src/main/java/org/biojava/nbio/structure/symmetry/core/HelicalRepeatUnit.java
@@ -64,7 +64,7 @@ public Map getInteractingRepeatUnits() {
private void run() {
this.repeatUnitCenters = calcRepeatUnitCenters();
- if (this.repeatUnitCenters.size() == 0) {
+ if (this.repeatUnitCenters.isEmpty()) {
return;
}
this.repeatUnits = calcRepeatUnits();
diff --git a/biojava-structure/src/main/java/org/biojava/nbio/structure/symmetry/core/RotationGroup.java b/biojava-structure/src/main/java/org/biojava/nbio/structure/symmetry/core/RotationGroup.java
index 70b69afe14..1490d27036 100644
--- a/biojava-structure/src/main/java/org/biojava/nbio/structure/symmetry/core/RotationGroup.java
+++ b/biojava-structure/src/main/java/org/biojava/nbio/structure/symmetry/core/RotationGroup.java
@@ -98,7 +98,7 @@ public void complete() {
public String getPointGroup() {
if (modified) {
- if (rotations.size() == 0) {
+ if (rotations.isEmpty()) {
return "C1";
}
complete();
diff --git a/biojava-structure/src/main/java/org/biojava/nbio/structure/symmetry/core/RotationSolver.java b/biojava-structure/src/main/java/org/biojava/nbio/structure/symmetry/core/RotationSolver.java
index 37a44be7ac..b1566a6d2f 100644
--- a/biojava-structure/src/main/java/org/biojava/nbio/structure/symmetry/core/RotationSolver.java
+++ b/biojava-structure/src/main/java/org/biojava/nbio/structure/symmetry/core/RotationSolver.java
@@ -305,7 +305,7 @@ private boolean isSpherical() {
* @return null if invalid, or a rotation if valid
*/
private Rotation isValidPermutation(List permutation) {
- if (permutation.size() == 0) {
+ if (permutation.isEmpty()) {
return null;
}
diff --git a/biojava-structure/src/main/java/org/biojava/nbio/structure/symmetry/core/SystematicSolver.java b/biojava-structure/src/main/java/org/biojava/nbio/structure/symmetry/core/SystematicSolver.java
index d13fa4db16..a449771b58 100644
--- a/biojava-structure/src/main/java/org/biojava/nbio/structure/symmetry/core/SystematicSolver.java
+++ b/biojava-structure/src/main/java/org/biojava/nbio/structure/symmetry/core/SystematicSolver.java
@@ -145,7 +145,7 @@ private void completeRotationGroup() {
}
private boolean isValidPermutation(List permutation) {
- if (permutation.size() == 0) {
+ if (permutation.isEmpty()) {
return false;
}
diff --git a/biojava-structure/src/main/java/org/biojava/nbio/structure/symmetry/geometry/DistanceBox.java b/biojava-structure/src/main/java/org/biojava/nbio/structure/symmetry/geometry/DistanceBox.java
index 2d9b1d6dca..25d37693fb 100644
--- a/biojava-structure/src/main/java/org/biojava/nbio/structure/symmetry/geometry/DistanceBox.java
+++ b/biojava-structure/src/main/java/org/biojava/nbio/structure/symmetry/geometry/DistanceBox.java
@@ -166,7 +166,7 @@ private List getBoxTwo(long location) {
}
// ensure that boxTwo has no empty element by copying from tempBox of defined size
List boxTwo = null;
- if (tempBox.size() == 0) {
+ if (tempBox.isEmpty()) {
boxTwo = Collections.emptyList();
} else if (tempBox.size() == 1) {
boxTwo = Collections.singletonList(tempBox.get(0));
diff --git a/biojava-structure/src/main/java/org/biojava/nbio/structure/xtal/SpaceGroup.java b/biojava-structure/src/main/java/org/biojava/nbio/structure/xtal/SpaceGroup.java
index cff84c70f8..852d213bb9 100644
--- a/biojava-structure/src/main/java/org/biojava/nbio/structure/xtal/SpaceGroup.java
+++ b/biojava-structure/src/main/java/org/biojava/nbio/structure/xtal/SpaceGroup.java
@@ -645,10 +645,10 @@ public List getTransfAlgebraic() {
public void setTransfAlgebraic(List transfAlgebraic) {
//System.out.println("setting transfAlgebraic " + transfAlgebraic);
- if ( transformations == null || transformations.size() == 0)
+ if ( transformations == null || transformations.isEmpty())
transformations = new ArrayList(transfAlgebraic.size());
- if ( this.transfAlgebraic == null || this.transfAlgebraic.size() == 0)
+ if ( this.transfAlgebraic == null || this.transfAlgebraic.isEmpty())
this.transfAlgebraic = new ArrayList<>(transfAlgebraic.size());
for ( String transf : transfAlgebraic){
diff --git a/biojava-survival/pom.xml b/biojava-survival/pom.xml
index 6f73371344..88f901cdea 100644
--- a/biojava-survival/pom.xml
+++ b/biojava-survival/pom.xml
@@ -4,7 +4,7 @@
org.biojava
biojava
- 7.2.1
+ 7.2.5-SNAPSHOT
biojava-survival
diff --git a/biojava-survival/src/main/java/org/biojava/nbio/survival/kaplanmeier/figure/NumbersAtRiskPanel.java b/biojava-survival/src/main/java/org/biojava/nbio/survival/kaplanmeier/figure/NumbersAtRiskPanel.java
index c4578f1c8b..144942a809 100644
--- a/biojava-survival/src/main/java/org/biojava/nbio/survival/kaplanmeier/figure/NumbersAtRiskPanel.java
+++ b/biojava-survival/src/main/java/org/biojava/nbio/survival/kaplanmeier/figure/NumbersAtRiskPanel.java
@@ -76,7 +76,7 @@ private void paintTable(Graphics g) {
sfiHashMap = sfi.getStrataInfoHashMap();
}
- if(sfiHashMap.size() == 0)
+ if(sfiHashMap.isEmpty())
return;
//int height = this.getHeight();
diff --git a/biojava-ws/pom.xml b/biojava-ws/pom.xml
index e68c318de9..7e960b4445 100644
--- a/biojava-ws/pom.xml
+++ b/biojava-ws/pom.xml
@@ -3,7 +3,7 @@
biojava
org.biojava
- 7.2.1
+ 7.2.5-SNAPSHOT
biojava-ws
biojava-ws
@@ -19,7 +19,7 @@
org.biojava
biojava-core
- 7.2.1
+ 7.2.5-SNAPSHOT
compile
diff --git a/biojava-ws/src/main/java/org/biojava/nbio/ws/hmmer/HmmerResult.java b/biojava-ws/src/main/java/org/biojava/nbio/ws/hmmer/HmmerResult.java
index 3304e78d4f..373b78cd0a 100644
--- a/biojava-ws/src/main/java/org/biojava/nbio/ws/hmmer/HmmerResult.java
+++ b/biojava-ws/src/main/java/org/biojava/nbio/ws/hmmer/HmmerResult.java
@@ -140,7 +140,7 @@ public int compareTo(HmmerResult o) {
return(me.getSqFrom().compareTo(other.getSqFrom()));
}
private boolean emptyDomains(HmmerResult o) {
- if ( o.getDomains() == null || o.getDomains().size() == 0)
+ if ( o.getDomains() == null || o.getDomains().isEmpty())
return true;
return false;
}
diff --git a/pom.xml b/pom.xml
index 7ae8b07016..e9f246202b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -12,7 +12,7 @@
org.biojava
biojava
pom
- 7.2.1
+ 7.2.5-SNAPSHOT
biojava
BioJava is an open-source project dedicated to providing a Java framework for processing biological
data. It provides analytical and statistical routines, parsers for common file formats and allows the
@@ -44,14 +44,14 @@
2.23.1
5.10.1
ciftools-java
- 5.0.1
+ 7.0.1
scm:git:git://github.com/biojava/biojava.git
scm:git:git@github.com:biojava/biojava.git
https://github.com/biojava/biojava
- biojava-7.2.1
+ HEAD
-
+
- org.sonatype.plugins
- nexus-staging-maven-plugin
- 1.6.13
+ org.sonatype.central
+ central-publishing-maven-plugin
+ 0.8.0
true
- ossrh
- https://oss.sonatype.org/
- true
+
+ central
+
+
+ true
+
+ published