Skip to content

Commit

Permalink
OPLSAA atom names have been simplified (for example: "@atom:145_bCA_a…
Browse files Browse the repository at this point in the history
…CA_dCA_iCA" --> "@atom:145_CA")
  • Loading branch information
jewettaij committed Dec 2, 2024
1 parent c5503b6 commit 4a3ae27
Showing 1 changed file with 14 additions and 17 deletions.
31 changes: 14 additions & 17 deletions moltemplate/force_fields/convert_OPLSAA_to_LT/oplsaa2lt_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,7 @@ def type_long(self) -> str:
interaction (bond, angle, dihedral, improper), underscore separated.
"""
l = f"{self.type_id}"
l += f"_b{self.bonded_type}"
l += f"_a{self.bonded_type}"
l += f"_d{self.bonded_type}"
l += f"_i{self.bonded_type}"
l += f"_{self.bonded_type}"
return l

@property
Expand Down Expand Up @@ -205,8 +202,8 @@ def __init__(self, types: list[str], k: str, eq: str, comment: str):
def bytype_line(self) -> str:
l = f"@{type(self).kind}:{self.typename}"
l += f"{self._duplicate_count_str}"
l += f" @atom:*_b{self.ty1}_a*_d*_i*"
l += f" @atom:*_b{self.ty2}_a*_d*_i*\n"
l += f" @atom:*_{self.ty1}"
l += f" @atom:*_{self.ty2}\n"
return l

@property
Expand All @@ -229,9 +226,9 @@ def __init__(self, types: list[str], k: str, eq: str, comment: str):
def bytype_line(self) -> str:
l = f"@{type(self).kind}:{self.typename}"
l += f"{self._duplicate_count_str}"
l += f" @atom:*_b*_a{self.ty1}_d*_i*"
l += f" @atom:*_b*_a{self.ty2}_d*_i*"
l += f" @atom:*_b*_a{self.ty3}_d*_i*\n"
l += f" @atom:*_{self.ty1}"
l += f" @atom:*_{self.ty2}"
l += f" @atom:*_{self.ty3}\n"
return l

@property
Expand All @@ -253,10 +250,10 @@ def __init__(self, types: list[str], v1, v2, v3, v4, comment: str):
def bytype_line(self) -> str:
l = f"@{type(self).kind}:{self.typename}"
l += f"{self._duplicate_count_str}"
l += f" @atom:*_b*_a*_d{self.ty1}_i*"
l += f" @atom:*_b*_a*_d{self.ty2}_i*"
l += f" @atom:*_b*_a*_d{self.ty3}_i*"
l += f" @atom:*_b*_a*_d{self.ty4}_i*\n"
l += f" @atom:*_{self.ty1}"
l += f" @atom:*_{self.ty2}"
l += f" @atom:*_{self.ty3}"
l += f" @atom:*_{self.ty4}\n"
return l

@property
Expand Down Expand Up @@ -285,10 +282,10 @@ def __init__(self, types: list[str], v1, v2, v3, v4, comment: str):
@property
def bytype_line(self) -> str:
l = f"@{type(self).kind}:{self.typename}"
l += f" @atom:*_b*_a*_d*_i{self.ty1}"
l += f" @atom:*_b*_a*_d*_i{self.ty2}"
l += f" @atom:*_b*_a*_d*_i{self.ty3}"
l += f" @atom:*_b*_a*_d*_i{self.ty4}\n"
l += f" @atom:*_{self.ty1}"
l += f" @atom:*_{self.ty2}"
l += f" @atom:*_{self.ty3}"
l += f" @atom:*_{self.ty4}\n"
return l

@property
Expand Down

0 comments on commit 4a3ae27

Please sign in to comment.