4848 *
4949 * @author Jules Jacobsen
5050 * @author Jose Duarte
51+ * @author Anthony Bradley
5152 * @since 1.5
5253 */
53- public class Compound implements Serializable {
54+ public class EntityInfo implements Serializable {
5455
55- private final static Logger logger = LoggerFactory .getLogger (Compound .class );
56+ private final static Logger logger = LoggerFactory .getLogger (EntityInfo .class );
5657
5758
5859 //TODO we should consider having the data here as it is in mmCIF dictionary - JD 2014-12-11
@@ -80,21 +81,21 @@ public class Compound implements Serializable {
8081 private Map <String , Map <ResidueNumber ,Integer >> chains2pdbResNums2ResSerials ;
8182
8283 private String refChainId ;
83-
84- private String molName = null ;
84+ private String description = null ;
8585 private String title = null ;
86+ /**
87+ * The type of group (polymer, non-polymer, water)
88+ */
89+ private String type = null ;
8690 private List <String > synonyms = null ;
8791 private List <String > ecNums = null ;
8892 private String engineered = null ;
8993 private String mutation = null ;
9094 private String biologicalUnit = null ;
9195 private String details = null ;
92-
9396 private String numRes = null ;
9497 private String resNames = null ;
95-
9698 private String headerVars = null ;
97-
9899 private String synthetic = null ;
99100 private String fragment = null ;
100101 private String organismScientific = null ;
@@ -130,7 +131,7 @@ public class Compound implements Serializable {
130131
131132 private Long id ;
132133
133- public Compound () {
134+ public EntityInfo () {
134135 chains = new ArrayList <Chain >();
135136 chains2pdbResNums2ResSerials = new HashMap <String , Map <ResidueNumber ,Integer >>();
136137 molId = -1 ;
@@ -141,7 +142,7 @@ public Compound () {
141142 * but not setting the Chains
142143 * @param c
143144 */
144- public Compound ( Compound c ) {
145+ public EntityInfo ( EntityInfo c ) {
145146
146147 this .chains = new ArrayList <Chain >();
147148
@@ -151,7 +152,7 @@ public Compound (Compound c) {
151152
152153 this .refChainId = c .refChainId ;
153154
154- this .molName = c .molName ;
155+ this .description = c .description ;
155156 this .title = c .title ;
156157
157158 if (c .synonyms !=null ) {
@@ -213,7 +214,7 @@ public Compound (Compound c) {
213214 public String toString (){
214215 StringBuilder buf = new StringBuilder ();
215216 buf .append ("Compound: " ).append (molId ).append (" " );
216- buf .append (molName ==null ?"(no name)" :"(" +molName +")" );
217+ buf .append (description ==null ?"(no name)" :"(" +description +")" );
217218 buf .append (" chains: " );
218219 if (chains !=null ) {
219220 for (int i =0 ;i <chains .size ();i ++) {
@@ -292,8 +293,8 @@ public void showCompound() {
292293 }
293294 System .out .println ("Chains: " + buf .toString ());
294295 }
295- if (this .molName != null ) {
296- System .out .println ("Mol Name: " + this .molName );
296+ if (this .description != null ) {
297+ System .out .println ("Mol Name: " + this .description );
297298 }
298299 if (this .title != null ) {
299300 System .out .println ("Title: " + this .title );
@@ -619,12 +620,12 @@ public void setMolId(int molId) {
619620 this .molId = molId ;
620621 }
621622
622- public String getMolName () {
623- return molName ;
623+ public String getDescription () {
624+ return description ;
624625 }
625626
626- public void setMolName (String molName ) {
627- this .molName = molName ;
627+ public void setDescription (String molName ) {
628+ this .description = molName ;
628629 }
629630
630631 public String getTitle () {
@@ -988,4 +989,18 @@ public void addChain(Chain chain){
988989 public void setChains (List <Chain > chains ){
989990 this .chains = chains ;
990991 }
992+
993+ /**
994+ * @return the type
995+ */
996+ public String getType () {
997+ return type ;
998+ }
999+
1000+ /**
1001+ * @param type the type to set
1002+ */
1003+ public void setType (String type ) {
1004+ this .type = type ;
1005+ }
9911006}
0 commit comments