Class AtomTypeMapper
java.lang.Object
org.openscience.cdk.atomtype.mapper.AtomTypeMapper
An
AtomTypeMapper allows the mapping of atom types between atom type
schemes. For example, it allows to convert atom types from the CDK scheme to the
Sybyl scheme; using this approach it is possible to use the CDK atom type perception
algorithm and write the resulting atom types using the Sybyl atom type scheme.-
Method Summary
Modifier and TypeMethodDescriptionstatic AtomTypeMappergetInstance(String mappingFile) Instantiates an atom type to atom type mapping, based on the given mapping file.static AtomTypeMappergetInstance(String mappingFile, InputStream stream) Instantiates an atom type to atom type mapping, based on the givenInputStream.Returns the name of this mapping.mapAtomType(String type) Maps an atom type from one scheme to another, as specified in the input used when creating thisAtomTypeMapperinstance.
-
Method Details
-
getInstance
Instantiates an atom type to atom type mapping, based on the given mapping file. For example, the mapping fileorg/openscience/cdk/dict/data/cdk-sybyl-mappings.owlwhich defines how CDK atom types are mapped to Sybyl atom types.
Important! Make sure there is not a leading slash.- Parameters:
mappingFile- File name of the OWL file defining the atom type to atom type mappings.- Returns:
- An instance of AtomTypeMapper for the given mapping file.
-
getInstance
Instantiates an atom type to atom type mapping, based on the givenInputStream.- Parameters:
mappingFile- Name of theInputStreamdefining the atom type to atom type mappings.stream- theInputStreamfrom which the mappings as read- Returns:
- An instance of AtomTypeMapper for the given mapping file.
-
mapAtomType
Maps an atom type from one scheme to another, as specified in the input used when creating thisAtomTypeMapperinstance.- Parameters:
type- atom type to map to the target schema- Returns:
- atom type name in the target schema
-
getMapping
Returns the name of this mapping. In case of file inputs, it returns the filename, but when the input was anInputStreamthen the name is less well defined.- Returns:
- the name of the mapping represented by this
AtomTypeMapper.
-