| version 1.22 | version 1.23 |
|---|
| |
| topo_mol_destroy_atom(topo_mol_unlink_atom(&(res->atoms),target->aname)); | topo_mol_destroy_atom(topo_mol_unlink_atom(&(res->atoms),target->aname)); |
| } | } |
| | |
| int topo_mol_rename_atom(topo_mol *mol, const topo_mol_ident_t *target, | int topo_mol_set_name(topo_mol *mol, const topo_mol_ident_t *target, |
| const char *name) { | const char *name) { |
| topo_mol_residue_t *res; | topo_mol_residue_t *res; |
| topo_mol_atom_t *atom; | topo_mol_atom_t *atom; |
| |
| return 0; | return 0; |
| } | } |
| | |
| | int topo_mol_set_resname(topo_mol *mol, const topo_mol_ident_t *target, |
| | const char *rname) { |
| | topo_mol_residue_t *res; |
| | if ( ! mol ) return -1; |
| | if ( ! target ) return -2; |
| | res = topo_mol_get_res(mol,target,0); |
| | if ( ! res ) return -3; |
| | strcpy(res->name,rname); |
| | return 0; |
| | } |
| | |
| | int topo_mol_set_segid(topo_mol *mol, const topo_mol_ident_t *target, |
| | const char *segid) { |
| | topo_mol_segment_t *seg; |
| | if ( ! mol ) return -1; |
| | if ( ! target ) return -2; |
| | seg = topo_mol_get_seg(mol,target); |
| | if ( ! seg ) return -3; |
| | strcpy(seg->segid,segid); |
| | return 0; |
| | } |
| | |
| int topo_mol_set_element(topo_mol *mol, const topo_mol_ident_t *target, | int topo_mol_set_element(topo_mol *mol, const topo_mol_ident_t *target, |
| const char *element, int replace) { | const char *element, int replace) { |
| topo_mol_residue_t *res; | topo_mol_residue_t *res; |
| |
| return 0; | return 0; |
| } | } |
| | |
| | int topo_mol_set_mass(topo_mol *mol, const topo_mol_ident_t *target, |
| | double mass) { |
| | topo_mol_residue_t *res; |
| | topo_mol_atom_t *atom; |
| | if ( ! mol ) return -1; |
| | if ( ! target ) return -2; |
| | res = topo_mol_get_res(mol,target,0); |
| | if ( ! res ) return -3; |
| | for ( atom = res->atoms; atom; atom = atom->next ) { |
| | if ( ! strcmp(target->aname,atom->name) ) break; |
| | } |
| | if ( ! atom ) return -3; |
| | |
| | atom->mass = mass; |
| | return 0; |
| | } |
| | |
| | int topo_mol_set_charge(topo_mol *mol, const topo_mol_ident_t *target, |
| | double charge) { |
| | topo_mol_residue_t *res; |
| | topo_mol_atom_t *atom; |
| | if ( ! mol ) return -1; |
| | if ( ! target ) return -2; |
| | res = topo_mol_get_res(mol,target,0); |
| | if ( ! res ) return -3; |
| | for ( atom = res->atoms; atom; atom = atom->next ) { |
| | if ( ! strcmp(target->aname,atom->name) ) break; |
| | } |
| | if ( ! atom ) return -3; |
| | |
| | atom->charge = charge; |
| | return 0; |
| | } |
| | |
| int topo_mol_set_bfactor(topo_mol *mol, const topo_mol_ident_t *target, | int topo_mol_set_bfactor(topo_mol *mol, const topo_mol_ident_t *target, |
| double bfactor) { | double bfactor) { |
| topo_mol_residue_t *res; | topo_mol_residue_t *res; |